2023-01-09 16:17:03 +08:00
|
|
|
#ifndef REFEREE_UI_H
|
|
|
|
#define REFEREE_UI_H
|
|
|
|
|
|
|
|
#include "stdarg.h"
|
|
|
|
#include "stdint.h"
|
2023-04-19 18:52:40 +08:00
|
|
|
#include "referee_protocol.h"
|
2023-01-24 22:37:53 +08:00
|
|
|
#include "rm_referee.h"
|
2023-01-09 16:17:03 +08:00
|
|
|
|
2023-04-19 18:52:40 +08:00
|
|
|
#pragma pack(1) // 按1字节对齐
|
2023-01-09 16:17:03 +08:00
|
|
|
|
2023-01-15 21:11:15 +08:00
|
|
|
/* 此处的定义只与UI绘制有关 */
|
2023-01-09 16:17:03 +08:00
|
|
|
typedef struct
|
|
|
|
{
|
2023-04-19 18:52:40 +08:00
|
|
|
xFrameHeader FrameHeader;
|
|
|
|
uint16_t CmdID;
|
2023-01-13 21:45:04 +08:00
|
|
|
ext_student_interactive_header_data_t datahead;
|
2023-04-19 18:52:40 +08:00
|
|
|
uint8_t Delete_Operate; // 删除操作
|
|
|
|
uint8_t Layer;
|
2023-01-13 21:45:04 +08:00
|
|
|
uint16_t frametail;
|
|
|
|
} UI_delete_t;
|
2023-01-09 16:17:03 +08:00
|
|
|
|
|
|
|
typedef struct
|
2023-01-13 21:45:04 +08:00
|
|
|
{
|
2023-04-19 18:52:40 +08:00
|
|
|
xFrameHeader FrameHeader;
|
|
|
|
uint16_t CmdID;
|
2023-01-13 21:45:04 +08:00
|
|
|
ext_student_interactive_header_data_t datahead;
|
|
|
|
uint16_t frametail;
|
|
|
|
} UI_GraphReFresh_t;
|
2023-01-09 16:17:03 +08:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2023-04-19 18:52:40 +08:00
|
|
|
xFrameHeader FrameHeader;
|
|
|
|
uint16_t CmdID;
|
2023-01-13 21:45:04 +08:00
|
|
|
ext_student_interactive_header_data_t datahead;
|
|
|
|
String_Data_t String_Data;
|
2023-04-19 18:52:40 +08:00
|
|
|
uint16_t frametail;
|
|
|
|
} UI_CharReFresh_t; // 打印字符串数据
|
2023-01-13 21:45:04 +08:00
|
|
|
|
2023-01-09 16:17:03 +08:00
|
|
|
#pragma pack()
|
|
|
|
|
2023-04-19 18:52:40 +08:00
|
|
|
void UIDelete(referee_id_t *_id, uint8_t Del_Operate, uint8_t Del_Layer);
|
2023-01-09 16:17:03 +08:00
|
|
|
|
2023-06-15 12:19:32 +08:00
|
|
|
void UILineDraw(Graph_Data_t *graph, char graphname[3], uint32_t Graph_Operate, uint32_t Graph_Layer, uint32_t Graph_Color,
|
|
|
|
uint32_t Graph_Width, uint32_t Start_x, uint32_t Start_y, uint32_t End_x, uint32_t End_y);
|
2023-01-24 22:37:53 +08:00
|
|
|
|
2023-06-15 12:19:32 +08:00
|
|
|
void UIRectangleDraw(Graph_Data_t *graph, char graphname[3], uint32_t Graph_Operate, uint32_t Graph_Layer, uint32_t Graph_Color,
|
|
|
|
uint32_t Graph_Width, uint32_t Start_x, uint32_t Start_y, uint32_t End_x, uint32_t End_y);
|
2023-01-24 22:37:53 +08:00
|
|
|
|
2023-06-15 12:19:32 +08:00
|
|
|
void UICircleDraw(Graph_Data_t *graph, char graphname[3], uint32_t Graph_Operate, uint32_t Graph_Layer, uint32_t Graph_Color,
|
|
|
|
uint32_t Graph_Width, uint32_t Start_x, uint32_t Start_y, uint32_t Graph_Radius);
|
2023-01-24 22:37:53 +08:00
|
|
|
|
2023-06-15 12:19:32 +08:00
|
|
|
void UIOvalDraw(Graph_Data_t *graph, char graphname[3], uint32_t Graph_Operate, uint32_t Graph_Layer, uint32_t Graph_Color,
|
|
|
|
uint32_t Graph_Width, uint32_t Start_x, uint32_t Start_y, uint32_t end_x, uint32_t end_y);
|
2023-01-24 22:37:53 +08:00
|
|
|
|
2023-06-15 12:19:32 +08:00
|
|
|
void UIArcDraw(Graph_Data_t *graph, char graphname[3], uint32_t Graph_Operate, uint32_t Graph_Layer, uint32_t Graph_Color,
|
|
|
|
uint32_t Graph_StartAngle, uint32_t Graph_EndAngle, uint32_t Graph_Width, uint32_t Start_x, uint32_t Start_y,
|
|
|
|
uint32_t end_x, uint32_t end_y);
|
2023-01-24 22:37:53 +08:00
|
|
|
|
2023-06-15 12:19:32 +08:00
|
|
|
void UIFloatDraw(Graph_Data_t *graph, char graphname[3], uint32_t Graph_Operate, uint32_t Graph_Layer, uint32_t Graph_Color,
|
|
|
|
uint32_t Graph_Size, uint32_t Graph_Digit, uint32_t Graph_Width, uint32_t Start_x, uint32_t Start_y, int32_t Graph_Float);
|
2023-01-24 22:37:53 +08:00
|
|
|
|
2023-06-15 12:19:32 +08:00
|
|
|
void UIIntDraw(Graph_Data_t *graph, char graphname[3], uint32_t Graph_Operate, uint32_t Graph_Layer, uint32_t Graph_Color,
|
|
|
|
uint32_t Graph_Size, uint32_t Graph_Width, uint32_t Start_x, uint32_t Start_y, int32_t Graph_Integer);
|
2023-01-24 22:37:53 +08:00
|
|
|
|
2023-06-15 12:19:32 +08:00
|
|
|
void UICharDraw(String_Data_t *graph, char graphname[3], uint32_t Graph_Operate, uint32_t Graph_Layer, uint32_t Graph_Color,
|
|
|
|
uint32_t Graph_Size, uint32_t Graph_Width, uint32_t Start_x, uint32_t Start_y, char *fmt, ...);
|
2023-01-24 22:37:53 +08:00
|
|
|
|
2023-06-15 12:19:32 +08:00
|
|
|
void UIGraphRefresh(referee_id_t *_id, int cnt, ...);
|
2023-01-24 22:37:53 +08:00
|
|
|
|
2023-06-15 12:19:32 +08:00
|
|
|
void UICharRefresh(referee_id_t *_id, String_Data_t string_Data);
|
2023-01-24 22:37:53 +08:00
|
|
|
|
2023-01-09 16:17:03 +08:00
|
|
|
#endif
|