📄 typedef.#1
字号:
#ifndef __TYPEDEF_H__
#define __TYPEDEF_H__
//read only
typedef struct CButton
{
unsigned int x0; // (x0,y0) is one of the pixels in the button area.
unsigned int y0;
unsigned int x1; //(x1,y1)和(x2,y2)分别为button有效区域左上角和右下角的坐标
unsigned int y1;
unsigned int x2;
unsigned int y2;
unsigned char border_color; //border's colour
unsigned char backcolor;
unsigned int notify_MSG; //控件通知码
} Cbutton;
//read and write
typedef struct CEdit
{
unsigned int x1; //(x1,y1) the insert position
unsigned int y1;
unsigned int x2; //(x1,y1)和(x2,y2)决定覆盖区域大小
unsigned int y2;
//unsigned int value; //numerical value
unsigned char text[6]; //string
} Cedit;
//static
typedef struct CStatic
{
unsigned int x1;
unsigned int y1;
unsigned int x2;
unsigned int y2;
}Cstatic;
//read only
typedef struct CStatusbar
{
unsigned int x1; //(x1,y1) the insert position
unsigned int y1;
unsigned int x2; //(x2,y2)the end position
unsigned int y2;
unsigned char* text; //string
} Cstatusbar;
typedef struct CDot
{
unsigned int x;
unsigned int y;
}Cdot,Cins_dot;
//注意这个数据结构可读可写,要声明在ram中
typedef struct CCurve
{
unsigned int x0; //(x0,y0)是上一点坐标,初始化时即为曲线起点坐标
unsigned int y0;
unsigned int x1; //(x1,y1)是当前要添加的曲线的终点
unsigned int y1;
unsigned char color; //曲线的颜色
}Ccurve;
//鼠标的状态 read and write
typedef struct CMSG
{
unsigned char up_down; //按下或释放标志
unsigned int x; //(x,y)被按下点在屏上坐标
unsigned int y;
} Msg;
//窗体,read only
typedef struct CForm
{
unsigned char index; //窗体索引号
unsigned char start_addr; //在flash中的起始地址和结束地址
} Cform;
//光标控制,read and write
typedef struct CCaract
{
unsigned int x; //光标像素插入点(x,y)
unsigned int y;
unsigned char background_color; //光标背景色
unsigned char fore_color; //光标前景色
unsigned char enable; //光标是否使能
} Ccaract;
//参数设置表
typedef struct CTable
{
unsigned char colomn; //表的行号
unsigned char array; //表的列号
unsigned char Is_data_exist; //有数据吗
unsigned char str[9][8]; //9行8列
Cins_dot ins_dot[9][8]; //输入插入点
}Ctable;
//保存新建表数据
typedef struct CSample_new_table
{
unsigned char colomn;
unsigned char array;
unsigned char v_step; //表的纵向步进
unsigned char Is_data_exist;
unsigned char str[8][10]; //8行10列
Cins_dot ins_dot[10];
}Csample_new_table;
//文件系统结构
typedef struct CFilesystem
{
unsigned char sum; //总的存储项目号
unsigned char pointer; //当前项目号
unsigned int item_addr; //要保存数据项的起始地址
unsigned char spide; //滑动变量
unsigned char restart; //掉头重新开始标志
unsigned char element[2]; //元素符号
unsigned char date[8]; //时间,如2008/05/06
unsigned char e_str[16][4];//发射率
}Cfilesys;
//温度参数
typedef struct CTemp_para
{
unsigned char hour; //小时
unsigned char minite; //分钟
unsigned int temperature; //温度
}Ctemp_para;
//时间参数刻度
typedef struct CScale
{
unsigned int sum_time;
unsigned int scale_time;
unsigned char hour;
unsigned char minite;
unsigned char scale_str[6]; //用于保存一个完整的时间字符串
}Cscale;
//邮箱信号
typedef struct CMessage_mail
{
unsigned char enable;
unsigned char form;
unsigned int event;
}Cmessage_mail;
#define busy 1
#define free 0
#define yes 1
#define no 0
#define btn_down 'T'
#define btn_up 'R'
#define Chinese 0
#define English 1
#define error 0
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -