54 lines
974 B
C
54 lines
974 B
C
/*
|
|
* 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_ */
|