00001 #ifndef GLFW_INPUT_IMPL_HPP
00002 #define GLFW_INPUT_IMPL_HPP
00003
00004 #include <utils.hpp>
00005 #include <input.hpp>
00006
00007 namespace input
00008 {
00009 class glfw_handler : public handler_impl
00010 {
00011 public :
00012
00014
00016 explicit glfw_handler(bool bMouseGrab = false);
00017
00018 void toggle_mouse_grab() override;
00019 std::string get_key_name(key::code mKey) const override;
00020
00021 void update() override;
00022
00023 private :
00024
00025 int to_glfw_(key::code mKey) const;
00026
00027 static const int lKeyToGLFW[106][2];
00028
00029 bool bMouseGrab_;
00030 bool bFirst_;
00031 float fOldMouseX_, fOldMouseY_, fOldWheel_;
00032 };
00033 }
00034
00035 #endif