2020-03-02 13:00:24 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "XImage.h"
|
2020-03-06 08:55:52 +01:00
|
|
|
//#include "../refit/IO.h"
|
2020-03-02 13:00:24 +01:00
|
|
|
|
|
|
|
class REFIT_MENU_SCREEN;
|
|
|
|
class XImage;
|
|
|
|
|
|
|
|
class XPointer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
XPointer();
|
|
|
|
~XPointer();
|
|
|
|
|
|
|
|
protected:
|
2020-03-02 20:00:01 +01:00
|
|
|
EFI_SIMPLE_POINTER_PROTOCOL *SimplePointerProtocol;
|
2020-03-06 20:56:32 +01:00
|
|
|
XImage* PointerImage;
|
2020-03-02 20:02:28 +01:00
|
|
|
XImage newImage;
|
|
|
|
XImage oldImage;
|
2020-03-02 20:00:01 +01:00
|
|
|
|
|
|
|
EG_RECT newPlace;
|
|
|
|
EG_RECT oldPlace;
|
|
|
|
|
|
|
|
UINT64 LastClickTime; //not EFI_TIME
|
|
|
|
EFI_SIMPLE_POINTER_STATE State;
|
2020-03-02 13:00:24 +01:00
|
|
|
MOUSE_EVENT MouseEvent;
|
2020-03-03 15:17:39 +01:00
|
|
|
bool Alive;
|
2020-03-02 13:00:24 +01:00
|
|
|
|
|
|
|
public:
|
|
|
|
void Hide();
|
2020-03-03 15:17:39 +01:00
|
|
|
bool isAlive();
|
2020-03-02 13:00:24 +01:00
|
|
|
EFI_STATUS MouseBirth();
|
|
|
|
VOID KillMouse();
|
|
|
|
VOID UpdatePointer();
|
|
|
|
bool MouseInRect(EG_RECT *Place);
|
|
|
|
EFI_STATUS CheckMouseEvent(REFIT_MENU_SCREEN *Screen);
|
|
|
|
|
2020-03-06 20:56:32 +01:00
|
|
|
bool isEmpty() const { return PointerImage->isEmpty(); }
|
2020-03-03 14:52:23 +01:00
|
|
|
|
2020-03-02 13:00:24 +01:00
|
|
|
protected:
|
2020-03-02 20:00:01 +01:00
|
|
|
VOID Draw();
|
2020-03-03 14:52:23 +01:00
|
|
|
VOID DrawPointer();
|
2020-03-02 20:00:01 +01:00
|
|
|
};
|