mirror of
https://gitee.com/idea4good/GuiLite.git
synced 2025-08-24 16:18:48 +08:00
fix identifier violation
This commit is contained in:
parent
7c24c78575
commit
b4ceabfc92
@ -73,7 +73,7 @@ GuiLite只是一个框架,本身并不能生成UI。为了能够展示如何
|
|||||||
| HelloAnimation | Windows, Linux | 动画的应用 | [编译/运行](https://gitee.com/idea4good/GuiLiteSamples/blob/master/HelloAnimation/README.md) | 初级 |
|
| HelloAnimation | Windows, Linux | 动画的应用 | [编译/运行](https://gitee.com/idea4good/GuiLiteSamples/blob/master/HelloAnimation/README.md) | 初级 |
|
||||||
| HelloParticle | Windows, Linux, STM32F103, STM32F429 | 粒子效果的应用 | [编译/运行](https://gitee.com/idea4good/GuiLiteSamples/blob/master/HelloParticle/README.md) | 初级 |
|
| HelloParticle | Windows, Linux, STM32F103, STM32F429 | 粒子效果的应用 | [编译/运行](https://gitee.com/idea4good/GuiLiteSamples/blob/master/HelloParticle/README.md) | 初级 |
|
||||||
| HelloSlide | Windows, Linux | 滑屏界面的应用 | [编译/运行](https://gitee.com/idea4good/GuiLiteSamples/blob/master/HelloSlide/README.md) | 中级 |
|
| HelloSlide | Windows, Linux | 滑屏界面的应用 | [编译/运行](https://gitee.com/idea4good/GuiLiteSamples/blob/master/HelloSlide/README.md) | 中级 |
|
||||||
| HelloWave | Windows, Linux, STM32F103, STM32F429 | 波形控件的应用 | [编译/运行](https://gitee.com/idea4good/GuiLiteSamples/blob/master/HelloWave/README.md) | 中级 |
|
| HelloWave | Windows, Linux, STM32F103, STM32F429 | 波形控件的应用,及单片机移植办法 | [编译/运行](https://gitee.com/idea4good/GuiLiteSamples/blob/master/HelloWave/README.md) | 中级 |
|
||||||
| HostMonitor | iOS, Mac, Android, Windows, Linux | 创建复杂界面,扩展自定义控件,适配全平台 | [编译/运行](https://gitee.com/idea4good/GuiLiteSamples/blob/master/HostMonitor/README.md) | 高级 |
|
| HostMonitor | iOS, Mac, Android, Windows, Linux | 创建复杂界面,扩展自定义控件,适配全平台 | [编译/运行](https://gitee.com/idea4good/GuiLiteSamples/blob/master/HostMonitor/README.md) | 高级 |
|
||||||
|
|
||||||
## 开发文档
|
## 开发文档
|
||||||
|
@ -1,50 +1,50 @@
|
|||||||
#ifndef _API_H_
|
#ifndef API_H
|
||||||
#define _API_H_
|
#define API_H
|
||||||
|
|
||||||
#define REAL_TIME_TASK_CYCLE_MS 50
|
#define REAL_TIME_TASK_CYCLE_MS 50
|
||||||
#define XXX -999
|
#define XXX -999
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
#define TRUE 1
|
#define TRUE 1
|
||||||
#define FALSE 0
|
#define FALSE 0
|
||||||
|
|
||||||
void register_debug_function(void(*my_assert)(const char* file, int line), void(*my_log_out)(const char* log));
|
void register_debug_function(void(*my_assert)(const char* file, int line), void(*my_log_out)(const char* log));
|
||||||
void _assert(const char* file, int line);
|
void _assert(const char* file, int line);
|
||||||
#define ASSERT(condition) \
|
#define ASSERT(condition) \
|
||||||
do{ \
|
do{ \
|
||||||
if(!(condition))_assert(__FILE__, __LINE__);\
|
if(!(condition))_assert(__FILE__, __LINE__);\
|
||||||
}while(0)
|
}while(0)
|
||||||
void log_out(const char* log);
|
void log_out(const char* log);
|
||||||
|
|
||||||
#define GL_ARGB(a, r, g, b) ((((unsigned int)(a)) << 24) | (((unsigned int)(r)) << 16) | (((unsigned int)(g)) << 8) | ((unsigned int)(b)))
|
#define GL_ARGB(a, r, g, b) ((((unsigned int)(a)) << 24) | (((unsigned int)(r)) << 16) | (((unsigned int)(g)) << 8) | ((unsigned int)(b)))
|
||||||
#define GL_ARGB_A(rgb) ((((unsigned int)(rgb)) >> 24) & 0xFF)
|
#define GL_ARGB_A(rgb) ((((unsigned int)(rgb)) >> 24) & 0xFF)
|
||||||
|
|
||||||
#define GL_RGB(r, g, b) ((0xFF << 24) | (((unsigned int)(r)) << 16) | (((unsigned int)(g)) << 8) | ((unsigned int)(b)))
|
#define GL_RGB(r, g, b) ((0xFF << 24) | (((unsigned int)(r)) << 16) | (((unsigned int)(g)) << 8) | ((unsigned int)(b)))
|
||||||
#define GL_RGB_R(rgb) ((((unsigned int)(rgb)) >> 16) & 0xFF)
|
#define GL_RGB_R(rgb) ((((unsigned int)(rgb)) >> 16) & 0xFF)
|
||||||
#define GL_RGB_G(rgb) ((((unsigned int)(rgb)) >> 8) & 0xFF)
|
#define GL_RGB_G(rgb) ((((unsigned int)(rgb)) >> 8) & 0xFF)
|
||||||
#define GL_RGB_B(rgb) (((unsigned int)(rgb)) & 0xFF)
|
#define GL_RGB_B(rgb) (((unsigned int)(rgb)) & 0xFF)
|
||||||
#define GL_RGB_32_to_16(rgb) (((((unsigned int)(rgb)) & 0xFF) >> 3) | ((((unsigned int)(rgb)) & 0xFC00) >> 5) | ((((unsigned int)(rgb)) & 0xF80000) >> 8))
|
#define GL_RGB_32_to_16(rgb) (((((unsigned int)(rgb)) & 0xFF) >> 3) | ((((unsigned int)(rgb)) & 0xFC00) >> 5) | ((((unsigned int)(rgb)) & 0xF80000) >> 8))
|
||||||
#define GL_RGB_16_to_32(rgb) (((((unsigned int)(rgb)) & 0x1F) << 3) | ((((unsigned int)(rgb)) & 0x7E0) << 5) | ((((unsigned int)(rgb)) & 0xF800) << 8))
|
#define GL_RGB_16_to_32(rgb) (((((unsigned int)(rgb)) & 0x1F) << 3) | ((((unsigned int)(rgb)) & 0x7E0) << 5) | ((((unsigned int)(rgb)) & 0xF800) << 8))
|
||||||
|
|
||||||
typedef struct _T_TIME
|
typedef struct _T_TIME
|
||||||
{
|
{
|
||||||
unsigned short year;
|
unsigned short year;
|
||||||
unsigned short month;
|
unsigned short month;
|
||||||
unsigned short date;
|
unsigned short date;
|
||||||
unsigned short day;
|
unsigned short day;
|
||||||
unsigned short hour;
|
unsigned short hour;
|
||||||
unsigned short minute;
|
unsigned short minute;
|
||||||
unsigned short second;
|
unsigned short second;
|
||||||
}T_TIME;
|
}T_TIME;
|
||||||
|
|
||||||
long get_time_in_second();
|
long get_time_in_second();
|
||||||
T_TIME second_to_day(long second);
|
T_TIME second_to_day(long second);
|
||||||
T_TIME get_time();
|
T_TIME get_time();
|
||||||
|
|
||||||
void start_real_timer(void (*func)(void* arg));
|
void start_real_timer(void (*func)(void* arg));
|
||||||
void register_timer(int milli_second, void func(void* ptmr, void* parg));
|
void register_timer(int milli_second, void func(void* ptmr, void* parg));
|
||||||
|
|
||||||
unsigned int get_cur_thread_id();
|
unsigned int get_cur_thread_id();
|
||||||
void create_thread(unsigned long* thread_id, void* attr, void *(*start_routine) (void *), void* arg);
|
void create_thread(unsigned long* thread_id, void* attr, void *(*start_routine) (void *), void* arg);
|
||||||
void thread_sleep(unsigned int milli_seconds);
|
void thread_sleep(unsigned int milli_seconds);
|
||||||
int build_bmp(const char *filename, unsigned int width, unsigned int height, unsigned char *data);
|
int build_bmp(const char *filename, unsigned int width, unsigned int height, unsigned char *data);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef __AUDIO_MANGE_H__
|
#ifndef AUDIO_MANGE_H
|
||||||
#define __AUDIO_MANGE_H__
|
#define AUDIO_MANGE_H
|
||||||
|
|
||||||
enum AUDIO_TYPE
|
enum AUDIO_TYPE
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _BITMAP_UNIT_H_
|
#ifndef BITMAP_UNIT_H
|
||||||
#define _BITMAP_UNIT_H_
|
#define BITMAP_UNIT_H
|
||||||
|
|
||||||
class c_surface;
|
class c_surface;
|
||||||
class c_bitmap
|
class c_bitmap
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _DISPLAY_H_
|
#ifndef DISPLAY_H
|
||||||
#define _DISPLAY_H_
|
#define DISPLAY_H
|
||||||
|
|
||||||
#define SURFACE_CNT_MAX 6//root + pages
|
#define SURFACE_CNT_MAX 6//root + pages
|
||||||
|
|
||||||
@ -29,4 +29,4 @@ private:
|
|||||||
c_surface* m_surface_group[SURFACE_CNT_MAX];
|
c_surface* m_surface_group[SURFACE_CNT_MAX];
|
||||||
unsigned int m_surface_cnt;
|
unsigned int m_surface_cnt;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _MSG_H
|
#ifndef MSG_H
|
||||||
#define _MSG_H
|
#define MSG_H
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _RECT_H
|
#ifndef RECT_H
|
||||||
#define _RECT_H
|
#define RECT_H
|
||||||
|
|
||||||
#define ALIGN_HCENTER 0x00000000L
|
#define ALIGN_HCENTER 0x00000000L
|
||||||
#define ALIGN_LEFT 0x01000000L
|
#define ALIGN_LEFT 0x01000000L
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _RESOURCE_H_
|
#ifndef RESOURCE_H
|
||||||
#define _RESOURCE_H_
|
#define RESOURCE_H
|
||||||
|
|
||||||
//BITMAP
|
//BITMAP
|
||||||
typedef struct struct_bitmap_info
|
typedef struct struct_bitmap_info
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _GAL_H_
|
#ifndef GAL_H
|
||||||
#define _GAL_H_
|
#define GAL_H
|
||||||
|
|
||||||
struct FRAME_LAYER
|
struct FRAME_LAYER
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _WAVE_BUFFER_H_
|
#ifndef WAVE_BUFFER_H
|
||||||
#define _WAVE_BUFFER_H_
|
#define WAVE_BUFFER_H
|
||||||
|
|
||||||
#define WAVE_BUFFER_LEN 1024
|
#define WAVE_BUFFER_LEN 1024
|
||||||
#define WAVE_READ_CACHE_LEN 8
|
#define WAVE_READ_CACHE_LEN 8
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _WAVE_CTRL_H_
|
#ifndef WAVE_CTRL_H
|
||||||
#define _WAVE_CTRL_H_
|
#define WAVE_CTRL_H
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _GUI_WND_H_
|
#ifndef GUI_WND_H
|
||||||
#define _GUI_WND_H_
|
#define GUI_WND_H
|
||||||
|
|
||||||
//Window attribution
|
//Window attribution
|
||||||
#define GL_ATTR_VISIBLE 0x80000000L
|
#define GL_ATTR_VISIBLE 0x80000000L
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _WORD_UNIT_H_
|
#ifndef WORD_UNIT_H
|
||||||
#define _WORD_UNIT_H_
|
#define WORD_UNIT_H
|
||||||
|
|
||||||
class c_surface;
|
class c_surface;
|
||||||
class c_word
|
class c_word
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _BUTTON_H_
|
#ifndef BUTTON_H
|
||||||
#define _BUTTON_H_
|
#define BUTTON_H
|
||||||
|
|
||||||
#define GL_BN_CLICKED 0x1111
|
#define GL_BN_CLICKED 0x1111
|
||||||
#define ON_GL_BN_CLICKED(ctrlId, func) \
|
#define ON_GL_BN_CLICKED(ctrlId, func) \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _DIALOG_H_
|
#ifndef DIALOG_H
|
||||||
#define _DIALOG_H_
|
#define DIALOG_H
|
||||||
|
|
||||||
class c_surface;
|
class c_surface;
|
||||||
class c_dialog;
|
class c_dialog;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _EDIT_H_
|
#ifndef EDIT_H
|
||||||
#define _EDIT_H_
|
#define EDIT_H
|
||||||
|
|
||||||
#define KEY_BOARD_STYLE 0x00001000L
|
#define KEY_BOARD_STYLE 0x00001000L
|
||||||
#define NUM_BOARD_STYLE 0x00002000L
|
#define NUM_BOARD_STYLE 0x00002000L
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _GESTURE_H_
|
#ifndef GESTURE_H
|
||||||
#define _GESTURE_H_
|
#define GESTURE_H
|
||||||
|
|
||||||
typedef enum{
|
typedef enum{
|
||||||
TOUCH_MOVE,
|
TOUCH_MOVE,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _KEYBOARD_H_
|
#ifndef KEYBOARD_H
|
||||||
#define _KEYBOARD_H_
|
#define KEYBOARD_H
|
||||||
|
|
||||||
#define KEYBORAD_CLICK 0x5014
|
#define KEYBORAD_CLICK 0x5014
|
||||||
#define ON_KEYBORAD_UPDATE(ctrlId, func) \
|
#define ON_KEYBORAD_UPDATE(ctrlId, func) \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _LABEL_H_
|
#ifndef LABEL_H
|
||||||
#define _LABEL_H_
|
#define LABEL_H
|
||||||
|
|
||||||
class c_label : public c_wnd
|
class c_label : public c_wnd
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _LIST_BOX_H_
|
#ifndef LIST_BOX_H
|
||||||
#define _LIST_BOX_H_
|
#define LIST_BOX_H
|
||||||
|
|
||||||
#define MAX_ITEM_NUM 12
|
#define MAX_ITEM_NUM 12
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _MY_RESOURCE_H_
|
#ifndef MY_RESOURCE_H
|
||||||
#define _MY_RESOURCE_H_
|
#define MY_RESOURCE_H
|
||||||
|
|
||||||
typedef struct struct_font_info FONT_INFO;
|
typedef struct struct_font_info FONT_INFO;
|
||||||
typedef struct struct_color_rect COLOR_RECT;
|
typedef struct struct_color_rect COLOR_RECT;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef PAGE_GROUP_H_
|
#ifndef PAGE_GROUP_H
|
||||||
#define PAGE_GROUP_H_
|
#define PAGE_GROUP_H
|
||||||
|
|
||||||
#define MAX_PAGES 5
|
#define MAX_PAGES 5
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _SPIN_BOX_H_
|
#ifndef SPIN_BOX_H
|
||||||
#define _SPIN_BOX_H_
|
#define SPIN_BOX_H
|
||||||
|
|
||||||
#define GL_SPIN_SELECT 0x2222
|
#define GL_SPIN_SELECT 0x2222
|
||||||
#define GL_SPIN_CONFIRM 0x3333
|
#define GL_SPIN_CONFIRM 0x3333
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#ifndef _TABLE_H_
|
#ifndef TABLE_H
|
||||||
#define _TABLE_H_
|
#define TABLE_H
|
||||||
|
|
||||||
#define MAX_COL_NUM 30
|
#define MAX_COL_NUM 30
|
||||||
#define MAX_ROW_NUM 30
|
#define MAX_ROW_NUM 30
|
||||||
|
Loading…
Reference in New Issue
Block a user