diff options
| author | bernard.xiong <[email protected]> | 2009-11-09 10:06:46 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2009-11-09 10:06:46 +0000 |
| commit | 0d9a579a815c27ace8817b7cd38498b2bd5ac60b (patch) | |
| tree | d5368a5df4f2efcc3bd9844a27d3d1f2c0920458 /rtgui | |
| parent | 51b25cd4874392d6ae9bca69ddeb18eedac76c2e (diff) | |
add HDC image in project file
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@162 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'rtgui')
| -rw-r--r-- | rtgui/common/asc16font.c | 6 | ||||
| -rw-r--r-- | rtgui/common/image.c | 3 | ||||
| -rw-r--r-- | rtgui/include/rtgui/image_hdc.h | 21 | ||||
| -rw-r--r-- | rtgui/include/rtgui/rtgui_config.h | 4 | ||||
| -rw-r--r-- | rtgui/include/rtgui/rtgui_theme.h | 4 | ||||
| -rw-r--r-- | rtgui/widgets/textbox.c | 2 |
6 files changed, 33 insertions, 7 deletions
diff --git a/rtgui/common/asc16font.c b/rtgui/common/asc16font.c index bf69713c2f..a2998099d8 100644 --- a/rtgui/common/asc16font.c +++ b/rtgui/common/asc16font.c @@ -12,8 +12,9 @@ * 2009-10-16 Bernard first version */ #include <rtgui/font.h> - -unsigned char asc16_font[] = { +
+#ifdef RTGUI_USING_FONT16 +const unsigned char asc16_font[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, @@ -291,3 +292,4 @@ struct rtgui_font rtgui_font_asc16 = }; /* size = 4096 bytes */ +#endif
diff --git a/rtgui/common/image.c b/rtgui/common/image.c index 466807eb53..817120d7da 100644 --- a/rtgui/common/image.c +++ b/rtgui/common/image.c @@ -14,7 +14,8 @@ #include <rtthread.h> #include <rtgui/image.h>
-#include <rtgui/image_xpm.h> +#include <rtgui/image_xpm.h>
+#include <rtgui/image_hdc.h> #include <rtgui/rtgui_system.h>
#include <string.h> diff --git a/rtgui/include/rtgui/image_hdc.h b/rtgui/include/rtgui/image_hdc.h new file mode 100644 index 0000000000..331c26c7c5 --- /dev/null +++ b/rtgui/include/rtgui/image_hdc.h @@ -0,0 +1,21 @@ +/*
+ * File : image_xpm.h
+ * This file is part of RT-Thread RTOS
+ * COPYRIGHT (C) 2006 - 2009, RT-Thread Development Team
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rt-thread.org/license/LICENSE
+ *
+ * Change Logs:
+ * Date Author Notes
+ * 2009-10-16 Bernard first version
+ */
+#ifndef __RTGUI_IMAGE_HDC_H__
+#define __RTGUI_IMAGE_HDC_H__
+
+#include <rtgui/image.h>
+
+void rtgui_image_hdc_init(void);
+
+#endif
diff --git a/rtgui/include/rtgui/rtgui_config.h b/rtgui/include/rtgui/rtgui_config.h index 4f3716302c..7ae7f633a5 100644 --- a/rtgui/include/rtgui/rtgui_config.h +++ b/rtgui/include/rtgui/rtgui_config.h @@ -22,11 +22,12 @@ /* #define RTGUI_USING_MOUSE_CURSOR */
-/* #define RTGUI_USING_FONT16 */
+#define RTGUI_USING_FONT16
// #define RT_USING_STDIO_FILERW
#define RT_USING_DFS_FILERW
// #define RTGUI_IMAGE_PNG
+// #define RTGUI_IMAGE_JPG
#define RTGUI_SVR_THREAD_PRIORITY 15
#define RTGUI_SVR_THREAD_TIMESLICE 5
@@ -35,4 +36,3 @@ #define RTGUI_APP_THREAD_TIMESLICE 8
#endif
-
diff --git a/rtgui/include/rtgui/rtgui_theme.h b/rtgui/include/rtgui/rtgui_theme.h index 44dd76e465..28edac0e61 100644 --- a/rtgui/include/rtgui/rtgui_theme.h +++ b/rtgui/include/rtgui/rtgui_theme.h @@ -32,8 +32,8 @@ void rtgui_theme_draw_label(rtgui_label_t* label); void rtgui_theme_draw_textbox(rtgui_textbox_t* box);
void rtgui_theme_draw_iconbox(rtgui_iconbox_t* iconbox);
-rtgui_color_t rtgui_theme_default_bc();
-rtgui_color_t rtgui_theme_default_fc();
+rtgui_color_t rtgui_theme_default_bc(void);
+rtgui_color_t rtgui_theme_default_fc(void);
#ifdef __cplusplus
}
diff --git a/rtgui/widgets/textbox.c b/rtgui/widgets/textbox.c index bd79db3ec2..560ffb914d 100644 --- a/rtgui/widgets/textbox.c +++ b/rtgui/widgets/textbox.c @@ -15,6 +15,8 @@ #include <rtgui/widgets/textbox.h>
#include <rtgui/rtgui_theme.h>
+#include <ctype.h>
+
#define RTGUI_TEXTBOX_LINE_MAX 64
#define RTGUI_TEXTBOX_MARGIN 3
|
