hx3d
1
2D/3D Simple Game Framework
Main Page
Namespaces
Classes
Files
File List
engine
src
window
input_handler.cpp
1
/*
2
Input handler.
3
Copyright (C) 2015 Denis BOURGE
4
5
This library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Lesser General Public
7
License as published by the Free Software Foundation; either
8
version 2.1 of the License, or (at your option) any later version.
9
10
This library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Lesser General Public License for more details.
14
15
You should have received a copy of the GNU Lesser General Public
16
License along with this library; if not, write to the Free Software
17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
18
USA
19
*/
20
21
#include "hx3d/window/input_handler.hpp"
22
23
namespace
hx3d
{
24
namespace
window {
25
26
void
InputHandler::onWindowEvent
(
WindowEvent::Type
type) {}
27
void
InputHandler::onMouseClicked
(
MouseButtonEvent::Button
button, glm::vec2 mousePosition) {}
28
void
InputHandler::onMouseReleased
(
MouseButtonEvent::Button
button, glm::vec2 mousePosition) {}
29
void
InputHandler::onMouseWheel
(
MouseWheelEvent::Direction
direction, glm::vec2 wheelMovement) {}
30
void
InputHandler::onMouseMotion
(glm::vec2 mousePosition, glm::vec2 mouseMovement) {}
31
32
void
InputHandler::onTouchDown
(glm::vec2 touchPosition,
float
touchPressure) {}
33
void
InputHandler::onTouchUp
(glm::vec2 touchPosition,
float
touchPressure) {}
34
void
InputHandler::onTouchMotion
(glm::vec2 touchPosition, glm::vec2 touchMovement,
float
touchPressure) {}
35
36
void
InputHandler::onKeyPressed
(
KeyEvent::Key
key) {}
37
void
InputHandler::onKeyReleased
(
KeyEvent::Key
key) {}
38
39
}
/* window */
40
}
/* hx3d */
hx3d::window::InputHandler::onMouseWheel
virtual void onMouseWheel(MouseWheelEvent::Direction direction, glm::vec2 wheelMovement)
When a mouse wheel event occur.
Definition:
input_handler.cpp:29
hx3d::window::InputHandler::onKeyReleased
virtual void onKeyReleased(KeyEvent::Key key)
When a key is released.
Definition:
input_handler.cpp:37
hx3d::window::InputHandler::onMouseReleased
virtual void onMouseReleased(MouseButtonEvent::Button button, glm::vec2 mousePosition)
When a mouse click release event occur.
Definition:
input_handler.cpp:28
hx3d::window::InputHandler::onMouseMotion
virtual void onMouseMotion(glm::vec2 mousePosition, glm::vec2 mouseMovement)
When a mouse move event occur.
Definition:
input_handler.cpp:30
hx3d
hx3d framework namespace
Definition:
audio.hpp:26
hx3d::window::InputHandler::onKeyPressed
virtual void onKeyPressed(KeyEvent::Key key)
When a key is pressed.
Definition:
input_handler.cpp:36
hx3d::window::InputHandler::onMouseClicked
virtual void onMouseClicked(MouseButtonEvent::Button button, glm::vec2 mousePosition)
When a mouse click event occur.
Definition:
input_handler.cpp:27
hx3d::window::InputHandler::onTouchUp
virtual void onTouchUp(glm::vec2 touchPosition, float touchPressure)
When a touch up event occur.
Definition:
input_handler.cpp:33
hx3d::window::MouseButtonEvent::Button
Button
Mouse button value.
Definition:
events.hpp:101
hx3d::window::MouseWheelEvent::Direction
Direction
Mouse wheel direction.
Definition:
events.hpp:124
hx3d::window::KeyEvent::Key
Key
Key value.
Definition:
events.hpp:51
hx3d::window::InputHandler::onTouchDown
virtual void onTouchDown(glm::vec2 touchPosition, float touchPressure)
When a touch down event occur.
Definition:
input_handler.cpp:32
hx3d::window::WindowEvent::Type
Type
Window event type.
Definition:
events.hpp:71
hx3d::window::InputHandler::onTouchMotion
virtual void onTouchMotion(glm::vec2 touchPosition, glm::vec2 touchMovement, float touchPressure)
When a touch move event occur.
Definition:
input_handler.cpp:34
hx3d::window::InputHandler::onWindowEvent
virtual void onWindowEvent(WindowEvent::Type type)
When a window event occur.
Definition:
input_handler.cpp:26
Generated by
1.8.11