From 99ffb319c5af373ef135c2a3e73bf1171e55559e Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 27 Jul 2011 14:43:45 +0000 Subject: Incorporated new fonts into examples; fix glyph allocation bug in nxhello git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3822 42af7a65-404d-4744-a932-0658087f49c3 --- apps/examples/nxtext/nxtext_internal.h | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'apps/examples/nxtext/nxtext_internal.h') diff --git a/apps/examples/nxtext/nxtext_internal.h b/apps/examples/nxtext/nxtext_internal.h index 98579ffdf..caf8cd9fc 100644 --- a/apps/examples/nxtext/nxtext_internal.h +++ b/apps/examples/nxtext/nxtext_internal.h @@ -45,8 +45,10 @@ #include #include #include + #include #include +#include /**************************************************************************** * Definitions @@ -76,6 +78,10 @@ # endif #endif +#ifndef CONFIG_EXAMPLES_NXTEXT_PUFONTID +# define CONFIG_EXAMPLES_NXTEXT_PUFONTID NXFONT_DEFAULT +#endif + #ifndef CONFIG_EXAMPLES_NXTEXT_PUCOLOR # if CONFIG_EXAMPLES_NXTEXT_BPP == 24 || CONFIG_EXAMPLES_NXTEXT_BPP == 32 # define CONFIG_EXAMPLES_NXTEXT_PUCOLOR 0x00dcdcdc @@ -86,6 +92,10 @@ # endif #endif +#ifndef CONFIG_EXAMPLES_NXTEXT_BGFONTID +# define CONFIG_EXAMPLES_NXTEXT_BGFONTID NXFONT_DEFAULT +#endif + #ifndef CONFIG_EXAMPLES_NXTEXT_BGFONTCOLOR # if CONFIG_EXAMPLES_NXTEXT_BPP == 24 || CONFIG_EXAMPLES_NXTEXT_BPP == 32 # define CONFIG_EXAMPLES_NXTEXT_BGFONTCOLOR 0x00000000 @@ -263,9 +273,10 @@ extern NXHANDLE g_hnx; extern NXHANDLE g_bgwnd; -/* The font handle */ +/* The font handlse */ -extern NXHANDLE g_fonthandle; +extern NXHANDLE g_bghfont; +extern NXHANDLE g_puhfont; /* NX callback vtables */ @@ -311,9 +322,9 @@ extern int nxpu_close(NXWINDOW hwnd); extern void nxtext_home(FAR struct nxtext_state_s *st); extern void nxtext_newline(FAR struct nxtext_state_s *st); extern void nxtext_putc(NXWINDOW hwnd, FAR struct nxtext_state_s *st, - uint8_t ch); + NXHANDLE hfont, uint8_t ch); extern void nxtext_fillchar(NXWINDOW hwnd, FAR const struct nxgl_rect_s *rect, - FAR struct nxtext_state_s *st, + FAR struct nxtext_state_s *st, NXHANDLE hfont, FAR const struct nxtext_bitmap_s *bm); #endif /* __EXAMPLES_NXTEXT_NXTEXT_INTERNAL_H */ -- cgit v1.2.3