Просмотр исходного кода

调整 rtgui/rtgui_config.h 中的宏定义名称;

yangfasheng 8 лет назад
Родитель
Сommit
87b4efd278

+ 1 - 1
include/rtgui/driver.h

@@ -105,7 +105,7 @@ void rtgui_cursor_set_position(rt_uint16_t x, rt_uint16_t y);
 void rtgui_cursor_set_image(enum rtgui_cursor_type type);
 #endif
 
-#ifdef RTGUI_USING_VFRAMEBUFFER
+#ifdef GUIENGIN_USING_VFRAMEBUFFER
 void rtgui_graphic_driver_vmode_enter(void);
 void rtgui_graphic_driver_vmode_exit(void);
 struct rtgui_dc* rtgui_graphic_driver_get_rect_buffer(const struct rtgui_graphic_driver *driver, struct rtgui_rect *rect);

+ 1 - 1
include/rtgui/filerw.h

@@ -28,7 +28,7 @@
 extern "C" {
 #endif
 
-#ifdef RTGUI_USING_DFS_FILERW
+#ifdef GUIENGINE_USING_DFS_FILERW
 #ifdef _WIN32_NATIVE
 #pragma warning(disable: 4996)
 #include <fcntl.h>

+ 1 - 1
include/rtgui/image.h

@@ -73,7 +73,7 @@ typedef struct rtgui_image rtgui_image_t;
 /* init rtgui image system */
 void rtgui_system_image_init(void);
 
-#if defined(RTGUI_USING_DFS_FILERW)
+#if defined(GUIENGINE_USING_DFS_FILERW)
 struct rtgui_image_engine *rtgui_image_get_engine_by_filename(const char *fn);
 struct rtgui_image *rtgui_image_create_from_file(const char *type, const char *filename, rt_bool_t load);
 struct rtgui_image *rtgui_image_create(const char *filename, rt_bool_t load);

+ 22 - 22
include/rtgui/rtgui_config.h

@@ -29,47 +29,47 @@
 /* RTGUI options */
 
 #ifndef RT_USING_DFS
-#undef RTGUI_USING_DFS_FILERW
-#undef RTGUI_USING_HZ_FILE
+#undef GUIENGINE_USING_DFS_FILERW
+#undef GUIENGINE_USING_HZ_FILE
 #endif
 
 #ifdef RT_USING_DFS
 /* if file system is used, the DFS_FILERW will be defined */
-#ifndef RTGUI_USING_DFS_FILERW
-#define RTGUI_USING_DFS_FILERW
+#ifndef GUIENGINE_USING_DFS_FILERW
+#define GUIENGINE_USING_DFS_FILERW
 #endif
 #endif
 
-#if RTGUI_DEFAULT_FONT_SIZE == 0
-#define RTGUI_DEFAULT_FONT_SIZE 12
+#if GUIENGINE_DEFAULT_FONT_SIZE == 0
+#define GUIENGINE_DEFAULT_FONT_SIZE 12
 #endif
 
-#define RTGUI_SVR_THREAD_PRIORITY       15
-#define RTGUI_SVR_THREAD_TIMESLICE      5
-#ifndef RTGUI_SVR_THREAD_STACK_SIZE
-#ifdef RTGUI_USING_SMALL_SIZE
-#define RTGUI_SVR_THREAD_STACK_SIZE     1024
+#define GUIENGINE_SVR_THREAD_PRIORITY       15
+#define GUIENGINE_SVR_THREAD_TIMESLICE      5
+#ifndef GUIENGIN_SVR_THREAD_STACK_SIZE
+#ifdef GUIENGIN_USING_SMALL_SIZE
+#define GUIENGIN_SVR_THREAD_STACK_SIZE     1024
 #else
-#define RTGUI_SVR_THREAD_STACK_SIZE     2048
+#define GUIENGIN_SVR_THREAD_STACK_SIZE     2048
 #endif
 #endif
 
-#define RTGUI_APP_THREAD_PRIORITY       25
-#define RTGUI_APP_THREAD_TIMESLICE      5
-#ifdef RTGUI_USING_SMALL_SIZE
-#define RTGUI_APP_THREAD_STACK_SIZE     1024
+#define GUIENGIN_APP_THREAD_PRIORITY       25
+#define GUIENGIN_APP_THREAD_TIMESLICE      5
+#ifdef GUIENGIN_USING_SMALL_SIZE
+#define GUIENGIN_APP_THREAD_STACK_SIZE     1024
 #else
-#define RTGUI_APP_THREAD_STACK_SIZE     2048
+#define GUIENGIN_APP_THREAD_STACK_SIZE     2048
 #endif
 
-// #define RTGUI_USING_CAST_CHECK
+// #define GUIENGIN_USING_CAST_CHECK
 
-// #define RTGUI_USING_DESKTOP_WINDOW
-// #undef RTGUI_USING_SMALL_SIZE
+// #define GUIENGIN_USING_DESKTOP_WINDOW
+// #undef GUIENGIN_USING_SMALL_SIZE
 
-//#define RTGUI_USING_CALIBRATION
+//#define GUIENGIN_USING_CALIBRATION
 
-#define RTGUI_USING_VFRAMEBUFFER
+#define GUIENGIN_USING_VFRAMEBUFFER
 
 #ifdef DEBUG_MEMLEAK
 #define rtgui_malloc     rt_malloc

+ 1 - 1
include/rtgui/rtgui_object.h

@@ -90,7 +90,7 @@ const rtgui_type_t  *rtgui_type_parent_type_get(const rtgui_type_t *type);
 const char    *rtgui_type_name_get(const rtgui_type_t *type);
 const rtgui_type_t *rtgui_object_object_type_get(rtgui_object_t *object);
 
-#ifdef RTGUI_USING_CAST_CHECK
+#ifdef GUIENGIN_USING_CAST_CHECK
 #define RTGUI_OBJECT_CAST(obj, obj_type, c_type) \
 	 	((c_type *)rtgui_object_check_cast((rtgui_object_t *)(obj), (obj_type), __FUNCTION__, __LINE__))
 #else

+ 2 - 2
src/filerw.c

@@ -24,7 +24,7 @@
 #include <rtgui/rtgui_system.h>
 #include <rtgui/filerw.h>
 
-#ifdef RTGUI_USING_DFS_FILERW
+#ifdef GUIENGINE_USING_DFS_FILERW
 
 /* standard file read/write */
 struct rtgui_filerw_stdio
@@ -215,7 +215,7 @@ const rt_uint8_t *rtgui_filerw_mem_getdata(struct rtgui_filerw *context)
 }
 
 /* file read/write public interface */
