tx-gxx-linux/device/gxx-linux/display/DisplayCenter.h

31 lines
652 B
C++

#pragma once
#include <thread>
#include "BlockingQueue.h"
#include "Displaydef.h"
class LCDDisplay;
class DisplayCenter
{
public:
DisplayCenter();
~DisplayCenter();
void PutMsg(DisType distype,int pagenum,ClearScreen clearscreen);
void ResetMsgQueue();
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;
};