newtx/sdk/base/ui.cpp

43 lines
879 B
C++
Raw Normal View History

#include "ui.h"
#include "utils.h"
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ipc class
class ui_messenger
{
public:
ui_messenger()
{}
~ui_messenger()
{}
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// interface
static MUTEX msg_lk_;
static ui_messenger *msgr = nullptr;
namespace devui
{
void init_ui(std::function<std::string(int)> uicb)
{
SIMPLE_LOCK(msg_lk_);
}
void uninit_ui(void)
{
SIMPLE_LOCK(msg_lk_);
if(msgr)
delete msgr;
msgr = nullptr;
}
void display_message(uint32_t msgid, uint8_t clear_mode, uint8_t draw_mode)
{
SIMPLE_LOCK(msg_lk_);
}
};