2013-09-11 22:49:49 +02:00
|
|
|
#pragma once
|
2015-09-18 01:41:14 +03:00
|
|
|
|
2013-09-11 22:49:49 +02:00
|
|
|
#include "KeyboardHandler.h"
|
|
|
|
|
|
2014-08-24 21:42:19 +04:00
|
|
|
class KeyboardManager
|
2013-09-11 22:49:49 +02:00
|
|
|
{
|
2014-03-31 20:02:27 -04:00
|
|
|
std::unique_ptr<KeyboardHandlerBase> m_keyboard_handler;
|
2013-09-11 22:49:49 +02:00
|
|
|
|
|
|
|
|
public:
|
2015-09-18 01:41:14 +03:00
|
|
|
void Init(u32 max_connect);
|
2013-09-11 22:49:49 +02:00
|
|
|
void Close();
|
|
|
|
|
|
2014-03-31 10:18:44 -04:00
|
|
|
std::vector<Keyboard>& GetKeyboards() { return m_keyboard_handler->GetKeyboards(); }
|
2013-09-11 22:49:49 +02:00
|
|
|
KbInfo& GetInfo() { return m_keyboard_handler->GetInfo(); }
|
2014-03-31 10:18:44 -04:00
|
|
|
std::vector<KbButton>& GetButtons(const u32 keyboard) { return m_keyboard_handler->GetButtons(keyboard); }
|
2014-08-28 05:18:35 +04:00
|
|
|
KbData& GetData(const u32 keyboard) { return m_keyboard_handler->GetData(keyboard); }
|
|
|
|
|
KbConfig& GetConfig(const u32 keyboard) { return m_keyboard_handler->GetConfig(keyboard); }
|
2013-09-11 22:49:49 +02:00
|
|
|
|
2015-09-18 01:41:14 +03:00
|
|
|
bool IsInited() const { return m_keyboard_handler.operator bool(); }
|
2014-08-24 21:42:19 +04:00
|
|
|
};
|