Jelajahi Sumber

宏定义命名调整;

yangfasheng 8 tahun lalu
induk
melakukan
393bd9063a

+ 1 - 1
example/SConscript

@@ -5,6 +5,6 @@ src = Glob('*.c')
 
 CPPPATH = [cwd]
 
-group = DefineGroup('gui_demo', src, depend = ['RTGUI_USING_DEMO'], CPPPATH = CPPPATH)
+group = DefineGroup('gui_demo', src, depend = ['GUIENGINE_USING_DEMO'], CPPPATH = CPPPATH)
 
 Return('group')

+ 1 - 1
example/gui_demo.c

@@ -1,6 +1,6 @@
 #include <rtthread.h>
 
-#if defined(RT_USING_GUIENGINE) && defined(RTGUI_USING_DEMO)
+#if defined(PKG_USING_GUIENGINE) && defined(GUIENGINE_USING_DEMO)
 
 #include <rtgui/rtgui.h>
 #include <rtgui/rtgui_system.h>

+ 1 - 1
include/SConscript

@@ -1,4 +1,4 @@
-# RT-Thread building script for gui
+# RT-Thread building script for Gui Engine
 
 from building import *
 

+ 2 - 2
include/rtgui/dc.h

@@ -116,7 +116,7 @@ struct rtgui_dc_buffer
     /* pitch */
     rt_uint16_t pitch;
 
-#ifdef RTGUI_IMAGE_CONTAINER
+#ifdef GUIENGINE_IMAGE_CONTAINER
     /* image dc */
     struct rtgui_image_item *image_item;
 #endif
@@ -135,7 +135,7 @@ struct rtgui_dc_buffer
 /* create a buffer dc */
 struct rtgui_dc *rtgui_dc_buffer_create(int width, int height);
 struct rtgui_dc *rtgui_dc_buffer_create_pixformat(rt_uint8_t pixel_format, int w, int h);
-#ifdef RTGUI_IMAGE_CONTAINER
+#ifdef GUIENGINE_IMAGE_CONTAINER
 struct rtgui_dc *rtgui_img_dc_create_pixformat(rt_uint8_t pixel_format, rt_uint8_t *pixel, 
     struct rtgui_image_item *image_item);
 #endif

+ 1 - 1
include/rtgui/event.h

@@ -428,7 +428,7 @@ struct rtgui_event_command
     rt_int32_t command_id;
 
     /* command string */
-    char command_string[RTGUI_NAME_MAX];
+    char command_string[GUIENGINE_NAME_MAX];
 };
 #define RTGUI_EVENT_COMMAND_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_COMMAND)
 

+ 1 - 1
include/rtgui/image_container.h

