Danbias/Code/Misc/Input/Include/Win32/Win32Mouse.h

41 lines
1.0 KiB
C
Raw Normal View History

2014-02-14 15:50:00 +01:00
/////////////////////////////////////////////////////////////////////
// Created by [Dennis Andersen] [2013]
/////////////////////////////////////////////////////////////////////
#ifndef INPUT_WIN32MOUSE_H
#define INPUT_WIN32MOUSE_H
#include "..\Mouse.h"
#include <Windows.h>
namespace Input
{
class Win32Mouse :public Mouse
{
public:
Win32Mouse();
~Win32Mouse();
bool IsBtnUp(Enum::SAMI key) override;
bool IsBtnDown(Enum::SAMI key) override;
int GetWheelDelta() override;
2014-02-20 11:27:43 +01:00
Struct::SAIPointInt2D GetPixelPosition(Struct::SAIPointInt2D targetMem = Struct::SAIPointInt2D()) override;
Struct::SAIPointFloat2D GetNormalizedPosition(Struct::SAIPointFloat2D targetMem = Struct::SAIPointFloat2D()) override;
2014-02-14 15:50:00 +01:00
2014-02-20 11:27:43 +01:00
void ProccessMouseData (bool isDown, Enum::SAMI btn, int delta, Struct::SAIPointInt2D velocity, unsigned int makeCode);
bool Create(HWND target);
2014-02-14 15:50:00 +01:00
private:
struct Buttons
{
unsigned int makeCode;
bool isDown;
};
static const int MAXBUTTONS = 25;
Buttons buttons[25];
2014-02-20 11:27:43 +01:00
RAWINPUTDEVICE device;
2014-02-14 15:50:00 +01:00
};
}
#endif // !INPUT_WIN32MOUSE_H