From 73624b6e68013b718cee96dc8d3c628cb84431ba Mon Sep 17 00:00:00 2001
From: patacongo Last Updated: July 23, 2011 Last Updated: July 24, 2011
NX Graphics Subsystem
- include/nuttx/nx.h
and, hence,
+ 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.
include/nuttx/nxglib.h
+ include/nuttx/nx/nxglib.h
include/nuttx/nx.h
+ include/nuttx/nx/nx.h
include/nutt/nxtk.h
include/nutt/nxfont.h
include/nuttx/nxwidgets.h
+ include/nuttx/nx/nxwidgets.h
include/nuttx/nxglib.h
for the full set of APIs;
+ 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.
@@ -512,7 +512,7 @@ struct nxgl_trapezoid_s
nxgl_rgb2yuv()
Function Prototype:
-#include <nuttx/nxglib.h> +#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);
@@ -523,7 +523,7 @@ void nxgl_rgb2yuv(uint8_t r, uint8_t g, uint8_t b, uint8_t *y, uint8_t *u, uint8
nxgl_yuv2rgb()
Function Prototype:
-#include <nuttx/nxglib.h> +#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);
@@ -534,7 +534,7 @@ void nxgl_yuv2rgb(uint8_t y, uint8_t u, uint8_t v, uint8_t *r, uint8_t *g, uint8
nxgl_rectcopy()
Function Prototype:
-#include <nuttx/nxglib.h> +#include <nuttx/nx/nxglib.h> void nxgl_rectcopy(FAR struct nxgl_rect_s *dest, FAR const struct nxgl_rect_s *src);@@ -547,7 +547,7 @@ void nxgl_rectcopy(FAR struct nxgl_rect_s *dest,
nxgl_rectoffset()
Function Prototype:
-#include <nuttx/nxglib.h> +#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); @@ -560,7 +560,7 @@ void nxgl_rectoffset(FAR struct nxgl_rect_s *dest,2.2.5
nxgl_vectoradd()
Function Prototype:
-#include <nuttx/nxglib.h> +#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); @@ -573,7 +573,7 @@ void nxgl_vectoradd(FAR struct nxgl_point_s *dest,2.2.6
nxgl_vectorsubtract()
Function Prototype:
-#include <nuttx/nxglib.h> +#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); @@ -586,7 +586,7 @@ void nxgl_vectsubtract(FAR struct nxgl_point_s *dest,2.2.7
nxgl_rectintersect()
Function Prototype:
-#include <nuttx/nxglib.h> +#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); @@ -599,7 +599,7 @@ void nxgl_rectintersect(FAR struct nxgl_rect_s *dest,2.2.8
nxgl_rectunion()
Function Prototype:
-#include <nuttx/nxglib.h> +#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); @@ -613,7 +613,7 @@ void nxgl_rectunion(FAR struct nxgl_rect_s *dest,2.2.9
nxgl_nonintersecting()
Function Prototype:
-#include <nuttx/nxglib.h> +#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); @@ -628,7 +628,7 @@ nxgl_nonintersecting(FAR struct nxgl_rect_s result[4],2.2.10
nxgl_rectoverlap()
Function Prototype:
-#include <nuttx/nxglib.h> +#include <nuttx/nx/nxglib.h> bool nxgl_rectoverlap(FAR struct nxgl_rect_s *rect1, FAR struct nxgl_rect_s *rect2);@@ -640,7 +640,7 @@ bool nxgl_rectoverlap(FAR struct nxgl_rect_s *rect1,
nxgl_rectinside()
Function Prototype:
-#include <nuttx/nxglib.h> +#include <nuttx/nx/nxglib.h> bool nxgl_rectinside(FAR const struct nxgl_rect_s *rect, FAR const struct nxgl_point_s *pt);@@ -652,7 +652,7 @@ bool nxgl_rectinside(FAR const struct nxgl_rect_s *rect,
nxgl_rectsize()
Function Prototype:
-#include <nuttx/nxglib.h> +#include <nuttx/nx/nxglib.h> void nxgl_rectsize(FAR struct nxgl_size_s *size, FAR const struct nxgl_rect_s *rect);@@ -664,7 +664,7 @@ void nxgl_rectsize(FAR struct nxgl_size_s *size,
nxgl_nullrect()
Function Prototype:
-#include <nuttx/nxglib.h> +#include <nuttx/nx/nxglib.h> bool nxgl_nullrect(FAR const struct nxgl_rect_s *rect);
@@ -675,7 +675,7 @@ bool nxgl_nullrect(FAR const struct nxgl_rect_s *rect);
nxgl_runoffset()
Function Prototype:
-#include <nuttx/nxglib.h> +#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); @@ -688,7 +688,7 @@ void nxgl_runoffset(FAR struct nxgl_run_s *dest,2.2.15
nxgl_runcopy()
Function Prototype:
-#include <nuttx/nxglib.h> +#include <nuttx/nx/nxglib.h> void nxgl_runcopy(FAR struct nxgl_run_s *dest, FAR const struct nxgl_run_s *src);@@ -701,7 +701,7 @@ void nxgl_runcopy(FAR struct nxgl_run_s *dest,
nxgl_trapoffset()
Function Prototype:
-#include <nuttx/nxglib.h> +#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); @@ -714,7 +714,7 @@ void nxgl_trapoffset(FAR struct nxgl_trapezoid_s *dest,2.2.1
nxgl_trapcopy()
Function Prototype:
-#include <nuttx/nxglib.h> +#include <nuttx/nx/nxglib.h> void nxgl_trapcopy(FAR struct nxgl_trapezoid_s *dest, FAR const struct nxgl_trapezoid_s *src);@@ -727,7 +727,7 @@ void nxgl_trapcopy(FAR struct nxgl_trapezoid_s *dest,
nxgl_colorcopy
Function Prototype:
-#include <nuttx/nxglib.h> +#include <nuttx/nx/nxglib.h> nxgl_colorcopy(nxgl_mxpixel_t dest[CONFIG_NX_NPLANES], const nxgl_mxpixel_t src[CONFIG_NX_NPLANES]);@@ -929,8 +929,8 @@ void (*kbdin)(NXWINDOW hwnd, uint8_t nch, FAR const uint8_t *ch, FAR void *arg);
nx_runinstance()
(and nx_run()
macro)Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#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); @@ -970,8 +970,8 @@ int nx_runinstance(FAR const char *mqname, FAR struct fb_vtable_s *fb);2.3.5
nx_connectinstance()
(andnx_connect()
macro)Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> #ifdef CONFIG_NX_MULTIUSER NXHANDLE nx_connectinstance(FAR const char *svrmqname); @@ -1024,8 +1024,8 @@ NXHANDLE nx_connectinstance(FAR const char *svrmqname);2.3.6
nx_open()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> #ifndef CONFIG_NX_MULTIUSER NXHANDLE nx_open(FAR struct fb_vtable_s *dev); @@ -1061,8 +1061,8 @@ NXHANDLE nx_open(FAR struct fb_vtable_s *dev);2.3.7
nx_disconnect()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> #ifdef CONFIG_NX_MULTIUSER void nx_disconnect(NXHANDLE handle); @@ -1092,8 +1092,8 @@ void nx_disconnect(NXHANDLE handle);2.3.8
nx_close()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> #ifndef CONFIG_NX_MULTIUSER void nx_close(NXHANDLE handle); @@ -1121,8 +1121,8 @@ void nx_close(NXHANDLE handle);2.3.9
nx_eventhandler()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> #ifdef CONFIG_NX_MULTIUSER int nx_eventhandler(NXHANDLE handle); @@ -1169,8 +1169,8 @@ int nx_eventhandler(NXHANDLE handle);2.3.10
nx_eventnotify()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#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); @@ -1215,8 +1215,8 @@ int nx_eventnotify(NXHANDLE handle, int signo);2.3.11
nx_openwindow()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> NXWINDOW nx_openwindow(NXHANDLE handle, FAR const struct nx_callback_s *cb, @@ -1248,8 +1248,8 @@ NXWINDOW nx_openwindow(NXHANDLE handle,2.3.12
nx_closewindow()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> int nx_closewindow(NXWINDOW hwnd);@@ -1276,8 +1276,8 @@ int nx_closewindow(NXWINDOW hwnd);
nx_requestbkgd()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> int nx_requestbkgd(NXHANDLE handle, FAR const struct nx_callback_s *cb, @@ -1348,8 +1348,8 @@ int nx_requestbkgd(NXHANDLE handle,2.3.14
nx_releasebkgd()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> int nx_releasebkgd(NXWINDOW hwnd);@@ -1378,8 +1378,8 @@ int nx_releasebkgd(NXWINDOW hwnd);
nx_getposition()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> int nx_getposition(NXWINDOW hwnd);@@ -1406,8 +1406,8 @@ int nx_getposition(NXWINDOW hwnd);
nx_setposition()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> int nx_setposition(NXWINDOW hwnd, FAR struct nxgl_point_s *pos);@@ -1435,8 +1435,8 @@ int nx_setposition(NXWINDOW hwnd, FAR struct nxgl_point_s *pos);
nx_setsize()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> int nx_setsize(NXWINDOW hwnd, FAR struct nxgl_size_s *size);@@ -1463,8 +1463,8 @@ int nx_setsize(NXWINDOW hwnd, FAR struct nxgl_size_s *size);
nx_raise()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> int nx_raise(NXWINDOW hwnd);@@ -1491,8 +1491,8 @@ int nx_raise(NXWINDOW hwnd);
nx_lower()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> int nx_lower(NXWINDOW hwnd);@@ -1519,8 +1519,8 @@ int nx_lower(NXWINDOW hwnd);
nx_fill()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#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]); @@ -1550,8 +1550,8 @@ int nx_fill(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,2.3.21
nx_filltrapezoid()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#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, @@ -1584,8 +1584,8 @@ int nx_filltrapezoid(NXWINDOW hwnd, FAR const struct nxgl_rect_s *clip,2.3.22
nx_setbgcolor()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> int nx_setbgcolor(NXHANDLE handle, nxgl_mxpixel_t color[CONFIG_NX_NPLANES]); @@ -1612,8 +1612,8 @@ int nx_setbgcolor(NXHANDLE handle,2.3.23
nx_move()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#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); @@ -1643,8 +1643,8 @@ int nx_move(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect,2.3.24
nx_bitmap()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#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], @@ -1685,8 +1685,8 @@ int nx_bitmap(NXWINDOW hwnd, FAR const struct nxgl_rect_s *dest,2.3.25
nx_kbdin()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> #ifdef CONFIG_NX_KBD int nx_kbdchin(NXHANDLE handle, uint8_t ch); @@ -1708,8 +1708,8 @@ int nx_kbdin(NXHANDLE handle, uint8_t nch, FAR const uint8_t *ch);2.3.26
nx_mousein()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> #ifdef CONFIG_NX_MOUSE int nx_mousein(NXHANDLE handle, nxgl_coord_t x, nxgl_coord_t y, uint8_t buttons); @@ -1785,9 +1785,9 @@ typedef FAR void *NXTKWINDOW;2.4.2
nxtk_openwindow()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> -#include <nuttx/nxtk.h> +#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, @@ -1819,9 +1819,9 @@ NXTKWINDOW nxtk_openwindow(NXHANDLE handle,2.4.3
nxtk_closewindow()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> -#include <nuttx/nxtk.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> +#include <nuttx/nx/nxtk.h> int nxtk_closewindow(NXTKWINDOW hfwnd);@@ -1846,9 +1846,9 @@ int nxtk_closewindow(NXTKWINDOW hfwnd);
nxtk_getposition()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> -#include <nuttx/nxtk.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> +#include <nuttx/nx/nxtk.h> int nxtk_getposition(NXTKWINDOW hfwnd);@@ -1875,9 +1875,9 @@ int nxtk_getposition(NXTKWINDOW hfwnd);
nxtk_setposition()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> -#include <nuttx/nxtk.h> +#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);@@ -1906,9 +1906,9 @@ int nxtk_setposition(NXTKWINDOW hfwnd, FAR struct nxgl_point_s *pos);
nxtk_setsize()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> -#include <nuttx/nxtk.h> +#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);@@ -1937,9 +1937,9 @@ int nxtk_setsize(NXTKWINDOW hfwnd, FAR struct nxgl_size_s *size);
nxtk_raise()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> -#include <nuttx/nxtk.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> +#include <nuttx/nx/nxtk.h> int nxtk_raise(NXTKWINDOW hfwnd);@@ -1968,9 +1968,9 @@ int nxtk_raise(NXTKWINDOW hfwnd);
nxtk_lower()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> -#include <nuttx/nxtk.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> +#include <nuttx/nx/nxtk.h> int nxtk_lower(NXTKWINDOW hfwnd);@@ -1999,9 +1999,9 @@ int nxtk_lower(NXTKWINDOW hfwnd);
nxtk_fillwindow()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> -#include <nuttx/nxtk.h> +#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]); @@ -2031,9 +2031,9 @@ int nxtk_fillwindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,2.4.10
nxtk_filltrapwindow()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> -#include <nuttx/nxtk.h> +#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, @@ -2064,9 +2064,9 @@ int nxtk_filltrapwindow(NXTKWINDOW hfwnd,2.4.11
nxtk_movewindow()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> -#include <nuttx/nxtk.h> +#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); @@ -2097,9 +2097,9 @@ int nxtk_movewindow(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,2.4.12
nxtk_bitmapwindow()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> -#include <nuttx/nxtk.h> +#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, @@ -2142,9 +2142,9 @@ int nxtk_bitmapwindow(NXTKWINDOW hfwnd,2.4.13
nxtk_opentoolbar()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> -#include <nuttx/nxtk.h> +#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, @@ -2177,9 +2177,9 @@ int nxtk_opentoolbar(NXTKWINDOW hfwnd, nxgl_coord_t height,2.4.14
nxtk_closetoolbar()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> -#include <nuttx/nxtk.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nx.h> +#include <nuttx/nx/nxtk.h> int nxtk_closetoolbar(NXTKWINDOW hfwnd);@@ -2206,9 +2206,9 @@ int nxtk_closetoolbar(NXTKWINDOW hfwnd);
nxtk_filltoolbar()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> -#include <nuttx/nxtk.h> +#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]); @@ -2238,9 +2238,9 @@ int nxtk_filltoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,2.4.16
nxtk_filltraptoolbar()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> -#include <nuttx/nxtk.h> +#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]); @@ -2270,9 +2270,9 @@ int nxtk_filltraptoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_trapezoid_s *tr2.4.17
nxtk_movetoolbar()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> -#include <nuttx/nxtk.h> +#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); @@ -2304,9 +2304,9 @@ int nxtk_movetoolbar(NXTKWINDOW hfwnd, FAR const struct nxgl_rect_s *rect,2.4.18
nxtk_bitmaptoolbar()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nx.h> -#include <nuttx/nxtk.h> +#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, @@ -2403,7 +2403,7 @@ struct nx_font_s2.5.2
nxf_getfonthandle()
Function Prototype:
-#include <nuttx/nxfonts.h> +#include <nuttx/nx/nxfonts.h> NXHANDLE nxf_getfonthandle(enum nx_fontid_e fontid);@@ -2426,8 +2426,8 @@ NXHANDLE nxf_getfonthandle(enum nx_fontid_e fontid);
nxf_getfontset()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nxfonts.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nxfonts.h> FAR const struct nx_font_s *nxf_getfontset(NXHANDLE handle);@@ -2450,8 +2450,8 @@ FAR const struct nx_font_s *nxf_getfontset(NXHANDLE handle);
nxf_getbitmap()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nxfonts.h> +#include <nuttx/nx/nxglib.h> +#include <nuttx/nx/nxfonts.h> FAR const struct nx_fontbitmap_s *nxf_getbitmap(NXHANDLE handle, uint16_t ch);@@ -2476,8 +2476,8 @@ FAR const struct nx_fontbitmap_s *nxf_getbitmap(NXHANDLE handle, uint16_t ch);
nxf_convert_*bpp()
Function Prototype:
-#include <nuttx/nxglib.h> -#include <nuttx/nxfonts.h> +#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, @@ -2595,7 +2595,7 @@ int nxf_convert_32bpp(FAR uint32_t *dest, uint16_t height, When combined with the generic back-end (nxbe
), it implements a single threaded, single user windowing system. The files in this directory present the window APIs described in -include/nuttx/nx.h
. +include/nuttx/nx/nx.h
. The single user front-end is selected whenCONFIG_NX_MULTIUSER
is not defined in the NuttX configuration file. @@ -2604,7 +2604,7 @@ int nxf_convert_32bpp(FAR uint32_t *dest, uint16_t height, 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 -include/nuttx/nx.h
. +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. @@ -2614,13 +2614,13 @@ int nxf_convert_32bpp(FAR uint32_t *dest, uint16_t height,
graphics/nxfonts
include/nuttx/nxfonts.h
.
+ See include/nuttx/nx/nxfonts.h
.
graphics/nxtk
include/nuttx/nxtk.h
.
+ See include/nuttx/nx/nxtk.h
.
graphics/nxwidgets
+
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. +
- Below are general instructions for creating and installing a new font in the NX graphic system: + 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, + Locate a font in BDF format. + There are many good BDF bitmap fonts bundled with X-11. + See this link, as an example,
- Create a new NuttX configuration variable.
+ 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:
A font ID number has to be assigned for each new font.
- The font ID is defined in the file include/nuttx/nxfonts.h
.
+ 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/nxfonts.h
. Add you new font as a possible system default font:
+ include/nuttx/nx/nxfonts.h
. Add you new font as a possible system default font:
#if defined(CONFIG_NXFONT_SANS23X27) @@ -2816,7 +2829,7 @@ enum nx_fontid_e
nuttx/graphics/Makefile
. This file needs logic to auto-generate a C source file from the header file that you generated with the the bdf-converter program. - NoticeNXFONTS_FONTID=2
; this must be set to the same font ID value that you defined in theinclude/nuttx/nxfonts.h
file. + NoticeNXFONTS_FONTID=2
; this must be set to the same font ID value that you defined in theinclude/nuttx/nx/nxfonts.h
file.
genfontsources: -- cgit v1.2.3