More NX Console fixes... good progress but still not ready for prime time

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4533 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-03-28 01:52:00 +00:00
parent fb9d418f66
commit 52bf8b3bf1
5 changed files with 115 additions and 69 deletions
+1 -1
View File
@@ -71,7 +71,7 @@
# define CONFIG_EXAMPLES_NXCON_VPLANE 0 # define CONFIG_EXAMPLES_NXCON_VPLANE 0
#endif #endif
/* Pixel depth. If non provided, pick the smallest enabled pixel depth */ /* Pixel depth. If none provided, pick the smallest enabled pixel depth */
#ifndef CONFIG_EXAMPLES_NXCON_BPP #ifndef CONFIG_EXAMPLES_NXCON_BPP
# if !defined(CONFIG_NX_DISABLE_1BPP) # if !defined(CONFIG_NX_DISABLE_1BPP)
+38 -2
View File
@@ -64,10 +64,30 @@
# define CONFIG_EXAMPLES_NXTEXT_VPLANE 0 # define CONFIG_EXAMPLES_NXTEXT_VPLANE 0
#endif #endif
/* Pixel depth. If none provided, pick the smallest enabled pixel depth */
#ifndef CONFIG_EXAMPLES_NXTEXT_BPP #ifndef CONFIG_EXAMPLES_NXTEXT_BPP
# define CONFIG_EXAMPLES_NXTEXT_BPP 32 # if !defined(CONFIG_NX_DISABLE_1BPP)
# define CONFIG_EXAMPLES_NXTEXT_BPP 1
# elif !defined(CONFIG_NX_DISABLE_2BPP)
# define CONFIG_EXAMPLES_NXTEXT_BPP 2
# elif !defined(CONFIG_NX_DISABLE_4BPP)
# define CONFIG_EXAMPLES_NXTEXT_BPP 4
# elif !defined(CONFIG_NX_DISABLE_8BPP)
# define CONFIG_EXAMPLES_NXTEXT_BPP 8
# elif !defined(CONFIG_NX_DISABLE_16BPP)
# define CONFIG_EXAMPLES_NXTEXT_BPP 16
//#elif !defined(CONFIG_NX_DISABLE_24BPP)
//# define CONFIG_NXCONSOLE_BPP 24
# elif !defined(CONFIG_NX_DISABLE_32BPP)
# define CONFIG_EXAMPLES_NXTEXT_BPP 32
# else
# error "No pixel depth provided"
# endif
#endif #endif
/* Background color */
#ifndef CONFIG_EXAMPLES_NXTEXT_BGCOLOR #ifndef CONFIG_EXAMPLES_NXTEXT_BGCOLOR
# if CONFIG_EXAMPLES_NXTEXT_BPP == 24 || CONFIG_EXAMPLES_NXTEXT_BPP == 32 # if CONFIG_EXAMPLES_NXTEXT_BPP == 24 || CONFIG_EXAMPLES_NXTEXT_BPP == 32
# define CONFIG_EXAMPLES_NXTEXT_BGCOLOR 0x007b68ee # define CONFIG_EXAMPLES_NXTEXT_BGCOLOR 0x007b68ee
@@ -78,10 +98,14 @@
# endif # endif
#endif #endif
/* Pop-up font ID */
#ifndef CONFIG_EXAMPLES_NXTEXT_PUFONTID #ifndef CONFIG_EXAMPLES_NXTEXT_PUFONTID
# define CONFIG_EXAMPLES_NXTEXT_PUFONTID NXFONT_DEFAULT # define CONFIG_EXAMPLES_NXTEXT_PUFONTID NXFONT_DEFAULT
#endif #endif
/* Pop-up window color */
#ifndef CONFIG_EXAMPLES_NXTEXT_PUCOLOR #ifndef CONFIG_EXAMPLES_NXTEXT_PUCOLOR
# if CONFIG_EXAMPLES_NXTEXT_BPP == 24 || CONFIG_EXAMPLES_NXTEXT_BPP == 32 # if CONFIG_EXAMPLES_NXTEXT_BPP == 24 || CONFIG_EXAMPLES_NXTEXT_BPP == 32
# define CONFIG_EXAMPLES_NXTEXT_PUCOLOR 0x00dcdcdc # define CONFIG_EXAMPLES_NXTEXT_PUCOLOR 0x00dcdcdc
@@ -92,10 +116,14 @@
# endif # endif
#endif #endif
/* Background font ID */
#ifndef CONFIG_EXAMPLES_NXTEXT_BGFONTID #ifndef CONFIG_EXAMPLES_NXTEXT_BGFONTID
# define CONFIG_EXAMPLES_NXTEXT_BGFONTID NXFONT_DEFAULT # define CONFIG_EXAMPLES_NXTEXT_BGFONTID NXFONT_DEFAULT
#endif #endif
/* Background font color */
#ifndef CONFIG_EXAMPLES_NXTEXT_BGFONTCOLOR #ifndef CONFIG_EXAMPLES_NXTEXT_BGFONTCOLOR
# if CONFIG_EXAMPLES_NXTEXT_BPP == 24 || CONFIG_EXAMPLES_NXTEXT_BPP == 32 # if CONFIG_EXAMPLES_NXTEXT_BPP == 24 || CONFIG_EXAMPLES_NXTEXT_BPP == 32
# define CONFIG_EXAMPLES_NXTEXT_BGFONTCOLOR 0x00000000 # define CONFIG_EXAMPLES_NXTEXT_BGFONTCOLOR 0x00000000
@@ -106,6 +134,8 @@
# endif # endif
#endif #endif
/* Pop-up font color */
#ifndef CONFIG_EXAMPLES_NXTEXT_PUFONTCOLOR #ifndef CONFIG_EXAMPLES_NXTEXT_PUFONTCOLOR
# if CONFIG_EXAMPLES_NXTEXT_BPP == 24 || CONFIG_EXAMPLES_NXTEXT_BPP == 32 # if CONFIG_EXAMPLES_NXTEXT_BPP == 24 || CONFIG_EXAMPLES_NXTEXT_BPP == 32
# define CONFIG_EXAMPLES_NXTEXT_PUFONTCOLOR 0x00000000 # define CONFIG_EXAMPLES_NXTEXT_PUFONTCOLOR 0x00000000
@@ -116,14 +146,20 @@
# endif # endif
#endif #endif
/* Character caching */
#ifndef CONFIG_EXAMPLES_NXTEXT_BMCACHE #ifndef CONFIG_EXAMPLES_NXTEXT_BMCACHE
# define CONFIG_EXAMPLES_NXTEXT_BMCACHE 128 # define CONFIG_EXAMPLES_NXTEXT_BMCACHE 128
#endif #endif
/* Font glyph caching */
#ifndef CONFIG_EXAMPLES_NXTEXT_GLCACHE #ifndef CONFIG_EXAMPLES_NXTEXT_GLCACHE
# define CONFIG_EXAMPLES_NXTEXT_BMCACHE 16 # define CONFIG_EXAMPLES_NXTEXT_GLCACHE 16
#endif #endif
/* NX muli-user mode */
#ifdef CONFIG_NX_MULTIUSER #ifdef CONFIG_NX_MULTIUSER
# ifdef CONFIG_DISABLE_MQUEUE # ifdef CONFIG_DISABLE_MQUEUE
# error "The multi-threaded example requires MQ support (CONFIG_DISABLE_MQUEUE=n)" # error "The multi-threaded example requires MQ support (CONFIG_DISABLE_MQUEUE=n)"
+10 -2
View File
@@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4"> <tr align="center" bgcolor="#e4e4e4">
<td> <td>
<h1><big><font color="#3c34ec"><i>NxWidgets</i></font></big></h1> <h1><big><font color="#3c34ec"><i>NxWidgets</i></font></big></h1>
<p>Last Updated: March 24, 2012</p> <p>Last Updated: March 27, 2012</p>
</td> </td>
</tr> </tr>
</table> </table>
@@ -46,7 +46,7 @@
<li><b>Many Graphic Objects</b>. <li><b>Many Graphic Objects</b>.
Some of the graphic objects supported by NXWidgets include labels, buttons, text boxes, button arrays, check boxes, cycle buttons, images, sliders, scrollable list boxes, progress bars, and more. Some of the graphic objects supported by NXWidgets include labels, buttons, text boxes, button arrays, check boxes, cycle buttons, images, sliders, scrollable list boxes, progress bars, and more.
</li> </li>
<li><b>DOxygen Documentation</ba> <li><b>DOxygen Documentation</b>
DOxygen documentation is available. DOxygen documentation is available.
</li> </li>
</ul> </ul>
@@ -55,5 +55,13 @@
Dzeryn's &quot;Woopsi&quot; project: http://woopsi.org/ which also has a BSD style Dzeryn's &quot;Woopsi&quot; project: http://woopsi.org/ which also has a BSD style
license. See the COPYING file for details. license. See the COPYING file for details.
</p> </p>
<h1>NXWidgets DOxygen Documentation</h1>
<p>
DOxygen documentation for the NxWidgets-1.0 is now available online at <a href="http://www.nx-engineering.com/nxwidgets_v1_0/">this location</a>.
</p>
<p>
Thanks go to Jose Pablo Carballo for contributing this!
</p>
</p>
</body> </body>
</html> </html>
+7 -7
View File
@@ -135,16 +135,11 @@ void nxbe_bitmap(FAR struct nxbe_window_s *wnd, FAR const struct nxgl_rect_s *de
} }
#endif #endif
/* Offset the rectangle and image origin by the window origin */
nxgl_rectoffset(&bounds, dest, wnd->bounds.pt1.x, wnd->bounds.pt1.y);
nxgl_vectoradd(&offset, origin, &wnd->bounds.pt1);
/* Verify that the destination rectangle begins "below" and to the "right" /* Verify that the destination rectangle begins "below" and to the "right"
* of the origin * of the origin
*/ */
if (bounds.pt1.x < origin->x || bounds.pt1.y < origin->y) if (dest->pt1.x < origin->x || dest->pt1.y < origin->y)
{ {
gdbg("Bad dest start position\n"); gdbg("Bad dest start position\n");
return; return;
@@ -154,13 +149,18 @@ void nxbe_bitmap(FAR struct nxbe_window_s *wnd, FAR const struct nxgl_rect_s *de
* width of the source bitmap data (taking into account the bitmap origin) * width of the source bitmap data (taking into account the bitmap origin)
*/ */
deststride = (((bounds.pt2.x - origin->x + 1) * wnd->be->plane[0].pinfo.bpp + 7) >> 3); deststride = (((dest->pt2.x - origin->x + 1) * wnd->be->plane[0].pinfo.bpp + 7) >> 3);
if (deststride > stride) if (deststride > stride)
{ {
gdbg("Bad dest width\n"); gdbg("Bad dest width\n");
return; return;
} }
/* Offset the rectangle and image origin by the window origin */
nxgl_rectoffset(&bounds, dest, wnd->bounds.pt1.x, wnd->bounds.pt1.y);
nxgl_vectoradd(&offset, origin, &wnd->bounds.pt1);
/* Clip to the limits of the window and of the background screen */ /* Clip to the limits of the window and of the background screen */
nxgl_rectintersect(&remaining, &bounds, &wnd->bounds); nxgl_rectintersect(&remaining, &bounds, &wnd->bounds);
@@ -149,7 +149,9 @@ struct nxcon_glyph_s
uint8_t height; /* Height of this glyph (in rows) */ uint8_t height; /* Height of this glyph (in rows) */
uint8_t width; /* Width of this glyph (in pixels) */ uint8_t width; /* Width of this glyph (in pixels) */
uint8_t stride; /* Width of the glyph row (in bytes) */ uint8_t stride; /* Width of the glyph row (in bytes) */
#ifdef CONFIG_NXCONSOLE_FONTCACHE
uint8_t usecnt; /* Use count */ uint8_t usecnt; /* Use count */
#endif
FAR uint8_t *bitmap; /* Allocated bitmap memory */ FAR uint8_t *bitmap; /* Allocated bitmap memory */
}; };