-#ifdef RTGUI_USING_DFS_FILERW
+#ifdef GUIENGINE_USING_DFS_FILERW
 static int parse_mode(const char *mode)
 {
     int f = 0;

+ 1 - 1
src/font_hz_file.c

@@ -29,7 +29,7 @@
 #include <rtgui/tree.h>
 #include <rtgui/rtgui_system.h>
 
-#ifdef RTGUI_USING_HZ_FILE
+#ifdef GUIENGINE_USING_HZ_FILE
 #ifdef _WIN32_NATIVE
 #include <fcntl.h>
 #include <sys/types.h>

+ 1 - 1
src/hz12font.c

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

+ 1 - 1
src/hz16font.c

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

+ 1 - 1
src/image.c

@@ -96,7 +96,7 @@ static struct rtgui_image_engine *rtgui_image_get_engine(const char *type)
     return RT_NULL;
 }
 
-#if defined(RTGUI_USING_DFS_FILERW)
+#if defined(GUIENGINE_USING_DFS_FILERW)
 struct rtgui_image_engine *rtgui_image_get_engine_by_filename(const char *fn)
 {
     struct rtgui_list_node *node;

+ 2 - 2
src/image_bmp.c

@@ -32,7 +32,7 @@
 
 #include <math.h>
 
-#ifdef RTGUI_USING_DFS_FILERW
+#ifdef GUIENGINE_USING_DFS_FILERW
 #include <dfs_posix.h>
 #endif
 
@@ -845,7 +845,7 @@ void rtgui_image_bmp_header_cfg(struct rtgui_image_bmp_header *bhr, rt_int32_t w
     }
 }
 
