You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.3 KiB
58 lines
1.3 KiB
#pragma once
|
|
|
|
#include "sdk\components\dwin\dwin_screen.hpp"
|
|
|
|
namespace iflytop {
|
|
namespace dwin {
|
|
using namespace std;
|
|
|
|
#pragma pack(1)
|
|
typedef struct {
|
|
uint16_t m_VP = 0;
|
|
uint16_t m_PosX = 0;
|
|
uint16_t m_PosY = 0;
|
|
uint16_t m_VMin = 0;
|
|
uint16_t m_VMax = 0;
|
|
uint16_t m_IconMin = 0;
|
|
uint16_t m_IconMax = 0;
|
|
|
|
uint8_t m_Mode = 0;
|
|
uint8_t m_IconLib = 0;
|
|
|
|
uint8_t m_ICONGamma = 0;
|
|
uint8_t m_LayerMode = 0;
|
|
|
|
uint8_t m_FilterSet = 0;
|
|
uint8_t m_PICGamma = 0;
|
|
} VarIconDescript_t;
|
|
#pragma pack()
|
|
|
|
class VarIcon {
|
|
DwinScreen *m_dwin_screen = nullptr;
|
|
|
|
uint16_t m_descript_add = 0;
|
|
VarIconDescript_t m_descript;
|
|
|
|
public:
|
|
bool init(DwinScreen *dwin_screen, uint16_t descript_add);
|
|
void initcfg(uint16_t valpointerAdd, uint16_t initval, uint16_t posx, uint16_t posy, uint16_t iconlib, uint16_t iconmin, uint16_t iconmax);
|
|
|
|
public:
|
|
bool flushcfg();
|
|
bool readcfg();
|
|
|
|
bool setVal(uint16_t val) { return m_dwin_screen->write_varspace16(m_descript.m_VP, val, 100); }
|
|
uint16_t getVal() {
|
|
uint16_t val = 0xffff;
|
|
m_dwin_screen->read_varspace16(m_descript.m_VP, val, 100);
|
|
return val;
|
|
}
|
|
|
|
VarIconDescript_t &getDescript() { return m_descript; }
|
|
|
|
void dumpinfo();
|
|
|
|
public:
|
|
};
|
|
} // namespace dwin
|
|
} // namespace iflytop
|