2019-08-16 04:39:18 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-08-18 01:29:33 +00:00
|
|
|
#ifdef WIN32
|
|
|
|
|
2019-08-16 04:39:18 +00:00
|
|
|
class RawMouse
|
|
|
|
{
|
|
|
|
public:
|
2019-08-18 01:29:33 +00:00
|
|
|
RawMouse(void* ownerWindow);
|
2019-08-16 04:39:18 +00:00
|
|
|
~RawMouse();
|
|
|
|
|
|
|
|
float GetX();
|
|
|
|
float GetY();
|
|
|
|
|
|
|
|
private:
|
|
|
|
LRESULT OnMessage(INT message, WPARAM wparam, LPARAM lparam);
|
|
|
|
static LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
|
|
HWND handle = 0;
|
|
|
|
int x = 0;
|
|
|
|
int y = 0;
|
|
|
|
|
|
|
|
friend class RawMouseWindowClass;
|
|
|
|
};
|
2019-08-18 01:29:33 +00:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
class RawMouse
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
RawMouse(void* ownerWindow);
|
|
|
|
~RawMouse();
|
|
|
|
|
|
|
|
float GetX();
|
|
|
|
float GetY();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|