@@ -32,7 +32,7 @@ extern "C" {
 #include <rtgui/rtgui.h>
 #include <rtgui/image.h>
 
-#if defined(RTGUI_IMAGE_CONTAINER)
+#if defined(GUIENGINE_IMAGE_CONTAINER)
 /* image item in image container */
 struct rtgui_image_item
 {

+ 2 - 2
libraries/freetype-2.6.2/SConscript

@@ -11,9 +11,9 @@ CPPDEFINES = ['FT2_BUILD_LIBRARY']
 src = []
 group = []
 
-group = DefineGroup('freetype', src, depend = ['RTGUI_USING_TTF'], CPPDEFINES=CPPDEFINES, GroupPath = GroupPath)
+group = DefineGroup('freetype', src, depend = ['GUIENGINE_USING_TTF'], CPPDEFINES=CPPDEFINES, GroupPath = GroupPath)
 
-if GetDepend('RTGUI_USING_TTF'):
+if GetDepend('GUIENGINE_USING_TTF'):
     for d in list:
         path = os.path.join(cwd, d)
         if os.path.isfile(os.path.join(path, 'SConscript')):

+ 118 - 0
libraries/freetype-2.6.2/docs/VERSION.DLL

@@ -0,0 +1,118 @@
+Due  to our  use of  `libtool' to  generate and  install the  FreeType 2
+libraries on  Unix systems, as  well as  other historical events,  it is
+generally very  difficult to  know precisely which  release of  the font
+engine is installed on a given system.
+
+This file tries  to explain why and to document  ways to properly detect
+FreeType on Unix.
+
+
+1. Version and Release numbers
+------------------------------
+
+For each new  public release of FreeType 2, there  are generally *three*
+distinct `version' numbers to consider:
+
+  * The official FreeType 2 release number, like 2.3.1 or 2.4.10.
+
+  * The libtool (and  Unix) specific version number,  like 13.0.7.  This
+    is what `freetype-config --version' returns.
+
+  * The platform-specific  shared object  number, used for  example when
+    the library is installed as `/usr/lib/libfreetype.so.6.7.1'.
+
+The platform-specific  number is, unsurprisingly,  platform-specific and
+varies  with the  operating system  you are  using (several  variants of
+Linux, FreeBSD,  Solaris, etc.).  You  should thus _never_ use  it, even
+for simple tests.
+
+The libtool-specific  number does  not equal the  release number  but is
+tied to it.
+
+The release number is available  at *compile* time through the following
+macros defined in FT_FREETYPE_H:
+
+  - FREETYPE_MAJOR: major release number
+  - FREETYPE_MINOR: minor release number
+  - FREETYPE_PATCH: patch release number
+
+See below for a small autoconf fragment.
+
+The  release  number   is  also  available  at   *runtime*  through  the
+`FT_Library_Version' API.
+
+
+2. History
+----------
+
+The  following   table  gives,  for   all  releases  since   2.4.0,  the
+corresponding libtool number, as well  as the shared object number found
+on _most_ systems, but not all of them:
+
+
+    release     libtool     so
+  -------------------------------
+     2.6.2      18.2.12   6.12.2
+     2.6.1      18.1.12   6.12.1
+     2.6.0      18.0.12   6.12.0
+     2.5.5      17.4.11   6.11.4
+     2.5.4      17.3.11   6.11.3
+     2.5.3      17.2.11   6.11.2
+     2.5.2      17.1.11   6.11.1
+     2.5.1      17.0.11   6.11.0
+     2.5.0      16.2.10   6.10.2
+     2.4.12     16.1.10   6.10.1
+     2.4.11     16.0.10   6.10.0
+     2.4.10     15.0.9    6.9.0
+     2.4.9      14.1.8    6.8.1
+     2.4.8      14.0.8    6.8.0
+     2.4.7      13.2.7    6.7.2
+     2.4.6      13.1.7    6.7.1
+     2.4.5      13.0.7    6.7.0
+     2.4.4      12.2.6    6.6.2
+     2.4.3      12.1.6    6.6.1
+     2.4.2      12.0.6    6.6.0
+     2.4.1      11.1.5    6.5.1
+     2.4.0      11.0.5    6.5.0
+
+
+3. Autoconf Code Fragment
+-------------------------
+
+Lars Clausen contributed the following autoconf fragment to detect which
+version of  FreeType is  installed on  a system.  This  one tests  for a
+version that  is at least 2.0.9;  you should change it  to check against
+other release numbers.
+
+
+  AC_MSG_CHECKING([whether FreeType version is 2.0.9 or higher])
+  old_CPPFLAGS="$CPPFLAGS"
+  CPPFLAGS=`freetype-config --cflags`
+  AC_TRY_CPP([
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#if (FREETYPE_MAJOR*1000 + FREETYPE_MINOR)*1000 + FREETYPE_PATCH < 2000009
+#error Freetype version too low.
+#endif
+  ],
+  [AC_MSG_RESULT(yes)
+   FREETYPE_LIBS=`freetype-config --libs`
+   AC_SUBST(FREETYPE_LIBS)
+   AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])
+   CPPFLAGS="$old_CPPFLAGS"],
+  [AC_MSG_ERROR([Need FreeType library version 2.0.9 or higher])])
+
+------------------------------------------------------------------------
+
+Copyright 2002-2015 by
+David Turner, Robert Wilhelm, and Werner Lemberg.
+
+This  file is  part  of the  FreeType  project, and  may  only be  used,
+modified,  and  distributed under  the  terms  of  the FreeType  project
+license, LICENSE.TXT.  By continuing  to use, modify, or distribute this
+file  you indicate that  you have  read the  license and  understand and
+accept it fully.
+
+
+--- end of VERSION.DLL ---

+ 3 - 3
libraries/lodepng/SConscript

@@ -1,4 +1,4 @@
-# RT-Thread building script for gui
+# RT-Thread building script for Gui Engine
 
 from building import *
 import rtconfig
@@ -8,8 +8,8 @@ src = Glob('*.c') + Glob('*.cpp')
 CPPPATH = [cwd]
 
 if rtconfig.ARCH == 'sim':
-    group = DefineGroup('GuiEngine', src, depend = ['RTGUI_IMAGE_LODEPNG'], CPPPATH = CPPPATH)
+    group = DefineGroup('GuiEngine', src, depend = ['GUIENGINE_IMAGE_LODEPNG'], CPPPATH = CPPPATH)
 else:
-    group = DefineGroup('GuiEngine', src, depend = ['RTGUI_IMAGE_LODEPNG', 'RT_USING_LIBC'], CPPPATH = CPPPATH)
+    group = DefineGroup('GuiEngine', src, depend = ['GUIENGINE_IMAGE_LODEPNG', 'RT_USING_LIBC'], CPPPATH = CPPPATH)
 
 Return('group')

+ 2 - 2
libraries/tjpgd1a/SConscript

@@ -1,4 +1,4 @@
-# RT-Thread building script for gui
+# RT-Thread building script for Gui Engine
 
 from building import *
 
@@ -6,6 +6,6 @@ cwd = GetCurrentDir()
 src = Glob('*.c') + Glob('*.cpp')
 CPPPATH = [cwd]
 
-group = DefineGroup('GuiEngine', src, depend = ['RTGUI_IMAGE_TJPGD'], CPPPATH = CPPPATH)
+group = DefineGroup('GuiEngine', src, depend = ['GUIENGINE_IMAGE_TJPGD'], CPPPATH = CPPPATH)
 
 Return('group')

+ 1 - 1
src/SConscript

@@ -1,4 +1,4 @@
-# RT-Thread building script for gui
+# RT-Thread building script for Gui Engine
 
 from building import *
 

+ 1 - 1
src/asc12font.c

@@ -26,7 +26,7 @@
 #include <rtgui/font.h>
 #include <rtgui/font_fnt.h>
 
-#ifdef RTGUI_USING_FONT12
+#ifdef GUIENGINE_USING_FONT12
 
 /* Font information:
    name: DejaVuSans-Bold

+ 1 - 1
src/asc16font.c

@@ -23,7 +23,7 @@
  */
 #include <rtgui/font.h>
 
-#ifdef RTGUI_USING_FONT16
+#ifdef GUIENGINE_USING_FONT16
 const unsigned char asc16_font[] =
 {
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  

+ 3 - 3
src/dc_buffer.c

@@ -94,7 +94,7 @@ struct rtgui_dc *rtgui_dc_buffer_create_pixformat(rt_uint8_t pixel_format, int w
         dc->height = h;
         dc->pitch = w * rtgui_color_get_bpp(pixel_format);
 
-#ifdef RTGUI_IMAGE_CONTAINER
+#ifdef GUIENGINE_IMAGE_CONTAINER
         dc->image_item = RT_NULL;
 #endif
         dc->pixel = rtgui_malloc(h * dc->pitch);
@@ -112,7 +112,7 @@ struct rtgui_dc *rtgui_dc_buffer_create_pixformat(rt_uint8_t pixel_format, int w
 }
 RTM_EXPORT(rtgui_dc_buffer_create_pixformat);
 
-#ifdef RTGUI_IMAGE_CONTAINER
+#ifdef GUIENGINE_IMAGE_CONTAINER
 struct rtgui_dc *rtgui_img_dc_create_pixformat(rt_uint8_t pixel_format, 
     rt_uint8_t *pixel, struct rtgui_image_item *image_item)
 {
@@ -198,7 +198,7 @@ static rt_bool_t rtgui_dc_buffer_fini(struct rtgui_dc *dc)
 
     if (dc->type != RTGUI_DC_BUFFER) return RT_FALSE;
 
-#ifdef RTGUI_IMAGE_CONTAINER
+#ifdef GUIENGINE_IMAGE_CONTAINER
     if (buffer->image_item)
     {
         rtgui_image_container_put(buffer->image_item);

+ 7 - 7
src/font.c

@@ -33,7 +33,7 @@ extern struct rtgui_font rtgui_font_asc16;
 extern struct rtgui_font rtgui_font_arial16;
 extern struct rtgui_font rtgui_font_asc12;
 extern struct rtgui_font rtgui_font_arial12;
-#ifdef RTGUI_USING_FONTHZ
+#ifdef GUIENGINE_USING_FONTHZ
 extern struct rtgui_font rtgui_font_hz16;
 extern struct rtgui_font rtgui_font_hz12;
 #endif
@@ -45,16 +45,16 @@ void rtgui_font_system_init()
     /* set default font to NULL */
     rtgui_default_font = RT_NULL;
 
-#ifdef RTGUI_USING_FONT16
+#ifdef GUIENGINE_USING_FONT16
     rtgui_font_system_add_font(&rtgui_font_asc16);
-#ifdef RTGUI_USING_FONTHZ
+#ifdef GUIENGINE_USING_FONTHZ
     rtgui_font_system_add_font(&rtgui_font_hz16);
 #endif
 #endif
 
-#ifdef RTGUI_USING_FONT12
+#ifdef GUIENGINE_USING_FONT12
     rtgui_font_system_add_font(&rtgui_font_asc12);
-#ifdef RTGUI_USING_FONTHZ
+#ifdef GUIENGINE_USING_FONTHZ
     rtgui_font_system_add_font(&rtgui_font_hz12);
 #endif
 #endif
@@ -101,7 +101,7 @@ struct rtgui_font *rtgui_font_refer(const char *family, rt_uint16_t height)
     rtgui_list_foreach(node, &_rtgui_font_list)
     {
         font = rtgui_list_entry(node, struct rtgui_font, list);
-        if ((rt_strncmp(font->family, family, RTGUI_NAME_MAX) == 0) &&
+        if ((rt_strncmp(font->family, family, GUIENGINE_NAME_MAX) == 0) &&
                 font->height == height)
         {
             font->refer_count ++;
@@ -112,7 +112,7 @@ struct rtgui_font *rtgui_font_refer(const char *family, rt_uint16_t height)
     rtgui_list_foreach(node, &_rtgui_font_list)
     {
         font = rtgui_list_entry(node, struct rtgui_font, list);
-        if (rt_strncmp(font->family, family, RTGUI_NAME_MAX) == 0)
+        if (rt_strncmp(font->family, family, GUIENGINE_NAME_MAX) == 0)
         {
             font->refer_count ++;
             return font;

+ 2 - 2
src/font_bmp.c

@@ -97,7 +97,7 @@ static void rtgui_bitmap_font_draw_text(struct rtgui_font *font, struct rtgui_dc
     rt_uint32_t length;
     struct rtgui_rect text_rect;
     struct rtgui_font_bitmap *bmp_font = (struct rtgui_font_bitmap *)(font->data);
-#ifdef RTGUI_USING_FONTHZ
+#ifdef GUIENGINE_USING_FONTHZ
     struct rtgui_font *hz_font;
 #endif
 
@@ -109,7 +109,7 @@ static void rtgui_bitmap_font_draw_text(struct rtgui_font *font, struct rtgui_dc
     /* parameter check */
     if (text_rect.y1 > text_rect.y2) return;
 
-#ifdef RTGUI_USING_FONTHZ
+#ifdef GUIENGINE_USING_FONTHZ
     hz_font = rtgui_font_refer("hz", font->height);
     while ((text_rect.x1 < text_rect.x2) && len)
     {

+ 8 - 8
src/font_freetype.c

@@ -24,7 +24,7 @@
 
 #include <rtthread.h>
 
-#ifdef RTGUI_USING_TTF
+#ifdef GUIENGINE_USING_TTF
 #include <rtgui/rtgui.h>
 #include <rtgui/rtgui_system.h>
 #include <rtgui/dc.h>
@@ -62,7 +62,7 @@ extern unsigned short ff_convert(unsigned short wch, int direction);
 #define gb2312tounicode(code) ff_convert(code, 1)
 #endif
 
-#ifndef UTF8_TO_UNICODE
+#ifndef GUIENGINE_TTF_UTF8
 
 static void gbk_to_unicode(rt_uint16_t *unicode, const char *text, int len)
 {
@@ -587,14 +587,14 @@ static void ftc_draw_text(struct rtgui_font *font,
     RT_ASSERT(ttf_font != RT_NULL);
 
     /* allocate unicode buffer */
-#ifndef UTF8_TO_UNICODE
+#ifndef GUIENGINE_TTF_UTF8
     text_short = (rt_uint16_t *)rtgui_malloc((len + 1) * 2);
 #else
     text_short = (rt_uint16_t *)rtgui_malloc((utf8_to_unicode_len(text, len) + 1) * 2);
 #endif
     if (text_short == RT_NULL)
         return; /* out of memory */
-#ifndef UTF8_TO_UNICODE
+#ifndef GUIENGINE_TTF_UTF8
     rt_memset(text_short, 0x00, (len + 1) * 2);
 #else
     rt_memset(text_short, 0x00, (utf8_to_unicode_len(text, len) + 1) * 2);
@@ -603,7 +603,7 @@ static void ftc_draw_text(struct rtgui_font *font,
     RT_ASSERT(rect);
 
     /* convert gbk to unicode */
-#ifndef UTF8_TO_UNICODE
+#ifndef GUIENGINE_TTF_UTF8
     gbk_to_unicode(text_short, text, len);
 #else
     utf8_to_unicode(text_short, text, len);
@@ -716,7 +716,7 @@ static void ftc_get_metrics(struct rtgui_font *font, const char *text, struct rt
     memset(rect, 0, sizeof(struct rtgui_rect));
 
     /* allocate unicode buffer */
-#ifndef UTF8_TO_UNICODE
+#ifndef GUIENGINE_TTF_UTF8
     text_short = (rt_uint16_t *)rtgui_malloc((len + 1) * 2);
 #else
     text_short = (rt_uint16_t *)rtgui_malloc((utf8_to_unicode_len(text, len) + 1) * 2);
@@ -724,14 +724,14 @@ static void ftc_get_metrics(struct rtgui_font *font, const char *text, struct rt
     if (text_short == RT_NULL)
         return; /* out of memory */
 
-#ifndef UTF8_TO_UNICODE
+#ifndef GUIENGINE_TTF_UTF8
     rt_memset(text_short, 0x00, (len + 1) * 2);
 #else
     rt_memset(text_short, 0x00, (utf8_to_unicode_len(text, len) + 1) * 2);
 #endif
 
     /* convert gbk to unicode */
-#ifndef UTF8_TO_UNICODE
+#ifndef GUIENGINE_TTF_UTF8
     gbk_to_unicode(text_short, text, len);
 #else
     utf8_to_unicode(text_short, text, len);

+ 1 - 1
src/hz12font.c

@@ -23,7 +23,7 @@
  */
 #include <rtgui/font.h>
 
-#if defined(RTGUI_USING_FONT12) && defined(RTGUI_USING_FONTHZ)
+#if defined(GUIENGINE_USING_FONT12) && defined(GUIENGINE_USING_FONTHZ)
 #ifndef RTGUI_USING_HZ_FILE
 #ifdef RTGUI_USING_FONT_COMPACT
 extern const unsigned char hz12_font[];

+ 1 - 1
src/hz16font.c

@@ -23,7 +23,7 @@
  */
 #include <rtgui/font.h>
 
-#if defined(RTGUI_USING_FONT16) && defined(RTGUI_USING_FONTHZ)
+#if defined(GUIENGINE_USING_FONT16) && defined(GUIENGINE_USING_FONTHZ)
 #ifndef RTGUI_USING_HZ_FILE
 #ifdef RTGUI_USING_FONT_COMPACT
 extern const unsigned char hz16_font[];

+ 9 - 9
src/image.c

@@ -35,18 +35,18 @@
 #define strncasecmp  strnicmp
 #endif
 
-#ifdef RTGUI_IMAGE_XPM
+#ifdef GUIENGINE_IMAGE_XPM
 extern void rtgui_image_xpm_init(void);
 #endif
 
-#ifdef RTGUI_IMAGE_BMP
+#ifdef GUIENGINE_IMAGE_BMP
 #include <rtgui/image_bmp.h>
 #endif
 
-#if (defined(RTGUI_IMAGE_JPEG) || defined(RTGUI_IMAGE_TJPGD))
+#if (defined(GUIENGINE_IMAGE_JPEG) || defined(GUIENGINE_IMAGE_TJPGD))
 extern void rtgui_image_jpeg_init(void);
 #endif
-#if defined(RTGUI_IMAGE_PNG) || defined(RTGUI_IMAGE_LODEPNG)
+#if defined(GUIENGINE_IMAGE_PNG) || defined(GUIENGINE_IMAGE_LODEPNG)
 extern void rtgui_image_png_init(void);
 #endif
 
@@ -58,23 +58,23 @@ void rtgui_system_image_init(void)
     /* always support HDC image */
     rtgui_image_hdc_init();
 
-#ifdef RTGUI_IMAGE_XPM
+#ifdef GUIENGINE_IMAGE_XPM
     rtgui_image_xpm_init();
 #endif
 
-#ifdef RTGUI_IMAGE_BMP
+#ifdef GUIENGINE_IMAGE_BMP
     rtgui_image_bmp_init();
 #endif
 
-#if (defined(RTGUI_IMAGE_JPEG) || defined(RTGUI_IMAGE_TJPGD))
+#if (defined(GUIENGINE_IMAGE_JPEG) || defined(GUIENGINE_IMAGE_TJPGD))
     rtgui_image_jpeg_init();
 #endif
 
-#if defined(RTGUI_IMAGE_PNG) || defined(RTGUI_IMAGE_LODEPNG)
+#if defined(GUIENGINE_IMAGE_PNG) || defined(GUIENGINE_IMAGE_LODEPNG)
     rtgui_image_png_init();
 #endif
 
-#ifdef RTGUI_IMAGE_CONTAINER
+#ifdef GUIENGINE_IMAGE_CONTAINER
     /* initialize image container */
     rtgui_system_image_container_init();
 #endif

+ 1 - 1
src/image_bmp.c

@@ -36,7 +36,7 @@
 #include <dfs_posix.h>
 #endif
 
-#ifdef RTGUI_IMAGE_BMP
+#ifdef GUIENGINE_IMAGE_BMP
 /* Compression encodings for BMP files */
 #ifndef BI_RGB
 #define BI_RGB          0

+ 1 - 1
src/image_container.c

@@ -34,7 +34,7 @@
  * a image resource.
  */
 
-#if defined(RTGUI_IMAGE_CONTAINER) && defined(RTGUI_USING_DFS_FILERW)
+#if defined(GUIENGINE_IMAGE_CONTAINER) && defined(RTGUI_USING_DFS_FILERW)
 typedef unsigned int (*rtgui_hash_func_t)(const void *key);
 typedef struct _rtgui_hash_table  rtgui_hash_table_t;
 typedef rt_bool_t (*rtgui_equal_func_t)(const void *a, const void *b);

+ 3 - 3
src/image_jpg.c

@@ -26,7 +26,7 @@
 #include <rtgui/rtgui.h>
 #include <rtgui/image.h>
 
-#ifdef RTGUI_IMAGE_JPEG
+#ifdef GUIENGINE_IMAGE_JPEG
 #include <stdio.h>
 #include <stdlib.h>
 #include "jpeglib.h"
@@ -583,7 +583,7 @@ static rt_bool_t rtgui_image_jpeg_check(struct rtgui_filerw *file)
 
 #endif
 
-#if defined(RTGUI_IMAGE_TJPGD)
+#if defined(GUIENGINE_IMAGE_TJPGD)
 /***************************************************************************//**
  * @file    image_jpg.c
  * @brief   JPEG decoder using TJpgDec module (elm-chan.org)
@@ -969,4 +969,4 @@ static void rtgui_image_jpeg_blit(struct rtgui_image *image,
         }
     }
 }
-#endif /* defined(RTGUI_IMAGE_TJPGD) */
+#endif /* defined(GUIENGINE_IMAGE_TJPGD) */

+ 2 - 2
src/image_png.c

@@ -28,7 +28,7 @@
 #include <rtgui/driver.h>
 #include <rtgui/image.h>
 
-#ifdef RTGUI_IMAGE_PNG
+#ifdef GUIENGINE_IMAGE_PNG
 #include "png.h"
 
 #define PNG_MAGIC_LEN       8
@@ -423,7 +423,7 @@ void rtgui_image_png_init()
     rtgui_image_register_engine(&rtgui_image_png_engine);
 }
 
-#elif defined(RTGUI_IMAGE_LODEPNG)
+#elif defined(GUIENGINE_IMAGE_LODEPNG)
 #include "lodepng.h"
 
 static rt_bool_t rtgui_image_png_check(struct rtgui_filerw *file);

+ 1 - 1
src/image_xpm.c

@@ -28,7 +28,7 @@
 #include <rtgui/rtgui_system.h>
 #include <rtgui/image.h>
 
-#ifdef RTGUI_IMAGE_XPM
+#ifdef GUIENGINE_IMAGE_XPM
 #define XPM_MAGIC_LEN       9
 
 static rt_bool_t rtgui_image_xpm_check(struct rtgui_filerw *file);

+ 2 - 2
src/rtgui_system.c

@@ -32,7 +32,7 @@
 #include <rtgui/rtgui_system.h>
 #include <rtgui/widgets/window.h>
 
-#ifdef RTGUI_USING_TTF
+#ifdef GUIENGINE_USING_TTF
 #include <rtgui/font_freetype.h>
 #endif
 
@@ -74,7 +74,7 @@ int rtgui_system_server_init(void)
     rtgui_font_set_defaut(&rtgui_font_asc12);
 #endif
 
-#ifdef RTGUI_USING_TTF
+#ifdef GUIENGINE_USING_TTF
     rtgui_ttf_system_init();
 #endif