blob: 682e69f49b61d75d8f2dd7ad30c810bbb2de9c07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#ifndef _ASRUA_EDITOR_INPUT_H_
#define _ASRUA_EDITOR_INPUT_H_
#include <windows.h>
#include <asura-utils/Classes.h>
#include <asura-utils/Math/Vector2.hpp>
#include <asura-core/Input/InputDevice.h>
namespace_begin(AsuraEditor)
// Win32 input entry
class Input : public AEInput::InputDevice
{
public:
Input();
~Input();
bool Open(HWND window);
void Close(void);
bool GetJoystickNames(std::vector<std::string> &names);
bool Activate(bool active);
bool ToggleFullscreen(bool fullscreen, HWND window);
bool Process(bool discard);
LRESULT OnKey(HWND window, UINT message, WPARAM wParam, LPARAM lParam);
LRESULT OnInput(HWND window, UINT message, WPARAM wParam, LPARAM lParam);
LRESULT OnDeviceChange(LPCWSTR name, bool add);
static bool ConvertPositionToClientAreaCoord(HWND activeWindow, POINT position, AEMath::Vector2f& newPos);
private:
bool UpdateState();
};
extern Input g_Input;
namespace_end
#endif
|