mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-27 12:15:19 +01:00
85d3bd1ad9
Signed-off-by: SergeySlice <sergey.slice@gmail.com>
48 lines
917 B
C++
48 lines
917 B
C++
#pragma once
|
|
|
|
#include "XImage.h"
|
|
//#include "../refit/IO.h"
|
|
#include "libeg.h"
|
|
|
|
class REFIT_MENU_SCREEN;
|
|
class XImage;
|
|
|
|
class XPointer
|
|
{
|
|
public:
|
|
XPointer();
|
|
~XPointer();
|
|
|
|
protected:
|
|
EFI_SIMPLE_POINTER_PROTOCOL *SimplePointerProtocol;
|
|
XImage* PointerImage;
|
|
// XImage newImage;
|
|
XImage oldImage;
|
|
|
|
EG_RECT newPlace;
|
|
EG_RECT oldPlace;
|
|
|
|
UINT64 LastClickTime; //not EFI_TIME
|
|
EFI_SIMPLE_POINTER_STATE State;
|
|
MOUSE_EVENT MouseEvent;
|
|
bool Alive;
|
|
bool night;
|
|
|
|
public:
|
|
void Hide();
|
|
bool isAlive();
|
|
EFI_STATUS MouseBirth();
|
|
VOID KillMouse();
|
|
VOID UpdatePointer(bool daylight);
|
|
bool MouseInRect(EG_RECT *Place);
|
|
|
|
bool isEmpty() const { return PointerImage->isEmpty(); }
|
|
void ClearEvent() { MouseEvent = NoEvents; }
|
|
MOUSE_EVENT GetEvent();
|
|
EG_RECT& GetPlace() { return newPlace; }
|
|
|
|
protected:
|
|
VOID Draw();
|
|
VOID DrawPointer();
|
|
};
|