32 lines
No EOL
564 B
C++
32 lines
No EOL
564 B
C++
|
|
#ifndef PLATFORM_WIN32_INPUT_H
|
|
#define PLATFORM_WIN32_INPUT_H
|
|
|
|
#include <Windows.h>
|
|
#include <Platform/PlatformInput.h>
|
|
|
|
#define WIN32_INPUT_BUFFER_QUEUE_MAX_SIZE 64
|
|
|
|
struct Win32InputMsgBuffer {
|
|
int index;
|
|
MSG messages[WIN32_INPUT_BUFFER_QUEUE_MAX_SIZE];
|
|
bool enabled;
|
|
|
|
Win32InputMsgBuffer();
|
|
|
|
bool postMessage(MSG msg);
|
|
};
|
|
|
|
class Win32Input : public PlatformInput
|
|
{
|
|
public :
|
|
virtual Keyboard* createKeyboard();
|
|
|
|
virtual Mouse* createMouse();
|
|
|
|
virtual void update();
|
|
|
|
static Win32InputMsgBuffer inputMsgBuffer;
|
|
};
|
|
|
|
#endif /* PLATFORM_WIN32_INPUT_H */ |