Clean-up and document NX configuration settings

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1420 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2008-12-05 14:04:37 +00:00
parent b702a15c16
commit fc099a5d34
18 changed files with 235 additions and 86 deletions
+55 -1
View File
@@ -2,7 +2,7 @@ README
^^^^^^
This directory contains tiny graphics support for NuttX. The contents of this directory
are only build if CONFIG_NXGRAPHICS is defined in the NuttX configuration file.
are only build if CONFIG_NX is defined in the NuttX configuration file.
Roadmap
^^^^^^^
@@ -80,3 +80,57 @@ graphics/nxtk
graphics/nxwidgets
At one time, I planned to put NXWIDGETS implementation here, but not anymore.
Configuration Settings
^^^^^^^^^^^^^^^^^^^^^^
CONFIG_NX
Enables overall support for graphics library and NX
CONFIG_NX_MULTIUSER
Configures NX in multi-user mode
CONFIG_NX_NPLANES
Some YUV color formats requires support for multiple planes, one for each
color component. Unless you have such special hardware, this value should be
undefined or set to 1.
CONFIG_NX_DISABLE_1BPP, CONFIG_NX_DISABLE_2BPP,
CONFIG_NX_DISABLE_4BPP, CONFIG_NX_DISABLE_8BPP,
CONFIG_NX_DISABLE_16BPP, CONFIG_NX_DISABLE_24BPP, and
CONFIG_NX_DISABLE_32BPP
NX supports a variety of pixel depths. You can save some memory by disabling
support for unused color depths.
CONFIG_NX_PACKEDMSFIRST
If a pixel depth of less than 8-bits is used, then NX needs to know if the
pixels pack from the MS to LS or from LS to MS
CONFIG_NX_MOUSE
Build in support for mouse input.
CONFIG_NX_KBD
Build in support of keypad/keyboard input.
CONFIG_NXTK_BORDERWIDTH
Specifies with with of the border (in pixels) used with framed windows.
The default is 4.
CONFIG_NXTK_BORDERCOLOR1 and CONFIG_NXTK_BORDERCOLOR2
Specify the colors of the border used with framed windows.
CONFIG_NXTK_BORDERCOLOR2 is the shadow side color and so is normally darker.
The default is medium and dark grey, respectively
CONFIG_NXTK_AUTORAISE
If set, a window will be raised to the top if the mouse position is over a
visible portion of the window. Default: A mouse button must be clicked over
a visible portion of the window.
CONFIG_NXFONTS_CHARBITS
The number of bits in the character set. Current options are only 7 and 8.
The default is 7.
CONFIG_NXFONT_SANS
At present, there is only one font. But if there were were more, then this
option would select the sans serif font.
NX Multi-user only options:
CONFIG_NX_BLOCKING
Open the client message queues in blocking mode. In this case,
nx_eventhandler() will not return until a message is received and processed.
CONFIG_NX_MXSERVERMSGS and CONFIG_NX_MXCLIENTMSGS
Specifies the maximum number of messages that can fit in the message queues.
No additional resources are allocated, but this can be set to prevent
flooding of the client or server with too many messages (CONFIG_PREALLOC_MQ_MSGS
controls how many messages are pre-allocated).
+7 -7
View File
@@ -124,7 +124,7 @@ int nxbe_fbconfigure(FAR struct fb_vtable_s *fb, FAR struct nxbe_state_s *be)
* will signicantly increase the size
*/
#ifndef CONFIG_NXGLIB_DISABLE_1BPP
#ifndef CONFIG_NX_DISABLE_1BPP
if (be->plane[i].pinfo.bpp == 1)
{
be->plane[i].fillrectangle = nxgl_fillrectangle_1bpp;
@@ -134,7 +134,7 @@ int nxbe_fbconfigure(FAR struct fb_vtable_s *fb, FAR struct nxbe_state_s *be)
}
else
#endif
#ifndef CONFIG_NXGLIB_DISABLE_2BPP
#ifndef CONFIG_NX_DISABLE_2BPP
if (be->plane[i].pinfo.bpp == 2)
{
be->plane[i].fillrectangle = nxgl_fillrectangle_2bpp;
@@ -144,7 +144,7 @@ int nxbe_fbconfigure(FAR struct fb_vtable_s *fb, FAR struct nxbe_state_s *be)
}
else
#endif
#ifndef CONFIG_NXGLIB_DISABLE_4BPP
#ifndef CONFIG_NX_DISABLE_4BPP
if (be->plane[i].pinfo.bpp == 4)
{
be->plane[i].fillrectangle = nxgl_fillrectangle_4bpp;
@@ -154,7 +154,7 @@ int nxbe_fbconfigure(FAR struct fb_vtable_s *fb, FAR struct nxbe_state_s *be)
}
else
#endif
#ifndef CONFIG_NXGLIB_DISABLE_8BPP
#ifndef CONFIG_NX_DISABLE_8BPP
if (be->plane[i].pinfo.bpp == 8)
{
be->plane[i].fillrectangle = nxgl_fillrectangle_8bpp;
@@ -164,7 +164,7 @@ int nxbe_fbconfigure(FAR struct fb_vtable_s *fb, FAR struct nxbe_state_s *be)
}
else
#endif
#ifndef CONFIG_NXGLIB_DISABLE_16BPP
#ifndef CONFIG_NX_DISABLE_16BPP
if (be->plane[i].pinfo.bpp == 16)
{
be->plane[i].fillrectangle = nxgl_fillrectangle_16bpp;
@@ -174,7 +174,7 @@ int nxbe_fbconfigure(FAR struct fb_vtable_s *fb, FAR struct nxbe_state_s *be)
}
else
#endif
#ifndef CONFIG_NXGLIB_DISABLE_24BPP
#ifndef CONFIG_NX_DISABLE_24BPP
if (be->plane[i].pinfo.bpp == 24)
{
be->plane[i].fillrectangle = nxgl_fillrectangle_24bpp;
@@ -184,7 +184,7 @@ int nxbe_fbconfigure(FAR struct fb_vtable_s *fb, FAR struct nxbe_state_s *be)
}
else
#endif
#ifndef CONFIG_NXGLIB_DISABLE_32BPP
#ifndef CONFIG_NX_DISABLE_32BPP
if (be->plane[i].pinfo.bpp == 32)
{
be->plane[i].fillrectangle = nxgl_fillrectangle_32bpp;
+3 -3
View File
@@ -191,7 +191,7 @@ int NXF_FUNCNAME(nxf_convert,NXFONTS_SUFFIX)
col = 0;
dptr = (FAR NXF_PIXEL_T*)line;
pixel = *dptr;
#ifdef CONFIG_NXF_PACKEDMSFIRST
#ifdef CONFIG_NX_PACKEDMSFIRST
mask = NXF_PIXELMASK << (8 - NXFONTS_BITSPERPIXEL);
#else
mask = NXF_PIXELMASK;
@@ -215,7 +215,7 @@ int NXF_FUNCNAME(nxf_convert,NXFONTS_SUFFIX)
pixel = ((pixel & ~mask) | (mpixel & mask));
}
#ifdef CONFIG_NXF_PACKEDMSFIRST
#ifdef CONFIG_NX_PACKEDMSFIRST
mask >>= NXFONTS_BITSPERPIXEL;
#else
mask <<= NXFONTS_BITSPERPIXEL;
@@ -277,4 +277,4 @@ int NXF_FUNCNAME(nxf_convert,NXFONTS_SUFFIX)
}
#endif
return bm->metric.width + bm->metric.xoffset;
}
}
+1 -1
View File
@@ -110,7 +110,7 @@ void NXGL_FUNCNAME(nxgl_copyrectangle,NXGLIB_SUFFIX)
rows = dest->pt2.y - dest->pt1.y + 1;
#if NXGLIB_BITSPERPIXEL < 8
# ifdef CONFIG_NXGL_PACKEDMSFIRST
# ifdef CONFIG_NX_PACKEDMSFIRST
/* Get the mask for pixels that are ordered so that they pack from the
* MS byte down.
+1 -1
View File
@@ -112,7 +112,7 @@ void NXGL_FUNCNAME(nxgl_fillrectangle,NXGLIB_SUFFIX)
line = pinfo->fbmem + rect->pt1.y * stride + NXGL_SCALEX(rect->pt1.x);
#if NXGLIB_BITSPERPIXEL < 8
# ifdef CONFIG_NXGL_PACKEDMSFIRST
# ifdef CONFIG_NX_PACKEDMSFIRST
/* Get the mask for pixels that are ordered so that they pack from the
* MS byte down.
+2 -2
View File
@@ -195,7 +195,7 @@ void NXGL_FUNCNAME(nxgl_filltrapezoid,NXGLIB_SUFFIX)(
#if NXGLIB_BITSPERPIXEL < 8
/* Handle masking of the fractional initial byte */
#ifdef CONFIG_NXGL_PACKEDMSFIRST
#ifdef CONFIG_NX_PACKEDMSFIRST
mask = (ubyte)(0xff >> (8 - NXGL_REMAINDERX(ix1));
#else
mask = (ubyte)(0xff << (8 - NXGL_REMAINDERX(ix1)));
@@ -213,7 +213,7 @@ void NXGL_FUNCNAME(nxgl_filltrapezoid,NXGLIB_SUFFIX)(
/* Handle masking of the fractional final byte */
#ifdef CONFIG_NXGL_PACKEDMSFIRST
#ifdef CONFIG_NX_PACKEDMSFIRST
mask &= (ubyte)(0xff << (8 - NXGL_REMAINDERX(ix2)));
#else
mask &= (ubyte)(0xff >> (8 - NXGL_REMAINDERX(ix2)));
+1 -1
View File
@@ -153,7 +153,7 @@ void NXGL_FUNCNAME(nxgl_moverectangle,NXGLIB_SUFFIX)
rows = rect->pt2.y - rect->pt1.y + 1;
#if NXGLIB_BITSPERPIXEL < 8
# ifdef CONFIG_NXGL_PACKEDMSFIRST
# ifdef CONFIG_NX_PACKEDMSFIRST
/* Get the mask for pixels that are ordered so that they pack from the
* MS byte down.