Sfoglia il codice sorgente

update rtgui_config.h / event.h 增加判断部分依赖宏定义未定义时实现默认定义

Signed-off-by: yangfasheng <yangfasheng@rt-thread.com>
yangfasheng 7 anni fa
parent
commit
9157e81898
2 ha cambiato i file con 12 aggiunte e 1 eliminazioni
  1. 5 1
      include/rtgui/event.h
  2. 7 0
      include/rtgui/rtgui_config.h

+ 5 - 1
include/rtgui/event.h

@@ -417,6 +417,10 @@ struct rtgui_event_touch
 #define RTGUI_TOUCH_MOTION              0x03
 #define RTGUI_TOUCH_MOTION              0x03
 #define RTGUI_EVENT_TOUCH_INIT(e)       RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_TOUCH)
 #define RTGUI_EVENT_TOUCH_INIT(e)       RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_TOUCH)
 
 
+#ifndef GUIENGINE_CMD_STRING_MAX
+#define GUIENGINE_CMD_STRING_MAX        16
+#endif
+
 struct rtgui_event_command
 struct rtgui_event_command
 {
 {
     _RTGUI_EVENT_WIN_ELEMENTS
     _RTGUI_EVENT_WIN_ELEMENTS
@@ -428,7 +432,7 @@ struct rtgui_event_command
     rt_int32_t command_id;
     rt_int32_t command_id;
 
 
     /* command string */
     /* command string */
-    char command_string[GUIENGINE_NAME_MAX];
+    char command_string[GUIENGINE_CMD_STRING_MAX];
 };
 };
 #define RTGUI_EVENT_COMMAND_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_COMMAND)
 #define RTGUI_EVENT_COMMAND_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_COMMAND)
 
 

+ 7 - 0
include/rtgui/rtgui_config.h

@@ -67,6 +67,13 @@
 
 
 #define GUIENGIN_USING_VFRAMEBUFFER
 #define GUIENGIN_USING_VFRAMEBUFFER
 
 
+#ifndef PKG_USING_RGB888_PIXEL_BITS_32
+#ifndef PKG_USING_RGB888_PIXEL_BITS_24
+#define PKG_USING_RGB888_PIXEL_BITS_32
+#define PKG_USING_RGB888_PIXEL_BITS 32
+#endif
+#endif
+
 #ifdef DEBUG_MEMLEAK
 #ifdef DEBUG_MEMLEAK
 #define rtgui_malloc     rt_malloc
 #define rtgui_malloc     rt_malloc
 #define rtgui_realloc    rt_realloc
 #define rtgui_realloc    rt_realloc