mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Provide a renderer callback when the overlay data changes
This commit is contained in:
@@ -2,25 +2,40 @@
|
||||
|
||||
#include <QString>
|
||||
|
||||
namespace Overlay {
|
||||
|
||||
enum OverlayType {
|
||||
OverlayDebug,
|
||||
OverlayMinorNotification,
|
||||
OverlayMajorNotification,
|
||||
OverlayMax
|
||||
};
|
||||
|
||||
class IOverlayRenderer
|
||||
{
|
||||
public:
|
||||
virtual ~IOverlayRenderer() = default;
|
||||
|
||||
virtual void notifyOverlayUpdated(OverlayType type) = 0;
|
||||
};
|
||||
|
||||
class OverlayManager
|
||||
{
|
||||
public:
|
||||
enum OverlayType {
|
||||
OverlayDebug,
|
||||
OverlayMinorNotification,
|
||||
OverlayMajorNotification,
|
||||
OverlayMax
|
||||
};
|
||||
|
||||
OverlayManager();
|
||||
|
||||
bool isOverlayEnabled(OverlayType type);
|
||||
char* getOverlayText(OverlayType type);
|
||||
void setOverlayTextUpdated(OverlayType type);
|
||||
void setOverlayState(OverlayType type, bool enabled);
|
||||
|
||||
void setOverlayRenderer(IOverlayRenderer* renderer);
|
||||
|
||||
struct {
|
||||
bool enabled;
|
||||
int updateSeq;
|
||||
char text[512];
|
||||
} m_Overlays[OverlayMax];
|
||||
IOverlayRenderer* m_Renderer;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user