⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 screen_obj_v1_00.h

📁 just uploading the file to get a new downlad for AD7843
💻 H
字号:
#ifndef _SCREEN_OBJ_H_
#define _SCREEN_OBJ_H_

#define so_pos_t		short

#ifndef SCREEN_HSIZE
#define SCREEN_HSIZE	TS_SIZE_X
#endif

#ifndef SCREEN_VSIZE
#define SCREEN_VSIZE	TS_SIZE_Y
#endif

typedef enum
{
	SO_ST_OFF = 0,
	SO_ST_ON,
} so_stat_t;

typedef struct
{
	so_pos_t hsize;				//current horizontal size
	so_pos_t vsize;				//current vertical size
	so_pos_t horigin;			//current horizontal origin
	so_pos_t vorigin;			//current vertical origin
	so_stat_t stat; 			//status of the object
	int val;					//value of the object
	void (*draw)(void);			//draw function
	void (*do_)(so_pos_t lhpos,so_pos_t lvpos,so_pos_t ghpos,so_pos_t gvpos,pstatus_t p_stat); //do function
	void (*task100ms)(void);	//do every 100 ms
	unsigned char (*is_white)(so_pos_t lhpos,so_pos_t lvpos); //check if the specific position is white
} so_obj_t;

#define MAX_SCR_OBJ		16

void ScrObjInit(void (*first_screen_init_func)(void));
int ScrObjDo(so_pos_t ghpos,so_pos_t gvpos,pstatus_t p_stat); //return object id or -1 when nothing found
void ScrObjTask100ms(void);
void ScrObjToTopLayer(unsigned char obj_id);	//set this window to top and rearrange layer stack

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -