rk3399_arm_lvds/display/DisplayCenter.h

31 lines
711 B
C
Raw Permalink Normal View History

2024-03-05 03:46:18 +00:00
#pragma once
#include <thread>
#include "BlockingQueue.h"
#include "Displaydef.h"
#include "LCDDisplay.h"
class DisplayCenter
{
public:
DisplayCenter();
~DisplayCenter();
void PutMsg(DisType distype,int pagenum,ClearScreen clearscreen);
void ResetMsgQueue();
void set_language(LCDDisplay::Language language);
DisType getcurdistype();
private:
struct MsgPair{
DisType distype;
ClearScreen clearscree;
unsigned int pagenum;
std::string infomsg;
};
void runloop();
private:
BlockingQueue<MsgPair> m_msgs;
std::shared_ptr<std::thread> m_showthread;
std::shared_ptr<LCDDisplay> m_lcd;
volatile DisType m_distype;
bool brun;
};