-#ifdef RTGUI_USING_DFS_FILERW
+#ifdef GUIENGINE_USING_DFS_FILERW
 #define WRITE_CLUSTER_SIZE  2048
 void bmp_align_write(struct rtgui_filerw *file, char *dest, char *src, rt_int32_t len, rt_int32_t *count)
 {

+ 1 - 1
src/image_container.c

@@ -34,7 +34,7 @@
  * a image resource.
  */
 
-#if defined(GUIENGINE_IMAGE_CONTAINER) && defined(RTGUI_USING_DFS_FILERW)
+#if defined(GUIENGINE_IMAGE_CONTAINER) && defined(GUIENGINE_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);

+ 2 - 2
src/image_jpg.c

@@ -35,7 +35,7 @@
 #include <rtgui/filerw.h>
 #include <rtgui/blit.h>
 
-#ifdef RTGUI_USING_DFS_FILERW
+#ifdef GUIENGINE_USING_DFS_FILERW
 #include <dfs_posix.h>
 #endif
 
@@ -612,7 +612,7 @@ static rt_bool_t rtgui_image_jpeg_check(struct rtgui_filerw *file)
 #include <rtgui/filerw.h>
 #include <rtgui/blit.h>
 
-#ifdef RTGUI_USING_DFS_FILERW
+#ifdef GUIENGINE_USING_DFS_FILERW
 #include <dfs_posix.h>
 #endif
 

+ 2 - 2
src/rtgui_driver.c

@@ -33,7 +33,7 @@ extern const struct rtgui_graphic_driver_ops *rtgui_framebuffer_get_ops(int pixe
 static struct rtgui_graphic_driver _driver;
 static struct rtgui_graphic_driver *_current_driver = &_driver;
 
-#ifdef RTGUI_USING_VFRAMEBUFFER
+#ifdef GUIENGIN_USING_VFRAMEBUFFER
 #ifndef RTGUI_VFB_PIXEL_FMT
 #define RTGUI_VFB_PIXEL_FMT     RTGRAPHIC_PIXEL_FORMAT_RGB565
 #endif
@@ -222,7 +222,7 @@ rt_err_t rtgui_graphic_set_device(rt_device_t device)
     rtgui_cursor_set_image(RTGUI_CURSOR_ARROW);
 #endif
 
-#ifdef RTGUI_USING_VFRAMEBUFFER
+#ifdef GUIENGIN_USING_VFRAMEBUFFER
     _graphic_driver_vmode_init();
 #endif
 

+ 2 - 2
src/rtgui_system.c

@@ -66,9 +66,9 @@ int rtgui_system_server_init(void)
     rtgui_graphic_driver_get_rect(rtgui_graphic_driver_get_default(), &_mainwin_rect);
 
     /* set the default font */
-#if RTGUI_DEFAULT_FONT_SIZE == 16
+#if GUIENGINE_DEFAULT_FONT_SIZE == 16
     rtgui_font_set_defaut(&rtgui_font_asc16);
-#elif RTGUI_DEFAULT_FONT_SIZE == 12
+#elif GUIENGINE_DEFAULT_FONT_SIZE == 12
     rtgui_font_set_defaut(&rtgui_font_asc12);
 #else
     rtgui_font_set_defaut(&rtgui_font_asc12);

+ 3 - 3
src/server.c

@@ -446,9 +446,9 @@ void rtgui_server_init(void)
 
     tid = rt_thread_create("rtgui",
                            rtgui_server_entry, RT_NULL,
-                           RTGUI_SVR_THREAD_STACK_SIZE,
-                           RTGUI_SVR_THREAD_PRIORITY,
-                           RTGUI_SVR_THREAD_TIMESLICE);
+                           GUIENGIN_SVR_THREAD_STACK_SIZE,
+                           GUIENGINE_SVR_THREAD_PRIORITY,
+                           GUIENGINE_SVR_THREAD_TIMESLICE);
 
     /* start rtgui server thread */
     if (tid != RT_NULL)

+ 2 - 2
src/window.c

@@ -756,7 +756,7 @@ rt_bool_t rtgui_win_event_handler(struct rtgui_object *object, struct rtgui_even
         rtgui_win_ondraw(win);
         break;
 
-#ifdef RTGUI_USING_VFRAMEBUFFER
+#ifdef GUIENGIN_USING_VFRAMEBUFFER
     case RTGUI_EVENT_VPAINT_REQ:
     {
         struct rtgui_event_vpaint_req *req = (struct rtgui_event_vpaint_req *)event;
@@ -924,7 +924,7 @@ char *rtgui_win_get_title(rtgui_win_t *win)
 }
 RTM_EXPORT(rtgui_win_get_title);
 
-#ifdef RTGUI_USING_VFRAMEBUFFER
+#ifdef GUIENGIN_USING_VFRAMEBUFFER
 #include <rtgui/driver.h>
 struct rtgui_dc *rtgui_win_get_drawing(rtgui_win_t * win)
 {