mirror of
https://gitee.com/idea4good/GuiLite.git
synced 2025-01-15 17:02:52 +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) | 初级 |
|
||||
| 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) | 中级 |
|
||||
| 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) | 高级 |
|
||||
|
||||
## 开发文档
|
||||
|
@ -1,50 +1,50 @@
|
||||
#ifndef _API_H_
|
||||
#define _API_H_
|
||||
|
||||
#define REAL_TIME_TASK_CYCLE_MS 50
|
||||
#define XXX -999
|
||||
#define NULL 0
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
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);
|
||||
#define ASSERT(condition) \
|
||||
do{ \
|
||||
if(!(condition))_assert(__FILE__, __LINE__);\
|
||||
}while(0)
|
||||
void log_out(const char* log);
|
||||
|
||||
#ifndef API_H
|
||||
#define API_H
|
||||
|
||||
#define REAL_TIME_TASK_CYCLE_MS 50
|
||||
#define XXX -999
|
||||
#define NULL 0
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
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);
|
||||
#define ASSERT(condition) \
|
||||
do{ \
|
||||
if(!(condition))_assert(__FILE__, __LINE__);\
|
||||
}while(0)
|
||||
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(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(rgb) ((((unsigned int)(rgb)) >> 16) & 0xFF)
|
||||
#define GL_RGB_G(rgb) ((((unsigned int)(rgb)) >> 8) & 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_16_to_32(rgb) (((((unsigned int)(rgb)) & 0x1F) << 3) | ((((unsigned int)(rgb)) & 0x7E0) << 5) | ((((unsigned int)(rgb)) & 0xF800) << 8))
|
||||
|
||||
typedef struct _T_TIME
|
||||
{
|
||||
unsigned short year;
|
||||
unsigned short month;
|
||||
unsigned short date;
|
||||
unsigned short day;
|
||||
unsigned short hour;
|
||||
unsigned short minute;
|
||||
unsigned short second;
|
||||
}T_TIME;
|
||||
|
||||
long get_time_in_second();
|
||||
T_TIME second_to_day(long second);
|
||||
T_TIME get_time();
|
||||
|
||||
void start_real_timer(void (*func)(void* arg));
|
||||
void register_timer(int milli_second, void func(void* ptmr, void* parg));
|
||||
|
||||
unsigned int get_cur_thread_id();
|
||||
void create_thread(unsigned long* thread_id, void* attr, void *(*start_routine) (void *), void* arg);
|
||||
void thread_sleep(unsigned int milli_seconds);
|
||||
int build_bmp(const char *filename, unsigned int width, unsigned int height, unsigned char *data);
|
||||
#endif
|
||||
#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(rgb) ((((unsigned int)(rgb)) >> 16) & 0xFF)
|
||||
#define GL_RGB_G(rgb) ((((unsigned int)(rgb)) >> 8) & 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_16_to_32(rgb) (((((unsigned int)(rgb)) & 0x1F) << 3) | ((((unsigned int)(rgb)) & 0x7E0) << 5) | ((((unsigned int)(rgb)) & 0xF800) << 8))
|
||||
|
||||
typedef struct _T_TIME
|
||||
{
|
||||
unsigned short year;
|
||||
unsigned short month;
|
||||
unsigned short date;
|
||||
unsigned short day;
|
||||
unsigned short hour;
|
||||
unsigned short minute;
|
||||
unsigned short second;
|
||||
}T_TIME;
|
||||
|
||||
long get_time_in_second();
|
||||
T_TIME second_to_day(long second);
|
||||
T_TIME get_time();
|
||||
|
||||
void start_real_timer(void (*func)(void* arg));
|
||||
void register_timer(int milli_second, void func(void* ptmr, void* parg));
|
||||
|
||||
unsigned int get_cur_thread_id();
|
||||
void create_thread(unsigned long* thread_id, void* attr, void *(*start_routine) (void *), void* arg);
|
||||
void thread_sleep(unsigned int milli_seconds);
|
||||
int build_bmp(const char *filename, unsigned int width, unsigned int height, unsigned char *data);
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef __AUDIO_MANGE_H__
|
||||
#define __AUDIO_MANGE_H__
|
||||
#ifndef AUDIO_MANGE_H
|
||||
#define AUDIO_MANGE_H
|
||||
|
||||
enum AUDIO_TYPE
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _BITMAP_UNIT_H_
|
||||
#define _BITMAP_UNIT_H_
|
||||
#ifndef BITMAP_UNIT_H
|
||||
#define BITMAP_UNIT_H
|
||||
|
||||
class c_surface;
|
||||
class c_bitmap
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _DISPLAY_H_
|
||||
#define _DISPLAY_H_
|
||||
#ifndef DISPLAY_H
|
||||
#define DISPLAY_H
|
||||
|
||||
#define SURFACE_CNT_MAX 6//root + pages
|
||||
|
||||
@ -29,4 +29,4 @@ private:
|
||||
c_surface* m_surface_group[SURFACE_CNT_MAX];
|
||||
unsigned int m_surface_cnt;
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _MSG_H
|
||||
#define _MSG_H
|
||||
#ifndef MSG_H
|
||||
#define MSG_H
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _RECT_H
|
||||
#define _RECT_H
|
||||
#ifndef RECT_H
|
||||
#define RECT_H
|
||||
|
||||
#define ALIGN_HCENTER 0x00000000L
|
||||
#define ALIGN_LEFT 0x01000000L
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _RESOURCE_H_
|
||||
#define _RESOURCE_H_
|
||||
#ifndef RESOURCE_H
|
||||
#define RESOURCE_H
|
||||
|
||||
//BITMAP
|
||||
typedef struct struct_bitmap_info
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _GAL_H_
|
||||
#define _GAL_H_
|
||||
#ifndef GAL_H
|
||||
#define GAL_H
|
||||
|
||||
struct FRAME_LAYER
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _WAVE_BUFFER_H_
|
||||
#define _WAVE_BUFFER_H_
|
||||
#ifndef WAVE_BUFFER_H
|
||||
#define WAVE_BUFFER_H
|
||||
|
||||
#define WAVE_BUFFER_LEN 1024
|
||||
#define WAVE_READ_CACHE_LEN 8
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _WAVE_CTRL_H_
|
||||
#define _WAVE_CTRL_H_
|
||||
#ifndef WAVE_CTRL_H
|
||||
#define WAVE_CTRL_H
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _GUI_WND_H_
|
||||
#define _GUI_WND_H_
|
||||
#ifndef GUI_WND_H
|
||||
#define GUI_WND_H
|
||||
|
||||
//Window attribution
|
||||
#define GL_ATTR_VISIBLE 0x80000000L
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _WORD_UNIT_H_
|
||||
#define _WORD_UNIT_H_
|
||||
#ifndef WORD_UNIT_H
|
||||
#define WORD_UNIT_H
|
||||
|
||||
class c_surface;
|
||||
class c_word
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _BUTTON_H_
|
||||
#define _BUTTON_H_
|
||||
#ifndef BUTTON_H
|
||||
#define BUTTON_H
|
||||
|
||||
#define GL_BN_CLICKED 0x1111
|
||||
#define ON_GL_BN_CLICKED(ctrlId, func) \
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _DIALOG_H_
|
||||
#define _DIALOG_H_
|
||||
#ifndef DIALOG_H
|
||||
#define DIALOG_H
|
||||
|
||||
class c_surface;
|
||||
class c_dialog;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _EDIT_H_
|
||||
#define _EDIT_H_
|
||||
#ifndef EDIT_H
|
||||
#define EDIT_H
|
||||
|
||||
#define KEY_BOARD_STYLE 0x00001000L
|
||||
#define NUM_BOARD_STYLE 0x00002000L
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _GESTURE_H_
|
||||
#define _GESTURE_H_
|
||||
#ifndef GESTURE_H
|
||||
#define GESTURE_H
|
||||
|
||||
typedef enum{
|
||||
TOUCH_MOVE,
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _KEYBOARD_H_
|
||||
#define _KEYBOARD_H_
|
||||
#ifndef KEYBOARD_H
|
||||
#define KEYBOARD_H
|
||||
|
||||
#define KEYBORAD_CLICK 0x5014
|
||||
#define ON_KEYBORAD_UPDATE(ctrlId, func) \
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _LABEL_H_
|
||||
#define _LABEL_H_
|
||||
#ifndef LABEL_H
|
||||
#define LABEL_H
|
||||
|
||||
class c_label : public c_wnd
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _LIST_BOX_H_
|
||||
#define _LIST_BOX_H_
|
||||
#ifndef LIST_BOX_H
|
||||
#define LIST_BOX_H
|
||||
|
||||
#define MAX_ITEM_NUM 12
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _MY_RESOURCE_H_
|
||||
#define _MY_RESOURCE_H_
|
||||
#ifndef MY_RESOURCE_H
|
||||
#define MY_RESOURCE_H
|
||||
|
||||
typedef struct struct_font_info FONT_INFO;
|
||||
typedef struct struct_color_rect COLOR_RECT;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef PAGE_GROUP_H_
|
||||
#define PAGE_GROUP_H_
|
||||
#ifndef PAGE_GROUP_H
|
||||
#define PAGE_GROUP_H
|
||||
|
||||
#define MAX_PAGES 5
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _SPIN_BOX_H_
|
||||
#define _SPIN_BOX_H_
|
||||
#ifndef SPIN_BOX_H
|
||||
#define SPIN_BOX_H
|
||||
|
||||
#define GL_SPIN_SELECT 0x2222
|
||||
#define GL_SPIN_CONFIRM 0x3333
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef _TABLE_H_
|
||||
#define _TABLE_H_
|
||||
#ifndef TABLE_H
|
||||
#define TABLE_H
|
||||
|
||||
#define MAX_COL_NUM 30
|
||||
#define MAX_ROW_NUM 30
|
||||
|
Loading…
x
Reference in New Issue
Block a user