Add 'show windows' code

This commit is contained in:
2021-08-06 23:19:07 +08:00
parent 7f56a8ef4f
commit 11e983ef98
12 changed files with 6588 additions and 4881 deletions
+53
View File
@@ -0,0 +1,53 @@
/*
* windows.h
*
* Created on: Aug 6, 2021
* Author: wuwenfeng
*/
#ifndef WINDOWS_H_
#define WINDOWS_H_
#include "main.h"
#include "lcd.h"
typedef struct
{
uint16_t x;
uint16_t y;
uint16_t width;
uint16_t high;
COLOR_16 background;
char title[16];
}window;
typedef struct windows_stack
{
struct windows_stack *up;
window *window;
struct windows_stack *next;
}windows_stack;
typedef struct
{
COLOR_16 background;
windows_stack *windows;
windows_stack *last_windows;
//touch_device *touch; //Ò»¸öUI¹ÒÔØÒ»¸ö´¥¿ØÉ豸
uint8_t refresh_ui_flag;
}UI;
void Inteface_SetCursor(uint16_t Xpos, uint16_t Ypos);
void Inteface_SetColor(uint16_t color);
UI *UI_Init(COLOR_16 background);
window *New_Window(UI *ui,uint16_t x,uint16_t y,uint16_t width,uint16_t high,COLOR_16 background,const char *title);
void Refresh_UI(UI *ui);
void Set_Windows_Title(window *this_window,const char *title);
//void UI_Server(UI *ui);
#endif /* WINDOWS_H_ */