From 30280a913b0928b7615ec2cb7299bc3a8df9c104 Mon Sep 17 00:00:00 2001
From: Gregory Nutt Last Updated: April 5, 2015
- This document describes the tiny graphics support included in NuttX.
- It includes an overview description of that graphics support, detailed
- descriptions of the NuttX graphics APIs, and discussion of code organization,
- and OS configuration options.
-
- The objective of this development was to provide a tiny windowing system in the
- spirit of X, but greatly scaled down and appropriate for most resource-limited
- embedded environments.
- The current NX implementation supports the general following, high-level features:
-
- NX is organized into 6 (and perhaps someday 7 or 8) logical modules.
- These logical modules also correspond to the directory organization.
- That NuttX directory organization is discussed in
- Appendix B of this document.
- The logic modules are discussed in the following sub-paragraphs.
-
-
-
-
-
-
-
-
-
- NX Graphics Subsystem
-
-
-
-
-
-
-
-
-
-
- Table of Contents
-
-
-
-
-
-
-
- 1.0 Introduction
- 1.1 Overview
-1.2 Objectives
-
-
-
-
-
-
- include/nuttx/video/fb.h
).
- include/nuttx/lcd/lcd.h
).
- By default, NX is configured to use the frame buffer driver unless CONFIG_NX_LCDDRIVER
is defined =y in your NuttX configuration file.
- 1.3 Organization
-
-
NXGL
)- NXGLIB is a standalone library that contains low-level graphics utilities and - direct framebuffer or LCD rendering logic. NX is built on top NXGLIB. -
- -NXSU
and NXMU
)
- NX is the tiny NuttX windowing system for raw windows (i.e., simple regions of
- graphics memory).
- NX includes both a small-footprint, single user implementaton (NXSU) and a somewhat
- larger multi-user implentation (NXMU as described below).
- Both conform to the same APIs as defined in include/nuttx/nx/nx.h
and, hence,
- are interchangable1.
- NX can be used without NxWidgets and without NXTOOLKIT for raw window displays.
-
- 1NXMU and NXSU are interchangeable other than (1) certain start-up - and initialization APIs (as described below), and (2) timing. With NXSU, NX APIs - execute immediately; with NXMU, NX APIs defer and serialize the operations and, hence, - introduce different timing and potential race conditions that you would not experience - with NXSU. -
- -NXNULL? - At one time, I also envisioned a NULL front-end that did not support windowing - at all but, rather, simply provided the entire framebuffer or LCD memory as one dumb window. - This has the advantage that the same NX APIs can be used on the one dumb window as - for the other NX windows. - This would be in the NuttX spirit of scalability. -
-
- However, the same end result can be obtained by using the
- nx_requestbkgd()
API.
- It still may be possible to reduce the footprint in this usage case by developing
- and even thinner NXNULL front-end.
- That is a possible future development.
-
NXTK
)- NXTK is a s set of C graphics tools that provide higher-level window drawing - operations. - This is the module where the framed windows and toolbar logic is implemented. - NXTK is built on top of NX and does not depend on NxWidgets. -
- -NXFONTS
)- A set of C graphics tools for present (bitmap) font images. - The font implementation is at a very low level or graphics operation, - comparable to the logic in NXGLIB. - NXFONTS does not depend on any NX module other than some utilities and types from NXGLIB. -
- -NxWidgets
)- NxWidgets is a higher level, C++, object-oriented library for object-oriented access to graphical "widgets." - NxWidgets is provided as a separate package. - NxWidgets is built on top of the core NuttX graphics subsystem, but is not a part of the core graphics subystems. -
- -NxTerm
)
- NxTerm is a write-only character device (not shown) that is built on top of an NX window.
- This character device can be used to provide stdout
and stderr
and, hence, can provide the output side of NuttX console.
- NxTerm is only available when the multi-user NX implementation is selected (CONFIG_NX_MULTIUSER
).
-
- 2.0 NX User APIs- |
-
include/nuttx/nx/nxglib.h
- include/nuttx/nx/nx.h
- include/nutt/nxtk.h
- include/nutt/nxfont.h
- NXGL
)
- NXGL provides many APIs, some available for use internally by NX and
- others for use by applications as well.
- Only those APIs intended for application usage are documented here
- See include/nuttx/nx/nxglib.h
for the full set of APIs;
- those APIs might be of interest if you are rendering directly into
- framebuffer or LCD memory.
-
- nxgl_mxpixel_t
.
- Holds one device pixel.
- NXGLIB will select the smallest size for the nxgl_mxpixel_t
- that just contains the pixel: byte
if 16, 24, and 32 resolution
- support is disabled, uint16_t
if 24, and 32 resolution
- support is disabled, or uint32_t
.
-
- nxgl_coord_t
.
- A given coordinate is limited to the screen height an width. If either
- of those values exceed 32,767 pixels, then the following will have to need
- to change:
-
-typedef int16_t nxgl_coord_t; -- -
- struct nxgl_point_s
. Describes a point on the display:
-
-struct nxgl_point_s -{ - nxgl_coord_t x; /* X position, range: 0 to screen width - 1 */ - nxgl_coord_t y; /* Y position, range: 0 to screen height - 1 */ -}; -- -
- struct nxgl_size_s
. Describes the size of a rectangular region.
-
-struct nxgl_size_s -{ - nxgl_coord_t w; /* Width in pixels */ - nxgl_coord_t h; /* Height in rows */ -}; -- -
- struct nxgl_rect_s
. Describes a positioned rectangle on the display.
-
-struct nxgl_rect_s -{ - struct nxgl_point_s pt1; /* Upper, left-hand corner */ - struct nxgl_point_s pt2; /* Lower, right-hand corner */ -}; -- -
- struct nxgl_run_s
.
- Describes a run, i.e., a horizontal line. Note that the start/end positions
- have fractional precision. This is necessary for good joining of trapezoids
- when a more complex shape is decomposed into trapezoids
-
-struct nxgl_run_s -{ - b16_t x1; /* Left X position, range: 0 to x2 */ - b16_t x2; /* Right X position, range: x1 to screen width - 1 */ - nxgl_coord_t y; /* Top Y position, range: 0 to screen height - 1 */ -}; -- -
- struct nxgl_trapezoid_s
.
- Describes a horizontal trapezoid on the display in terms the run at the
- top of the trapezoid and the run at the bottom
-
-struct nxgl_trapezoid_s -{ - struct nxgl_run_s top; /* Top run */ - struct nxgl_run_s bot; /* bottom run */ -}; -- -
nxgl_rgb2yuv()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -void nxgl_rgb2yuv(uint8_t r, uint8_t g, uint8_t b, uint8_t *y, uint8_t *u, uint8_t *v); --
- Description: - Convert 8-bit RGB triplet to 8-bit YUV triplet. -
- -nxgl_yuv2rgb()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -void nxgl_yuv2rgb(uint8_t y, uint8_t u, uint8_t v, uint8_t *r, uint8_t *g, uint8_t *b); --
- Description: - Convert 8-bit RGB triplet to 8-bit YUV triplet. -
- -nxgl_rectcopy()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -void nxgl_rectcopy(FAR struct nxgl_rect_s *dest, - FAR const struct nxgl_rect_s *src); --
- Description:
- This is essentially memcpy()
for rectangles. We don't do structure
- assignments because some compilers are not good at that.
-
nxgl_rectoffset()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -void nxgl_rectoffset(FAR struct nxgl_rect_s *dest, - FAR const struct nxgl_rect_s *src, - nxgl_coord_t dx, nxgl_coord_t dy); --
- Description: - Offset the rectangle position by the specified dx, dy values. -
- -nxgl_vectoradd()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -void nxgl_vectoradd(FAR struct nxgl_point_s *dest, - FAR const struct nxgl_point_s *v1, - FAR const struct nxgl_point_s *v2); --
- Description: - Add two 2x1 vectors and save the result to a third. -
- -nxgl_vectorsubtract()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -void nxgl_vectsubtract(FAR struct nxgl_point_s *dest, - FAR const struct nxgl_point_s *v1, - FAR const struct nxgl_point_s *v2); --
- Description:
- Add subtract vector v2
from vector v1
and return the result in vector dest.
-
nxgl_rectintersect()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -void nxgl_rectintersect(FAR struct nxgl_rect_s *dest, - FAR const struct nxgl_rect_s *src1, - FAR const struct nxgl_rect_s *src2); --
- Description: - Return the rectangle representing the intersection of the two rectangles. -
- -nxgl_rectunion()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -void nxgl_rectunion(FAR struct nxgl_rect_s *dest, - FAR const struct nxgl_rect_s *src1, - FAR const struct nxgl_rect_s *src2); --
- Description:
- Given two rectanges, src1
and src2
, return the larger rectangle that
- contains both, dest
.
-
nxgl_nonintersecting()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -nxgl_nonintersecting(FAR struct nxgl_rect_s result[4], - FAR const struct nxgl_rect_s *rect1, - FAR const struct nxgl_rect_s *rect2); --
- Description:
- Return the regions of rectangle rect1
that do not intersect with
- rect2
. This will four rectangles, some of which may be
- degenerate (and can be picked off with nxgl_nullrect()
).
-
nxgl_rectoverlap()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -bool nxgl_rectoverlap(FAR struct nxgl_rect_s *rect1, - FAR struct nxgl_rect_s *rect2); --
- Description: - Return true if the two rectangles overlap. -
- -nxgl_rectinside()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -bool nxgl_rectinside(FAR const struct nxgl_rect_s *rect, - FAR const struct nxgl_point_s *pt); --
- Description:
- Return true if the point pt
lies within rect
.
-
nxgl_rectsize()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -void nxgl_rectsize(FAR struct nxgl_size_s *size, - FAR const struct nxgl_rect_s *rect); --
- Description: - Return the size of the specified rectangle. -
- -nxgl_nullrect()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -bool nxgl_nullrect(FAR const struct nxgl_rect_s *rect); --
- Description: - Return true if the area of the retangle is <= 0. -
- -nxgl_runoffset()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -void nxgl_runoffset(FAR struct nxgl_run_s *dest, - FAR const struct nxgl_run_s *src, - nxgl_coord_t dx, nxgl_coord_t dy); --
- Description:
- Offset the run position by the specified dx
, dy
values.
-
nxgl_runcopy()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -void nxgl_runcopy(FAR struct nxgl_run_s *dest, - FAR const struct nxgl_run_s *src); --
- Description:
- This is essentially memcpy()
for runs. We don't do structure assignments
- because some compilers are not good at that.
-
nxgl_trapoffset()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -void nxgl_trapoffset(FAR struct nxgl_trapezoid_s *dest, - FAR const struct nxgl_trapezoid_s *src, - nxgl_coord_t dx, nxgl_coord_t dy); --
- Description:
- Offset the trapezoid position by the specified dx
, dy
values.
-
nxgl_trapcopy()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -void nxgl_trapcopy(FAR struct nxgl_trapezoid_s *dest, - FAR const struct nxgl_trapezoid_s *src); --
- Description:
- This is essentially memcpy()
for trapezoids. We don't do structure
- assignments because some compilers are not good at that.
-
nxgl_colorcopy
Function Prototype:
--#include <nuttx/nx/nxglib.h> -nxgl_colorcopy(nxgl_mxpixel_t dest[CONFIG_NX_NPLANES], - const nxgl_mxpixel_t src[CONFIG_NX_NPLANES]); --
- Description:
- This is essentially memcpy()
for colors. This does very little for us
- other than hide all of the conditional compilation for planar colors
- in one place.
-
nxgl_splitline
Function Prototype:
--#include <nuttx/nx/nxglib.h> -int nxgl_splitline(FAR struct nxgl_vector_s *vector, FAR struct nxgl_trapezoid_s *traps, - FAR struct nxgl_rect_s *rect, nxgl_coord_t linewidth); --
- Description: - In the general case, a line with width can be represented as a parallelogram with a triangle at the top and bottom. - Triangles and parallelograms are both degenerate versions of a trapezoid. - This function breaks a wide line into triangles and trapezoids. - This function also detects other degenerate cases: -
-y1 == y2
then the line is horizontal and is better represented as a rectangle.
- x1 == x2
then the line is vertical and also better represented as a rectangle.
- - Input parameters: -
-
vector
- traps
- rect
- - Returned value: -
-
- 0
: Line successfully broken up into three trapezoids.
- Values in traps[0]
, traps[1]
, and traps[2]
are valid.
-
- 1
: Line successfully represented by one trapezoid.
- Value in traps[1]
is valid.
-
- 2
: Line successfully represented by one rectangle.
- Value in rect
is valid
-
- <0
: On errors, a negated errno
value is returned.
-
-
nxgl_circlepts
-#include <nuttx/nx/nxglib.h> -void nxgl_circlepts(FAR const struct nxgl_point_s *center, nxgl_coord_t radius, - FAR struct nxgl_point_s *circle); --
- Description:
- Given a description of a circle, return a set of 16 points on the circumference of the circle.
- These points may then be used by nx_drawcircle()
or related APIs to draw a circle outline.
-
- Input parameters: -
-
center
- radius
- circle
- - Returned value: None -
- -nxgl_circletraps
-#include <nuttx/nx/nxglib.h> -oid nxgl_circletraps(FAR const struct nxgl_point_s *center, nxgl_coord_t radius, - FAR struct nxgl_trapezoid_s *circle); --
- Description:
- Given a description of a a circle, return 8 trapezoids that can be used to fill the circle by nx_fillcircle()
and other interfaces.
-
- Input parameters: -
-
center
- radius
- circle
- - Returned value: None -
- -
- The default server message queue name used by the
- nx_run()
macro:
-
-#define NX_DEFAULT_SERVER_MQNAME "/dev/nxs" -- -
- Mouse button bits: -
--#define NX_MOUSE_NOBUTTONS 0x00 -#define NX_MOUSE_LEFTBUTTON 0x01 -#define NX_MOUSE_CENTERBUTTON 0x02 -#define NX_MOUSE_RIGHTBUTTON 0x04 -- -
- The interface to the NX server is managed using a opaque handle: -
--typedef FAR void *NXHANDLE; -- -
- The interface to a specific window is managed using an opaque handle: -
--typedef FAR void *NXWINDOW; -- -
- These define callbacks that must be provided to
- nx_openwindow()
.
- In the multi-user model, these callbacks will be invoked as part of the
- processing performed by
- nx_eventhandler()
.
-
-struct nx_callback_s -{ - void (*redraw)(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, - bool more, FAR void *arg); - void (*position)(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, - FAR const struct nxgl_point_s *pos, - FAR const struct nxgl_rect_s *bounds, - FAR void *arg); -#ifdef CONFIG_NX_XYINPUT - void (*mousein)(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, - uint8_t buttons, FAR void *arg); -#endif -#ifdef CONFIG_NX_KBD - void (*kbdin)(NXWINDOW hwnd, uint8_t nch, FAR const uint8_t *ch, FAR void *arg); -#endif -}; -- -
redraw()
Callback Function Prototype:
--void redraw(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, - bool more, FAR void *arg); --
- Description: - NX requests that the client re-draw the portion of the window within - with rectangle. -
-- Input Parameters: -
hwnd
- nx_openwindow()
- or nx_requestbkgd()
- rect
- more
- arg
- nx_openwindow()
)
- - Returned Value: None -
- -position()
Callback Function Prototype:
--void position(NXWINDOW hwnd, FAR const struct nxgl_size_s *size, - FAR const struct nxgl_point_s *pos, - FAR const struct nxgl_rect_s *bounds, - FAR void *arg); --
- Description: - The size or position of the window has changed (or the window was - just created with zero size. -
-- Input Parameters: -
hwnd
- nx_openwindow()
- or nx_requestbkgd()
- size
- pos
- bounds
- arg
- nx_openwindow()
)
- - Returned Value: None -
- -mousein()
Callback Function Prototype:
--#ifdef CONFIG_NX_XYINPUT -void mousein(NXWINDOW hwnd, FAR const struct nxgl_point_s *pos, - uint8_t buttons, FAR void *arg); -#endif --
- Description: - New mouse data is available for the window -
-- Input Parameters: -
hwnd
- nx_openwindow()
- or nx_requestbkgd()
- pos
- buttons
- NX_MOUSE_*
definitions
- arg
- nx_openwindow()
)
- - Returned Value: None -
- -kbdin()
Callback Function Prototype:
--#ifdef CONFIG_NX_KBD -void (*kbdin)(NXWINDOW hwnd, uint8_t nch, FAR const uint8_t *ch, FAR void *arg); -#endif --
- Description: - New keyboard/keypad data is available for the window. -
-- Input Parameters: -
hwnd
- nx_openwindow()
- or nx_requestbkgd()
- nch
- ch
- arg
- nx_openwindow()
)
- - Returned Value: None -
- -nx_runinstance()
(and nx_run()
macro)Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -#ifdef CONFIG_NX_MULTIUSER -int nx_runinstance(FAR const char *mqname, FAR struct fb_vtable_s *fb); -#define nx_run(fb) nx_runinstance(NX_DEFAULT_SERVER_MQNAME, dev) -#endif --
- Description: - This is the server entry point. It does not return; the calling thread - is dedicated to supporting NX server. -
-
- NOTE that multiple instances of the NX server may run at the same time,
- with different callback and message queue names. nx_run()
is simply
- a macro that can be used when only one server instance is required. In
- that case, a default server name is used.
-
- Multiple user mode only! -
-- Input Parameters: -
mqname
- dev
-
- Returned Value:
- This function usually does not return. If it does return, it will
- return ERROR
and errno
will be set appropriately.
-
nx_connectinstance()
(and nx_connect()
macro)Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -#ifdef CONFIG_NX_MULTIUSER -NXHANDLE nx_connectinstance(FAR const char *svrmqname); -#define nx_connect(cb) nx_connectinstance(NX_DEFAULT_SERVER_MQNAME) -#endif --
- Description: - Open a connection from a client to the NX server. One one client - connection is normally needed per thread as each connection can host - multiple windows. -
-- NOTES: -
-nx_connect()
is simply a macro that can be used when only one
- server instance is required. In that case, a default server name
- is used.
- - Multiple user mode only! -
-- Input Parameters: -
svrmqname
- - Returned Value: -
-errno
is set appropriately.
-nx_open()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -#ifndef CONFIG_NX_MULTIUSER -NXHANDLE nx_open(FAR struct fb_vtable_s *dev); -#endif --
- 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()
.
-
- Single user mode only! -
-- Input Parameters: -
dev
- cb
- - Returned Value: -
-errno
is set appropriately.
-nx_disconnect()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -#ifdef CONFIG_NX_MULTIUSER -void nx_disconnect(NXHANDLE handle); -#endif --
- Description:
- Disconnect a client from the NX server and/or free resources reserved
- by nx_connect()
/nx_connectinstance()
.
- nx_disconnect()
is muliti-user equivalent of
- nx_close()
.
-
- Multiple user mode only! -
-- Input Parameters: -
handle
- nx_connect()
.
- - Returned Value: None. -
- -nx_close()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -#ifndef CONFIG_NX_MULTIUSER -void nx_close(NXHANDLE handle); -#endif --
- Description:
- Close the single user NX interface. nx_close is single-user equivalent
- of nx_disconnect()
.
-
- Single user mode only! -
-- Input Parameters: -
handle
- nx_open()
.
- - Returned Value: None -
- -nx_eventhandler()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -#ifdef CONFIG_NX_MULTIUSER -int nx_eventhandler(NXHANDLE handle); -#else -# define nx_eventhandler(handle) (OK) -#endif --
- Description:
- The client code must call this function periodically to process
- incoming messages from the server. If CONFIG_NX_BLOCKING
is defined,
- then this function not return until a server message is received.
-
- When CONFIG_NX_BLOCKING
is not defined, the client must exercise
- caution in the looping to assure that it does not eat up all of
- the CPU bandwidth calling nx_eventhandler repeatedly.
- nx_eventnotify()
- may be called to get a signal event whenever a new incoming server
- event is avaiable.
-
- Input Parameters: -
handle
- nx_connect()
.
- - Returned Value: -
-OK
: No errors occurred. If CONFIG_NX_BLOCKING
is defined,
- then one or more server messages were processed.
- ERROR
: An error occurred and errno
has been set appropriately.
- Of particular interest, it will return errno == EHOSTDOWN
when the
- server is disconnected. After that event, the handle can no longer be used.
- nx_eventnotify()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -#if defined(CONFIG_NX_MULTIUSER) && !defined(CONFIG_DISABLE_SIGNALS) -int nx_eventnotify(NXHANDLE handle, int signo); -#else -# define nx_eventnotify(handle, signo) (OK) -#endif --
- Description:
- Rather than calling nx_eventhandler()
periodically,
- the client may register to receive a signal when a server event is available.
- The client can then call nv_eventhandler()
only when
- incoming events are available.
-
- The underlying implementation used mq_notifiy()
and, as a result,
- the client must observe the rules for using mq_notifiy()
:
-
nx_eventnotify()
again.
- - Input Parameters: -
handle
- nx_connect()
.
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_openwindow()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -NXWINDOW nx_openwindow(NXHANDLE handle, - FAR const struct nx_callback_s *cb, - FAR void *arg); --
- Description: Create a new window. -
-- Input Parameters: -
handle
- nx_connect()
- or nx_open()
.
- cb
- arg
- - Returned Value: -
-errno
is set appropriately.
-nx_closewindow()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -int nx_closewindow(NXWINDOW hwnd); --
- Description:
- Destroy a window created by nx_openwindow()
window.
-
- Input Parameters: -
hwnd
- nx_openwindow()
- that identifies the window to be destroyed.
- This handle must not have been one returned by
- nx_requestbkgd()
.
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_requestbkgd()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -int nx_requestbkgd(NXHANDLE handle, - FAR const struct nx_callback_s *cb, - FAR void *arg); --
- 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: -
-CONFIG_NX_MULTIUSER
as well.
- - This API only requests the handle of the background window. That - handle will be returned asynchronously in a subsequent position and - redraw callbacks. -
-- Cautions: -
-nx_setposition()
,
- nx_setsize()
,
- nx_raise()
, or
- nx_lower()
.
- nx_requestbkgd()
nor
- nx_releasebkgd ()
should be called more than once.
- Multiple instances of the background window are not supported.
- - Input Parameters: -
handle
- nx_connect()
- or nx_open()
.
- cb
- arg
- nx_openwindow()
)
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_releasebkgd()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -int nx_releasebkgd(NXWINDOW hwnd); --
- Description:
- Release the background window previously acquired using
- nx_requestbkgd()
- and return control of the background to NX.
-
- Input Parameters: -
handle
- nx_requestbkgd()
.
- This handle must not have been one created by
- nx_openwindow()
.
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_getposition()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -int nx_getposition(NXWINDOW hwnd); --
- 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
- nx_openwindow()
or
- nx_requestbkgd()
.
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_setposition()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -int nx_setposition(NXWINDOW hwnd, FAR struct nxgl_point_s *pos); --
- Description: - Set the position and size for the selected window. -
-- Input Parameters: -
hwnd
- nx_openwindow()
.
- This handle must not have been created by
- nx_requestbkgd()
.
- pos
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_setsize()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -int nx_setsize(NXWINDOW hwnd, FAR struct nxgl_size_s *size); --
- Description: Set the size of the selected window. -
-- Input Parameters: -
hwnd
- nx_openwindow()
.
- This handle must not have been created by
- nx_requestbkgd()
.
- size
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_raise()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -int nx_raise(NXWINDOW hwnd); --
- Description: Bring the specified window to the top of the display. -
-- Input Parameters: -
hwnd
- nx_openwindow()
.
- This handle must not have been created by
- nx_requestbkgd()
.
-
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_lower()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -int nx_lower(NXWINDOW hwnd); --
- Description: Lower the specified window to the bottom of the display. -
-- Input Parameters: -
hwnd
- nx_openwindow()
.
- This handle must not have been created by
- nx_requestbkgd()
.
-
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_fill()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -int nx_fill(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, - nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); --
- Description: - Fill the specified rectangle in the window with the specified color. -
-- Input Parameters: -
hwnd
- nx_openwindow()
- or nx_requestbkgd()
- rect
- color
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_getrectangle()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -void nx_getrectangle(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, - unsigned int plane, FAR uint8_t *dest, - unsigned int deststride); --
- 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: -
hwnd
- nx_openwindow()
- or nx_requestbkgd()
- rect
- plane
- dest
- deststride
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_filltrapezoid()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -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]); --
- Description: - Fill the specified trapezoidal region in the window with the specified color. -
-- Input Parameters: -
hwnd
- nx_openwindow()
- or nx_requestbkgd()
- clip
- trap
- color
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_drawline()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -int nx_drawline(NXWINDOW hwnd, FAR struct nxgl_vector_s *vector, - nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES], - uint8_t caps); --
- Description:
- Fill the specified trapezoidal region in the window with the specified color.
- 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
- nx_openwindow()
- or nx_requestbkgd()
- vector
- width
- color
- caps
- -/* Line caps */ - -#define NX_LINECAP_NONE 0x00, /* No line caps */ -#define NX_LINECAP_PT1 0x01 /* Line cap on pt1 on of the vector only */ -#define NX_LINECAP_PT2 0x02 /* Line cap on pt2 on of the vector only */ -#define NX_LINECAP_BOTH 0x03 /* Line cap on both ends of the vector only */ -
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_drawcircle()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -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]); --
- Description: - Draw a circular outline using the specified line thickness and color. -
-- Input Parameters: -
hwnd
- nx_openwindow()
- or nx_requestbkgd()
- center
- radius
- width
- color
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_fillcircle()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -int nx_fillcircle(NXWINDOW hwnd, FAR const struct nxgl_point_s *center, - nxgl_coord_t radius, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); --
- Description: - Fill a circular region using the specified color. -
-- Input Parameters: -
hwnd
- nx_openwindow()
- or nx_requestbkgd()
- center
- radius
- color
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_setbgcolor()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -int nx_setbgcolor(NXHANDLE handle, - nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); --
- Description: Set the color of the background. -
-- Input Parameters: -
handle
- nx_openwindow()
- or nx_requestbkgd()
- color
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_move()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -int nx_move(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, - FAR const struct nxgl_point_s *offset); --
- Description: Move a rectangular region within the window. -
-- Input Parameters: -
hwnd
- nx_openwindow()
- or nx_requestbkgd()
that specifies
- the window within which the move is to be done
- rect
- offset
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_bitmap()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -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); --
- Description: - Copy a rectangular region of a larger image into the rectangle in the - specified window. -
-- Input Parameters: -
hwnd
- nx_openwindow()
- or nx_requestbkgd()
that specifies the
- window that will receive the bitmap image.
- dest
- src
- CONFIG_NX_NPLANES
(probably 1).
- origin
- stride
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_kbdin()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -#ifdef CONFIG_NX_KBD -int nx_kbdchin(NXHANDLE handle, uint8_t ch); -int nx_kbdin(NXHANDLE handle, uint8_t nch, FAR const uint8_t *ch); -#endif --
- 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. -
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nx_mousein()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> - -#ifdef CONFIG_NX_XYINPUT -int nx_mousein(NXHANDLE handle, nxgl_coord_t x, nxgl_coord_t y, uint8_t buttons); -#endif --
- 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. -
-- Input Parameters: -
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
NXTK
)- NXTK implements where the framed window. - NX framed windows consist of three components within one NX window: -
-- Each sub-window represents a region within one window. - Figure 1 shows some simple NX framed windows. - NXTK allows these sub-windows to be managed more-or-less independently: -
-nxtk_openwindow()
;
- Separate toolbar sub-window callbakcs are reigistered when the toolbar
- is added using nxtk_opentoolbar()
.
- (NOTES: (1) only the client sub-window receives keyboard input and,
- (2) border callbacks are not currently accessible by the user).
- NXTK Types()
- This is the handle that can be used to access the window data region. -
--typedef FAR void *NXTKWINDOW; -- -
nxtk_openwindow()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -NXTKWINDOW nxtk_openwindow(NXHANDLE handle, - FAR const struct nx_callback_s *cb, - FAR void *arg); --
- Description: Create a new, framed window. -
-- Input Parameters: -
handle
- nx_connect()
- or nx_open()
.
- cb
- arg
- nx_openwindow()
)
- - Returned Value: -
-errno
is set appropriately.
-nxtk_closewindow()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_closewindow(NXTKWINDOW hfwnd); --
- Description:
- Close the window opened by nxtk_openwindow()
.
-
- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_getposition()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_getposition(NXTKWINDOW hfwnd); --
- Description: - Request the position and size information for the selected framed window. - The size/position for the client window and toolbar will be return - asynchronously through the client callback function pointer. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_setposition()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_setposition(NXTKWINDOW hfwnd, FAR struct nxgl_point_s *pos); --
- Description: - Set the position for the selected client window. This position does not - include the offsets for the borders nor for any toolbar. Those offsets - will be added in to set the full window position. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
- pos
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_setsize()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_setsize(NXTKWINDOW hfwnd, FAR struct nxgl_size_s *size); --
- Description: - Set the size for the selected client window. This size does not - include the sizes of the borders nor for any toolbar. Those sizes - will be added in to set the full window size. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
- size
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_raise()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_raise(NXTKWINDOW hfwnd); --
- Description: - Bring the window containing the specified client sub-window to the top - of the display. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
- specifying the window to be raised.
-
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_lower()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_lower(NXTKWINDOW hfwnd); --
- Description: - Lower the window containing the specified client sub-window to the - bottom of the display. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
- specifying the window to be lowered.
-
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_fillwindow()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_fillwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect, - nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); --
- Description: - Fill the specified rectangle in the client window with the specified color. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
- rect
- color
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_getwindow()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -void nxtk_getwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect, - unsigned int plane, FAR uint8_t *dest, - unsigned int deststride); --
- 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: -
hfwnd
- nxtk_openwindow()
.
- rect
- plane
- dest
- deststride
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_filltrapwindow()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_filltrapwindow(NXTKWINDOW hfwnd, - FAR const struct nxgl_trapezoid_s *trap, - nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); --
- Description: - Fill the specified trapezoid in the client window with the specified color -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
- trap
- color
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_drawlinewindow()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_drawlinewindow(NXTKWINDOW hfwnd, FAR struct nxgl_vector_s *vector, - nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES], - uint8_t caps); --
- Description:
- Fill the specified trapezoidal region in the window with the specified color.
- 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 nxtk_filltrapwindow()
to render the line.
-
- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
- vector
- width
- color
- caps
- -/* Line caps */ - -#define NX_LINECAP_NONE 0x00, /* No line caps */ -#define NX_LINECAP_PT1 0x01 /* Line cap on pt1 on of the vector only */ -#define NX_LINECAP_PT2 0x02 /* Line cap on pt2 on of the vector only */ -#define NX_LINECAP_BOTH 0x03 /* Line cap on both ends of the vector only */ -
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_drawcirclewindow()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_drawcirclewindow(NXTKWINDOW hfwnd, FAR const struct nxgl_point_s *center, - nxgl_coord_t radius, nxgl_coord_t width, - nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); --
- Description: - Draw a circular outline using the specified line thickness and color. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
- center
- radius
- width
- color
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_fillcirclewindow()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_fillcirclewindow(NXWINDOW hfwnd, FAR const struct nxgl_point_s *center, - nxgl_coord_t radius, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); --
- Description: - Fill a circular region using the specified color. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
- center
- radius
- color
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_movewindow()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_movewindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect, - FAR const struct nxgl_point_s *offset); --
- Description: - Move a rectangular region within the client sub-window of a framed window. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
- specifying the client sub-window within which the move is to be done.
- rect
- offset
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_bitmapwindow()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_bitmapwindow(NXTKWINDOW hfwnd, - FAR const struct nxgl_rect_s *dest, - FAR const void *src[CONFIG_NX_NPLANES], - FAR const struct nxgl_point_s *origin, - unsigned int stride); --
- Description: - Copy a rectangular region of a larger image into the rectangle in the - specified client sub-window. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
- specifying the client sub-window that will receive the bitmap.
- dest
- src
- CONFIG_NX_NPLANES
(probably 1).
- origin
- stride
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_opentoolbar()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_opentoolbar(NXTKWINDOW hfwnd, nxgl_coord_t height, - FAR const struct nx_callback_s *cb, - FAR void *arg); --
- Description: - Create a tool bar at the top of the specified framed window. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
- height
- cb
- arg
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_closetoolbar()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_closetoolbar(NXTKWINDOW hfwnd); --
- Description: - Remove the tool bar at the top of the specified framed window. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
-
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_filltoolbar()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_filltoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect, - nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); --
- Description: - Fill the specified rectangle in the toolbar sub-window with the specified color. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
- rect
- color
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_gettoolbar()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_gettoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect, - unsigned int plane, FAR uint8_t *dest, - unsigned int deststride); --
- 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: -
hfwnd
- nxtk_openwindow()
.
- rect
- plane
- dest
- deststride
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_filltraptoolbar()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_filltraptoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_trapezoid_s *trap, - nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); --
- Description: - Fill the specified trapezoid in the toolbar sub-window with the specified color. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
- trap
- color
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_drawlinetoolbar()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_drawlinetoolbar(NXTKWINDOW hfwnd, FAR struct nxgl_vector_s *vector, - nxgl_coord_t width, nxgl_mxpixel_t color[CONFIG_NX_NPLANES], - uint8_t caps); - --
- Description:
- Fill the specified line in the toolbar sub-window with the specified color.
- This is simply a wrapper that uses nxgl_splitline()
to break the line into
- trapezoids and then calls nxtk_filltraptoolbar()
to render the line.
-
- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
- vector
- width
- color
- caps
- -/* Line caps */ - -#define NX_LINECAP_NONE 0x00, /* No line caps */ -#define NX_LINECAP_PT1 0x01 /* Line cap on pt1 on of the vector only */ -#define NX_LINECAP_PT2 0x02 /* Line cap on pt2 on of the vector only */ -#define NX_LINECAP_BOTH 0x03 /* Line cap on both ends of the vector only */ -
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_drawcircletoolbar()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_drawcircletoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_point_s *center, - nxgl_coord_t radius, nxgl_coord_t width, - nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); --
- Description: - Draw a circular outline using the specified line thickness and color. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
- center
- radius
- width
- color
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_fillcircletoolbar()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_fillcircletoolbar(NXWINDOW hfwnd, FAR const struct nxgl_point_s *center, - nxgl_coord_t radius, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); --
- Description: - Fill a circular region using the specified color. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
- center
- radius
- color
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_movetoolbar()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_movetoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect, - FAR const struct nxgl_point_s *offset); --
- Description: - Move a rectangular region within the toolbar sub-window of a framed window. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
- rect
- offset
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
nxtk_bitmaptoolbar()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nx.h> -#include <nuttx/nx/nxtk.h> - -int nxtk_bitmaptoolbar(NXTKWINDOW hfwnd, - FAR const struct nxgl_rect_s *dest, - FAR const void *src[CONFIG_NX_NPLANES], - FAR const struct nxgl_point_s *origin, - unsigned int stride); --
- Description: - Copy a rectangular region of a larger image into the rectangle in the - specified toolbar sub-window. -
-- Input Parameters: -
hfwnd
- nxtk_openwindow()
.
- dest
- src
- origin
- stride
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately
-
NXFONTS
)NXFONTS Types()
- This structures provides the metrics for one glyph: -
--struct nx_fontmetric_s -{ - uint32_t stride : 2; /* Width of one font row in bytes */ - uint32_t width : 6; /* Width of the font in bits */ - uint32_t height : 6; /* Height of the font in rows */ - uint32_t xoffset : 6; /* Top, left-hand corner X-offset in pixels */ - uint32_t yoffset : 6; /* Top, left-hand corner y-offset in pixels */ - uint32_t unused : 6; -}; -- -
- This structure binds the glyph metrics to the glyph bitmap: -
--struct nx_fontbitmap_s -{ - struct nx_fontmetric_s metric; /* Character metrics */ - FAR const uint8_t *bitmap; /* Pointer to the character bitmap */ -}; -- -
- This structure describes one contiguous grouping of glyphs that
- can be described by an array starting with encoding first
and
- extending through (first
+ nchars
- 1).
-
-struct nx_fontset_s -{ - uint8_t first; /* First bitmap character code */ - uint8_t nchars; /* Number of bitmap character codes */ - FAR const struct nx_fontbitmap_s *bitmap; -}; -- -
- This structure describes the overall fontset: -
--struct nx_font_s -{ - uint8_t mxheight; /* Max height of one glyph in rows */ - uint8_t mxwidth; /* Max width of any glyph in pixels */ - uint8_t mxbits; /* Max number of bits per character code */ - uint8_t spwidth; /* The width of a space in pixels */ -}; -- -
nxf_getfonthandle()
Function Prototype:
--#include <nuttx/nx/nxfonts.h> - -NXHANDLE nxf_getfonthandle(enum nx_fontid_e fontid); --
- Description: - Given a numeric font ID, return a handle that may be subsequently be used to access the font data sets. -
-- Input Parameters: -
fontid
- - Returned Value: - A handle that may be subsequently be used to access the font data sets. -
- -nxf_getfontset()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nxfonts.h> - -FAR const struct nx_font_s *nxf_getfontset(NXHANDLE handle); --
- Description: - Return information about the current font set. -
-- Input Parameters: -
handle
- nxf_getfonthandle()
.
-
- Returned Value:
- An instance of struct nx_font_s
describing the font set.
-
nxf_getbitmap()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nxfonts.h> - -FAR const struct nx_fontbitmap_s *nxf_getbitmap(NXHANDLE handle, uint16_t ch); --
- Description: - Return font bitmap information for the selected character encoding. -
-- Input Parameters: -
ch
- handle
- nxf_getfonthandle()
.
-
- Returned Value:
- An instance of struct nx_fontbitmap_s
describing the glyph.
-
nxf_convert_*bpp()
Function Prototype:
--#include <nuttx/nx/nxglib.h> -#include <nuttx/nx/nxfonts.h> - -int nxf_convert_2bpp(FAR uint8_t *dest, uint16_t height, - uint16_t width, uint16_t stride, - FAR const struct nx_fontbitmap_s *bm, - nxgl_mxpixel_t color); -int nxf_convert_4bpp(FAR uint8_t *dest, uint16_t height, - uint16_t width, uint16_t stride, - FAR const struct nx_fontbitmap_s *bm, - nxgl_mxpixel_t color); -int nxf_convert_8bpp(FAR uint8_t *dest, uint16_t height, - uint16_t width, uint16_t stride, - FAR const struct nx_fontbitmap_s *bm, - nxgl_mxpixel_t color); -int nxf_convert_16bpp(FAR uint16_t *dest, uint16_t height, - uint16_t width, uint16_t stride, - FAR const struct nx_fontbitmap_s *bm, - nxgl_mxpixel_t color); -int nxf_convert_24bpp(FAR uint32_t *dest, uint16_t height, - uint16_t width, uint16_t stride, - FAR const struct nx_fontbitmap_s *bm, - nxgl_mxpixel_t color); -int nxf_convert_32bpp(FAR uint32_t *dest, uint16_t height, - uint16_t width, uint16_t stride, - FAR const struct nx_fontbitmap_s *bm, - nxgl_mxpixel_t color); --
- Description: Convert the 1BPP font to a new pixel depth. -
-- Input Parameters: -
dest
- height
- width
- stride
- bm
- color
-
- Returned Value:
- OK
on success;
- ERROR
on failure with errno
set appropriately.
-
apps/examples/nx*
.
- No sample code is provided in this document.
- However, examples can be found in the NuttX source tree at the follow locations:
- That example code is intended to test NX.
- Since it is test code, it is designed to exercise functionality and does not necessarily represent best NX coding practices.
-
apps/examples/nx
.
- This is a test of windows, optionally with toolbars.
- Two windows are created, re-sized, moved, raise lowered.
- Simulated mouse and keyboard input is provided.
- apps/examples/nxhello
.
- This is intended to be simplest NX test:
- It simply displays the words "Hello, World!" centered on the display.
- apps/examples/nxtext
.
- This illustrates how fonts may be managed to provide scrolling text windows.
- Pop-up windows are included to verify the clipping and re-drawing of the text display.
- - In its current form, the NX graphics system provides a low level of graphics and window - support. - Most of the complexity of manage redrawing and handling mouse and keyboard events must - be implemented by the NX client code. -
- -Building apps/examples/nx
.
- Testing was performed using the Linux/Cygwin-based NuttX simulator.
- Instructions are provided for building that simulation are provided in
- Appendix C of this document.
-
- Appendix A
- |
-
- 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.
- The directory nuttx/graphics
contains only those components that are internal to the RTOS.
-
- User callable functions must 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
- graphics/nxglib
and libnx/nxglib
- graphics/nxbe
- nxmu
and nxsu
below).
- It contains most of the important window management logic: clipping, window controls,
- window drawing, etc.
-
- graphics/nxsu
1
- nxbe
), it implements a
- single threaded, single user windowing system.
- The files in this directory present the window APIs described in
- include/nuttx/nx/nx.h
.
- The single user front-end is selected when CONFIG_NX_MULTIUSER
is not
- defined in the NuttX configuration file.
-
- graphics/nxmu
and libnx/nxmu
- nxbe
), it implements a
- multi-threaded, multi-user windowing system.
- The files in this directory present the window APIs described in
- include/nuttx/nx/nx.h
.
- The multi-user front end includes a graphics 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 when CONFIG_NX_MULTIUSER
is defined
- in the NuttX configuration file.
-
- libnx/nxfonts
- include/nuttx/nx/nxfonts.h
.
-
- libnx/nxtk
- include/nuttx/nx/nxtk.h
.
-
- nuttx/../nxwidgets
- graphics/nxterm
- include/nuttx/nx/nxterm.h
.
-
- 1
- Appendix B NX Configuration Options- |
-
CONFIG_NX
- Enables overall support for graphics library and NX
- CONFIG_NX_NPLANES
:
- 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
:
- CONFIG_NX_PACKEDMSFIRST
:
- CONFIG_NX_LCDDRIVER
:
- include/nuttx/video/fb.h
).
- If this option is defined, NX will build to use an LCD driver (see include/nuttx/lcd/lcd.h
).
-
- CONFIG_NX_XYINPUT
:
- CONFIG_NX_KBD
:
- CONFIG_NX_WRITEONLY
:
- CONFIG_NX_LCDDRIVER
and CONFIG_LCD_NOGETRUN
- are defined.
- CONFIG_NX_MULTIUSER
:
- CONFIG_NX_BLOCKING
- nx_eventhandler()
will not return until a message is received and processed.
- CONFIG_NX_MXSERVERMSGS
and CONFIG_NX_MXCLIENTMSGS
- CONFIG_PREALLOC_MQ_MSGS
controls how many
- messages are pre-allocated).
- CONFIG_NXTK_BORDERWIDTH
:
- CONFIG_NXTK_BORDERCOLOR1
, CONFIG_NXTK_BORDERCOLOR2
, and CONFIG_NXTK_BORDERCOLOR3
:
- CONFIG_NXTK_BORDERCOLOR2
- CONFIG_NXTK_BORDERCOLOR3
- CONFIG_NXTK_AUTORAISE
:
- CONFIG_NXFONTS_CHARBITS
:
- CONFIG_NXFONT_SANS17X22
:
- ID FONTID_SANS17X22
== 14).
- CONFIG_NXFONT_SANS20X26
:
- ID FONTID_SANS20X26
== 15).
- CONFIG_NXFONT_SANS23X27
:
- ID FONTID_SANS23X27
== 1).
- CONFIG_NXFONT_SANS22X29
:
- ID FONTID_SANS22X29
== 2).
- CONFIG_NXFONT_SANS28X37
:
- ID FONTID_SANS28X37
== 3).
- CONFIG_NXFONT_SANS39X48
:
- ID FONTID_SANS39X48
== 4).
- CONFIG_NXFONT_SANS17X23B
:
- ID FONTID_SANS17X23B
== 16).
- CONFIG_NXFONT_SANS20X27B
:
- ID FONTID_SANS20X27B
== 17).
- CONFIG_NXFONT_SANS22X29B
:
- FONTID_SANS22X29B
== 5).
- CONFIG_NXFONT_SANS28X37B
:
- FONTID_SANS28X37B
== 6).
- CONFIG_NXFONT_SANS40X49B
:
- FONTID_SANS40X49B
== 7).
- CONFIG_NXFONT_SERIF22X29
:
- FONTID_SERIF22X29
== 8).
- CONFIG_NXFONT_SERIF29X37
:
- FONTID_SERIF29X37
== 9).
- CONFIG_NXFONT_SERIF38X48
:
- FONTID_SERIF38X48
== 10).
- CONFIG_NXFONT_SERIF22X28B
:
- FONTID_SERIF22X28B
== 11).
- CONFIG_NXFONT_SERIF27X38B
:
- FONTID_SERIF27X38B
== 12).
- CONFIG_NXFONT_SERIF38X49B
:
- FONTID_SERIF38X49B
== 13).
- General NxTerm settings.
-CONFIG_NXTERM
:
- NxTerm output text/graphics options:
-CONFIG_NXTERM_BPP
:
- CONFIG_NX_DISABLE_*BPP
)
- CONFIG_NXTERM_CURSORCHAR
:
- CONFIG_NXTERM_MXCHARS
:
- CONFIG_NXTERM_CACHESIZE
:
- CONFIG_NXTERM_CACHESIZE
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.
- - NOTE: There can still be a race condition between the NxTerm driver and the - NX task. If you every see character corruption (especially when printing - a lot of data or scrolling), then increasing the value of-CONFIG_NXTERM_CACHESIZE
- is something that you should try. - Alternatively, you can reduce the size ofCONFIG_MQ_MAXMSGSIZE
which will force NxTerm task to pace the server task. -CONFIG_NXTERM_CACHESIZE
should be larger thanCONFIG_MQ_MAXMSGSIZE
in any event. -
CONFIG_NXTERM_LINESEPARATION
:
- CONFIG_NXTERM_NOWRAP
:
- NxTerm input options:
-CONFIG_NXTERM_NXKBDIN
:
- /dev/console
).
- If this option is set, then the interfacenxterm_kdbin()
is enabled.
- That interface may be driven by window callback functions so that keyboard input only goes to the top window.
- CONFIG_NXTERM_KBDBUFSIZE
:
- CONFIG_NXTERM_NXKBDIN
is enabled, then this value may be used to
- define the size of the per-window keyboard input buffer. Default: 16
- CONFIG_NXTERM_NPOLLWAITERS
:
-
- Appendix C Installing New Fonts- |
-
The BDF Font Converter.
- There is a tool called bdf-converter in the directory tools/.
.
- The bdf-converter program be used to convert fonts in Bitmap Distribution Format (BDF) into fonts that can be used in the NX graphics system.
- The BDF format most well known as a font format traditionally used for X-11 bitmap fonts.
-
- A Note about Font Copyrights: - My understanding is that the underlying bitmap font data for traditional fonts cannot be copyrighted (the same is not true for scalable fonts). - This is because a copyright covers only the form of delivery of the font and not the underlying font content and, at least for the traditional typefaces, the underlying font designs are ancient. - There could be issues, however, if you convert from modern, trademarked images. - However, remember that I am a programmer not an attorney and that my knowledge of font copyright issues is limited to what I glean by Googling. --
- Font Installation Steps, - Below are general instructions for creating and installing a new font in the NX graphic system. - The first two steps only appy if you are using the BDF font converter program. -
-- Locate a font in BDF format. - There are many good BDF bitmap fonts bundled with X-11. - See this link, as an example, -
-
- Use the bdf-converter program to convert the BDF font to the NuttX font format.
- This will result in a C header file containing definitions.
- That header file should be installed at, for example, graphics/nxfonts/nxfonts_myfont.h
.
-
- The remaining steps apply however you managed to create the NuttX C font header file.
- After you have your C font header file, the next thing to do is to create a new NuttX configuration variable to select the font.
- For example, suppose you define the following variable: CONFIG_NXFONT_MYFONT
.
- Then you would need to:
-
- Define CONFIG_NXFONT_MYFONT=y
in your NuttX configuration file.
-
- A font ID number has to be assigned for each new font.
- The font IDs are defined in the file include/nuttx/nx/nxfonts.h
.
- Those definitions have to be extended to support your new font.
- Look at how the font ID enabled by CONFIG_NXFONT_SANS23X27
is defined and add an ID for yournew font in a similar fashion:
-
- include/nuttx/nx/nxfonts.h
. Add you new font as a possible system default font:
-
-#if defined(CONFIG_NXFONT_SANS23X27) -# define NXFONT_DEFAULT FONTID_SANS23X27 -#elif defined(CONFIG_NXFONT_MYFONT) -# define NXFONT_DEFAULT FONTID_MYFONT -#endif --
- Then define the actual font ID. - Make sure that the font ID value is unique: -
--enum nx_fontid_e -{ - FONTID_DEFAULT = 0 /* The default font */ -#ifdef CONFIG_NXFONT_SANS23X27 - , FONTID_SANS23X27 = 1 /* The 23x27 sans serif font */ -#endif -#ifdef CONFIG_NXFONT_MYFONT - , FONTID_MYFONT = 2 /* My shiny, new font */ -#endif -... --
- New Add the font to the NX build system. - There are several files that you have to modify to to this. - Look how the build system uses the font CONFIG_NXFONT_SANS23X27 for examaples: -
-
- nuttx/graphics/Makefile
.
- This file needs logic to auto-generate a C source file from the header file that you generated with the bdf-converter program.
- Notice NXFONTS_FONTID=2
; this must be set to the same font ID value that you defined in the include/nuttx/nx/nxfonts.h
file.
-
-genfontsources: - ifeq ($(CONFIG_NXFONT_SANS23X27),y) - @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=1 EXTRADEFINES=$(EXTRADEFINES) - endif - ifeq ($(CONFIG_NXFONT_MYFONT),y) - @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=2 EXTRADEFINES=$(EXTRADEFINES) - endif --
- nuttx/graphics/nxfonts/Make.defs
.
- Set the make variable NXFSET_CSRCS
.
- NXFSET_CSRCS
determines the name of the font C file to build when NXFONTS_FONTID=2
:
-
-ifeq ($(CONFIG_NXFONT_SANS23X27),y) -NXFSET_CSRCS += nxfonts_bitmaps_sans23x27.c -endif -ifeq ($(CONFIG_NXFONT_MYFONT),y) -NXFSET_CSRCS += nxfonts_bitmaps_myfont.c -endif --
- nuttx/graphics/nxfonts/Makefile.sources
.
- This is the Makefile used in step 5 that will actually generate the font C file.
- So, given your NXFONTS_FONTID=2, it needs to determine a prefix to use for auto-generated variable and function names and (again) the name of the autogenerated file to create (this must be the same name that was used in nuttx/graphics/nxfonts/Make.defs
):
-
-ifeq ($(NXFONTS_FONTID),1) -NXFONTS_PREFIX := g_sans23x27_ -GEN_CSRC = nxfonts_bitmaps_sans23x27.c -endif -ifeq ($(NXFONTS_FONTID),2) -NXFONTS_PREFIX := g_myfont_ -GEN_CSRC = nxfonts_bitmaps_myfont.c -endif --
- graphics/nxfonts/nxfonts_bitmaps.c
.
- This is the file that contains the generic font structures.
- It is used as a "template&qout; file by nuttx/graphics/nxfonts/Makefile.sources
to create your customized font data set at build time.
-
-#if NXFONTS_FONTID == 1 -# include "nxfonts_sans23x27.h" -#elif NXFONTS_FONTID == 2 -# include "nxfonts_myfont.h" -#else -# error "No font ID specified" -#endif --
- Where nxfonts_myfont.h
is the NuttX font file that we generated in
- step 2 using the bdf-converter tool.
-
- graphics/nxfonts/nxfonts_getfont.c
.
- Finally, we need to extend the logic that does the run-time font lookups so that can find our new font.
- The lookup function is NXHANDLE nxf_getfonthandle(enum nx_fontid_e fontid)
.
- Note that the lookup is based on the font ID that was defined in step 4.
- The new font information needs to be added to data structures used by that function:
-
-#ifdef CONFIG_NXFONT_SANS23X27 -extern const struct nx_fontpackage_s g_sans23x27_package; -#endif -#ifdef CONFIG_NXFONT_MYFONT -extern const struct nx_fontpackage_s g_myfont_package; -#endif - -static FAR const struct nx_fontpackage_s *g_fontpackages[] = -{ -#ifdef CONFIG_NXFONT_SANS23X27 - &g_sans23x27_package, -#endif -#ifdef CONFIG_NXFONT_MYFONT - &g_myfont_package, -#endif - NULL -}; --
- Appendix D NX Test Coverage- |
-
apps/examples/nx
.
- The primary test tool for debugging NX resides at apps/examples/nx
.
-
Building apps/examples/nx
.
- NX testing was performed using apps/examples/nx
with the
- Linux/Cygwin-based NuttX simulator.
- Configuration files for building this test can be found in configs/sim/nx
- and configs/sim/nx11
.
- There are two alternative configurations for building the simulation:
-
configs/sim/nx/defconfig
.
- This default configuration exercises the NX logic a 8 BPP but provides no visual feedback.
- In this configuration, a very simple, simulated framebuffer driver is used that is
- based upon a simple region of memory posing as video memory.
- That default configuration can be built as follows:
--cd <NuttX-Directory>/tools -./configure sim/nx -cd <NuttX-Directory> -make -./nuttx --
- The preferred configuration is at configs/sim/nx11/defconfig
.
- This configuration extends the test with a simulated framebuffer driver
- that uses an X window as a framebuffer.
- This is a superior test configuration because the X window appears at your desktop
- and you can see the NX output.
- This preferred configuration can be built as follows:
-
-cd <NuttX-Directory>/tools -./configure sim/nx11 -cd <NuttX-Directory> -make -./nuttx --
- Update: - The sim target has suffered some bit-rot over the years and so the following caveats need to be added: -
- The X target builds under recent Cygwin configurations, but does not execute.
- (It fails inside of XOpenDisplay()
.
-
- The X target does not build under current (9.09) Ubuntu distributions. - I needed to make the following changes: -
-- The build will also fail to locate the X header files unless you install an X11 development package. -
- The sim target itself is broken under 64-bit Linux. - This is because the sim target is based upon some assembly language setjmp/longjmp logic that only works on 32-bit systems. -
-
- NOTE: There is a workaround in this case:
- You can build for 32-bit execution on a 64-bit machine by adding -m3
to the CFLAGS
and -m32 -m elf_i386
to the LDFLAGS
.
- See the patch file 0001-Quick-hacks-to-build-sim-nsh-ostest-on-x86_64-as-32-.patch
- that can be found in NuttX files.
-
- Refer to the readme file in sim configuration - README.txt file for additional information. -
Test Coverage.
- At present, apps/examples/nx
t only exercises a subset of NX;
- the remainder is essentially untested.
- The following table describes the testing performed on each NX API:
-
Function | -Special Setup/Notes | -Verified |
---|---|---|
nxgl_rgb2yuv() |
- NO | -|
nxgl_yuv2rgb() |
- NO | -|
nxgl_rectcopy() |
- YES | -|
nxgl_rectoffset() |
- YES | -|
nxgl_vectoradd() |
- YES | -|
nxgl_vectorsubtract() |
- YES | -|
nxgl_rectintersect() |
- YES | -|
nxgl_rectunion() |
- YES | -|
nxgl_nonintersecting() |
- YES | -|
nxgl_rectoverlap() |
- YES | -|
nxgl_rectinside() |
- YES | -|
nxgl_rectsize() |
- YES | -|
nxgl_nullrect() |
- YES | -|
nxgl_runoffset() |
-
- Verified by apps/examples/nxlines .
- |
- YES | -
nxgl_runcopy() |
- NO | -|
nxgl_trapoffset() |
-
- Verified by apps/examples/nxlines .
- |
- YES | -
nxgl_trapcopy() |
-
- Verified by apps/examples/nxlines .
- |
- YES | -
nxgl_colorcopy |
- YES | -|
nxgl_splitline |
-
- Verified using apps/examples/nxlines .
- Generally works well, but has some accuracy/overflow problems wide lines
- that are nearly horizontal.
- There is a "fudge factor" that seems to eliminate the problem,
- but there could still be issues in some configurations.
- |
- YES | -
nxgl_circlepts |
-
- Verified by apps/examples/nxlines .
- |
- YES | -
nxgl_circletraps |
-
- Verified by apps/examples/nxlines .
- |
- YES | -
Function | -Special Setup/Notes | -Verified |
---|---|---|
redraw() |
- YES | -|
position() |
- YES | -|
mousein() |
- YES | -|
kbdin() |
- YES | -
Function | -Special Setup/Notes | -Verified |
---|---|---|
nx_runinstance() |
- Change to CONFIG_NX_MULTIUSER=y in the
- <NuttX-Directory>/.config file |
- YES | -
nx_connectinstance() |
- Change to CONFIG_NX_MULTIUSER=y in the
- <NuttX-Directory>/.config file |
- YES | -
nx_open() |
- YES | -|
nx_disconnect() |
- Change to CONFIG_NX_MULTIUSER=y in the
- <NuttX-Directory>/.config file |
- YES | -
nx_close() |
- YES | -|
nx_eventhandler() |
- Change to CONFIG_NX_MULTIUSER=y in the
- <NuttX-Directory>/.config file |
- YES | -
nx_eventnotify() |
- This is not used in the current version of apps/examples/nx ,
- was tested in a previous version) |
- NO | -
nx_openwindow() |
- Change to CONFIG_EXAMPLES_NX_RAWWINDOWS=y in the
- <NuttX-Directory>/.config file |
-
- YES | -
nx_closewindow() |
- Change to CONFIG_EXAMPLES_NX_RAWWINDOWS=y in the
- <NuttX-Directory>/.config file |
- YES | -
nx_requestbkgd() |
-
- Verified by apps/examples/nxtext and apps/examples/nxhello .
- |
- YES | -
nx_releasebkgd() |
-
- Verified by apps/examples/nxtext and apps/examples/nxhello .
- |
- YES | -
nx_getposition() |
- NO | -|
nx_setposition() |
- Change to CONFIG_EXAMPLES_NX_RAWWINDOWS=y in the
- <NuttX-Directory>/.config file |
- YES | -
nx_setsize() |
- Change to CONFIG_EXAMPLES_NX_RAWWINDOWS=y in the
- <NuttX-Directory>/.config file |
- YES | -
nx_raise() |
- Change to CONFIG_EXAMPLES_NX_RAWWINDOWS=y in the
- <NuttX-Directory>/.config file |
- YES | -
nx_lower() |
- Change to CONFIG_EXAMPLES_NX_RAWWINDOWS=y in the
- <NuttX-Directory>/.config file |
- YES | -
nx_fill() |
- Change to CONFIG_EXAMPLES_NX_RAWWINDOWS=y in the
- <NuttX-Directory>/.config file |
- YES | -
nx_getrectangle() |
- YES | -|
nx_filltrapezoid() |
-
- Verified by apps/examples/nxlines .
- |
- YES | -
nx_drawline() |
-
- Verified by apps/examples/nxlines .
- |
- YES | -
nx_drawcircle() |
-
- Verified by apps/examples/nxlines .
- |
- YES | -
nx_fillcircle() |
-
- Verified by apps/examples/nxlines .
- |
- YES | -
nx_setbgcolor() |
- YES | -|
nx_move() |
- Change to CONFIG_EXAMPLES_NX_RAWWINDOWS=y in the
- <NuttX-Directory>/.config file |
- YES | -
nx_bitmap() |
- Change to CONFIG_EXAMPLES_NX_RAWWINDOWS=y in the
- <NuttX-Directory>/.config file. |
- YES | -
nx_kbdin() |
- YES | -|
nx_mousein() |
- YES | -
Function | -Special Setup/Notes | -Verified |
---|---|---|
nxtk_openwindow() |
- YES | -|
nxtk_closewindow() |
- YES | -|
nxtk_getposition() |
- NO | -|
nxtk_setposition() |
- YES | -|
nxtk_setsize() |
- YES | -|
nxtk_raise() |
- YES | -|
nxtk_lower() |
- YES | -|
nxtk_fillwindow() |
- YES | -|
nxtk_getwindow() |
- NO | -|
nxtk_filltrapwindow() |
- NO | -|
nxtk_drawlinewindow() |
- YES | -|
nxtk_drawcirclewindow() |
- YES | -|
nxtk_fillcirclewindow() |
- YES | -|
nxtk_movewindow() |
- NO | -|
nxtk_bitmapwindow() |
- YES | -|
nxtk_opentoolbar() |
- YES | -|
nxtk_closetoolbar() |
- YES | -|
nxtk_filltoolbar() |
- YES | -|
nxtk_gettoolbar() |
- NO | -|
nxtk_filltraptoolbar() |
- NO | -|
nxtk_drawlinetoolbar() |
- NO | -|
nxtk_drawcircletoolbar() |
- NO | -|
nxtk_fillcircletoolbar() |
- NO | -|
nxtk_movetoolbar() |
- NO | -|
nxtk_bitmaptoolbar() |
- NO | -
Function | -Special Setup/Notes | -Verified |
---|---|---|
nxf_getfonthandle() |
- YES | -|
nxf_getfontset() |
- YES | -|
nxf_getbitmap() |
- YES | -|
nxf_convert_2bpp() |
- NO | -|
nxf_convert_4bpp() |
- NO | -|
nxf_convert_8bpp() |
- Use defconfig when building. |
- YES | -
nxf_convert_16bpp() |
- YES | -|
nxf_convert_24bpp() |
- NO | -|
nxf_convert_32bpp() |
- YES | -
+kP?Za?Wfmt+EdwLr=s7Bl7@MnJIxj)7oZ0i7ya`HvT8pI6YwI zv9l_8=6=eJ@%4VuQdXBa{@;2Osqq-l$bNGYC@b$wU!pR7W8X1qiZc*y0n@lPhotmkZO@yc)irb z!~K!e{p)(!)_N#jQOU)6eHW|6V~kWqX;j~OL)S*;%eU;Nvg$`?O3Us~f}5 Qx6Lb6N#szcMg}GFr4FIX zea9HT$?CGhTm$8PFAj23At;ng%7_RlLZJYwbr?v)AP~+2`7&H)^j1|6t{S;P 5OQDO9d$CN<`F4;aS$ON$ZV0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$)vIDPt6JSESG(%fuYxtKVjU}4%WBrMqBX5*T`ODL>ejcyHLh}< zD_!eq*Sq31uX^1pU;FCUzXCR}f)#8)001HX3sY1 - - NFS Client How-To - - -
- --
-- -- -NFS Client How-To
-Last Updated: June 18, 2012
-
- --
- -- -- -Table of Contents
-- - -
- -- --
-- -- - Adding NFS to the NuttX Configuration - --
-- -- - Mount Interface - --
-- -- - NFS Mount Command - --
-- -- - Configuring the NFS server (Ubuntu) - --
- -- -- -Adding NFS to the NuttX Configuration
-- The NFS client is easily added to your configuration: - You simply need to add
-CONFIG_NFS
to yournuttx/.config
file. - There are, however, a few dependencies on other system settings: --
- -- - First, there are number of things that you must configure in order to be able to use any file system: -
--
-- -
-CONFIG_NFILE_DESCRIPTORS > 0
. You must include support for file descriptors. -- -
-CONFIG_DISABLE_MOUNTPOINT=n
. You must include support for mount points in the pseudo-file system. -- - And there are several dependencies on the networking configuration. - At a minimum, you need to have the following selections: -
--
-- -
-CONFIG_NET=y
. General networking support. -- -
-CONFIG_NET_UDP=y
. Support for UDP. --
- -- -- -Mount Interface
-- A low-level, C-callable interface is provided to mount a file system. - That interface is called
-mount()
and is mentioned in theporting guide
and is prototyped in the header fileinclude/sys/mount.h
: --int mount(const char *source, const char *target, const char *filesystemtype, unsigned long mountflags, const void *data); --- Synopsis: -
-mount()
attaches the filesystem specified by thesource
block device name into the root file system at the path specified bytarget
. -- Input Paramters: -
-
-source
. A null-terminated string providing the fill path to a block driver in the NuttX pseudo-file system. -target
. The location in the NuttX pseudo-file system where the volume will be mounted. -filesystemtype
. A string identifying the type of file system to use. -mountflags
. Various flags that can be used to qualify how the file system is mounted. -data
. Opaque data that is passed to the file system with the mount occurs. -- Returned Values - Zero is returned on success; -1 is returned on an error and
errno
is set appropriately: --
- -- -
EACCES
. - A component of a path was not searchable or mounting a read-onlyfilesystem was attempted without giving theMS_RDONLY
flag. -- -
EBUSY
. -source
is already mounted. -- -
EFAULT
. - One of the pointer arguments points outside the user address space. -- -
EINVAL
. -source
had an invalid superblock. -- -
ENODEV
. -filesystemtype
not configured -- -
ENOENT
. - A pathname was empty or had a nonexistent component. -- -
ENOMEM
. - Could not allocate a memory to copy filenames or data into. -- -
ENOTBLK
. -source
is not a block device -- This same interface can be used to mount a remote, NFS file system using some special parameters. - The NFS mount differs from the normal file system mount in that: (1) there is no block driver for the NFS file system, and (2) special parameters must be passed as
-data
to describe the remote NFS server. - Thus the following code snippet might represent how an NFS file system is mounted: --#include <sys/mount.h> -#include <nuttx/fs/nfs.h> - -struct nfs_args data; -char *mountpoint; - -ret = mount(NULL, mountpoint, string "nfs", 0, (FAR void *)&data); --- NOTE that: (1) the block driver parameter is
-NULL
. - Themount()
is smart enough to know that no block driver is needed with the NFS file system. - (2) The NFS file system is identified with the simple string "nfs" - (3) A reference tostruct nfs_args
is passed as an NFS-specific argument. -- The NFS-specific interface is described in the file
-include/nuttx/fs/nfs.h
. - There you can see thatstruct nfs_args
is defined as: --struct nfs_args -{ - uint8_t addrlen; /* Length of address */ - uint8_t sotype; /* Socket type */ - uint8_t flags; /* Flags, determines if following are valid: */ - uint8_t timeo; /* Time value in deciseconds (with NFSMNT_TIMEO) */ - uint8_t retrans; /* Times to retry send (with NFSMNT_RETRANS) */ - uint16_t wsize; /* Write size in bytes (with NFSMNT_WSIZE) */ - uint16_t rsize; /* Read size in bytes (with NFSMNT_RSIZE) */ - uint16_t readdirsize; /* readdir size in bytes (with NFSMNT_READDIRSIZE) */ - char *path; /* Server's path of the directory being mount */ - struct sockaddr_storage addr; /* File server address (requires 32-bit alignment) */ -}; -- --
- -- -- -NFS Mount Command
-- The NuttShell (NSH) also supports a command called
-nfsmount
- that can be used to mount a remote file system via the NSH command line. -- Command Syntax: -
--nfsmount <server-address> <mount-point> <remote-path> --- Synopsis. - The
-nfsmount
command mounts a network file system in the NuttX pseudo filesystem. - Thenfsmount
will use NFSv3 UDP protocol to mount the remote file system. -- Command Line Arguments. - The
-nfsmount
takes three arguments: --
- -- - The
-<server-address>
is the IP address of the server exporting the file system you wish to mount. - This implementation of NFS for the NuttX RTOS is only for a local area network, so the server and client must be in the same network. -- - The
-<mount-point >
is the location in the NuttX pseudo filesystem where the mounted volume will appear. - This mount point can only reside in the NuttX pseudo filesystem. - By convention, this mount point is a subdirectory under/mnt
. - The mount command will create whatever pseudo directories that may be needed to complete the full path (but the full path must not already exist). -- - The
-<remote-path>
is the file system/
directory being exported from server. - This/
directory must have been configured for exportation on the server before when the NFS server was set up. -- After the volume has been mounted in the NuttX pseudo filesystem, it may be access in the same way as other objects in the file system. -
-- Example. - Suppose that the NFS server has been configured to export the directory
-/export/shared
. - The the following command would mount that file system (assuming that the target also has privileges to mount the file system). --NuttShell (NSH) -nsh> ls /mnt -/mnt: -nsh: ls: no such directory: /mnt -nsh> nfsmount 10.0.0.1 /mnt/nfs /export/shared -nsh> ls -l /mnt/nfs -/mnt/nfs: - drwxrwxrwx 4096 .. - drwxrwxrwx 4096 testdir/ - -rw-rw-rw- 6 ctest.txt - -rw-r--r-- 15 btest.txt - drwxrwxrwx 4096 . -nsh> echo "This is a test" >/mnt/nfs/testdir/testfile.txt -nsh> ls -l /mnt/nfs/testdir -/mnt/nfs/testdir: - -rw-rw-rw- 21 another.txt - drwxrwxrwx 4096 .. - drwxrwxrwx 4096 . - -rw-rw-rw- 16 testfile.txt -nsh> cat /mnt/nfs/testdir/testfile.txt -This is a test -- --
- -- -- -Configuring the NFS server (Ubuntu)
-- Setting up the server will be done in two steps: - First, setting up the configuration file for NFS, and then starting the NFS services. - But first, you need to install the nfs server on Ubuntu with the these two commands: -
--# sudo apt-get install nfs-common -# sudo apt-get install nfs-kernel-server -- -- After that, we need to make or choose the directory we want to export from the NFS server. - In our case, we are going to make a new directory called
-/export
. --# sudo mkdir /export --- It is important that
-/export
directory allow access to everyone (777 permissions) as we will be accessing the NFS share from the client with no authentication. --# sudo chmod 777 /export --- When all this is done, we will need to edit the configuration file to set up an NFS server:
- An entry in/etc/exports
. - This file contains a list of entries; - each entry indicates a volume that is shared and how it is shared. - For more information for a complete description of all the setup options for this file you can check in the man pages (man export
)./etc/exports
will typically look like this: - --directory machine1(option11,option12) --- So for our example we export
-/export to the client 10.0.0.2 add the entry: - -/export 10.0.0.2(rw) --- In our case we are using all the default options except for the
- - After we do all the require configurations, we are ready to start the server with the next command: - -ro
that we replaced withrw
so that our client will have read and write access to the directory that we are exporting. --# sudo /etc/init.d/nfs-kernel-server start -- - Note: If you later decide to add more NFS exports to the /etc/exports file, you will need to either restart NFS daemon -or run command exportfs. - --# sudo /etc/init.d/nfs-kernel-server start --Or
--# exportfs -ra --- Now we can check if the export directory and our mount point is properly set up. -
--# sudo showmount -e -# sudo showmount -a --- And also we can verify if NFS is running in the system with: -
--
-# rpcinfo –p -program vers proto port - 100000 2 tcp 111 portmapper - 100000 2 udp 111 portmapper - 100011 1 udp 749 rquotad - 100011 2 udp 749 rquotad - 100005 1 udp 759 mountd - 100005 1 tcp 761 mountd - 100005 2 udp 764 mountd - 100005 2 tcp 766 mountd - 100005 3 udp 769 mountd - 100005 3 tcp 771 mountd - 100003 2 udp 2049 nfs - 100003 3 udp 2049 nfs - 300019 1 tcp 830 amd - 300019 1 udp 831 amd - 100024 1 udp 944 status - 100024 1 tcp 946 status - 100021 1 udp 1042 nlockmgr - 100021 3 udp 1042 nlockmgr - 100021 4 udp 1042 nlockmgr - 100021 1 tcp 1629 nlockmgr - 100021 3 tcp 1629 nlockmgr - 100021 4 tcp 1629 nlockmgr --- Now your NFS sever is sharing
- - -/export
directory to be accessed. -