Robot Devastation
InputEventListener.hpp
1 // Authors: see AUTHORS.md at project root.
2 // CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
3 // URL: https://github.com/asrob-uc3m/robotDevastation
4 
5 #ifndef __RD_INPUT_EVENT_LISTENER_HPP__
6 #define __RD_INPUT_EVENT_LISTENER_HPP__
7 
8 #include "Key.hpp"
9 #include "WindowEvent.hpp"
10 
11 namespace rd{
12 
21 {
22  public:
27  virtual bool onKeyDown( const Key & k ) = 0;
28 
33  virtual bool onKeyUp( const Key & k ) = 0;
34 
39  virtual bool onWindowEvent( const WindowEvent & event ) = 0;
40 
41  virtual ~InputEventListener() {}
42 };
43 
44 }
45 
46 #endif //-- __RD_INPUT_EVENT_LISTENER_HPP__
rd
The main, catch-all namespace for Robot Devastation.
Definition: groups.dox:4
rd::InputEventListener::onKeyDown
virtual bool onKeyDown(const Key &k)=0
This function will be called whenever a key is pressed on the keyboard.
rd::InputEventListener
Interface for objects that can be notified of input events by the InputManager.
Definition: InputEventListener.hpp:20
rd::InputEventListener::onKeyUp
virtual bool onKeyUp(const Key &k)=0
This function will be called whenever a key is released on the keyboard.
rd::Key
Class that represents a keyboard key.
Definition: Key.hpp:23
rd::InputEventListener::onWindowEvent
virtual bool onWindowEvent(const WindowEvent &event)=0
This function will be called whenever a window event is raised.
rd::WindowEvent
Class that represents a window event.
Definition: WindowEvent.hpp:19