summaryrefslogtreecommitdiff
path: root/apps/examples/nxtext/nxtext_internal.h
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-27 14:43:45 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-07-27 14:43:45 +0000
commit99ffb319c5af373ef135c2a3e73bf1171e55559e (patch)
tree7aa08fa81a006d354469de2652043ab969d8a3c4 /apps/examples/nxtext/nxtext_internal.h
parentce09509ff8c3127b4cc07ebcaae78229d5b2d90a (diff)
downloadnuttx-99ffb319c5af373ef135c2a3e73bf1171e55559e.tar.gz
nuttx-99ffb319c5af373ef135c2a3e73bf1171e55559e.tar.bz2
nuttx-99ffb319c5af373ef135c2a3e73bf1171e55559e.zip
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
Diffstat (limited to 'apps/examples/nxtext/nxtext_internal.h')
-rw-r--r--apps/examples/nxtext/nxtext_internal.h19
1 files changed, 15 insertions, 4 deletions
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 <stdint.h>
#include <stdbool.h>
#include <semaphore.h>
+
#include <nuttx/nx/nx.h>
#include <nuttx/nx/nxtk.h>
+#include <nuttx/nx/nxfonts.h>
/****************************************************************************
* 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 */