![]() |
Jopnal Engine
alpha 0.4
Simple Component Based 2D/3D Game Engine
|
#include <WindowEventHandler.hpp>
Public Member Functions | |
| WindowEventHandler (Window &windowRef) | |
| Constructor. More... | |
| virtual | ~WindowEventHandler ()=0 |
| Virtual destructor. More... | |
| virtual void | closed () |
| Close callback. More... | |
| virtual void | resized (const unsigned int x, const unsigned int y) |
| Resize callback. More... | |
| virtual void | lostFocus () |
| Focus lost callback. More... | |
| virtual void | gainedFocus () |
| Gained focus callback. More... | |
| virtual void | keyPressed (const int key, const int scanCode, const int mods) |
| Key pressed callback. More... | |
| virtual void | keyReleased (const int key, const int scanCode, const int mods) |
| Key released callback. More... | |
| virtual void | textEntered (const unsigned int code) |
| Text entered callback. More... | |
| virtual void | mouseMoved (const float x, const float y) |
| Mouse moved callback. More... | |
| virtual void | mouseMovedAbsolute (const float x, const float y) |
| Mouse position callback. More... | |
| virtual void | mouseButtonPressed (const int button, const int mods) |
| Mouse button pressed callback. More... | |
| virtual void | mouseButtonReleased (const int button, const int mods) |
| Mouse button released callback. More... | |
| virtual void | mouseLeft () |
| Mouse left callback. More... | |
| virtual void | mouseEntered () |
| Mouse entered callback. More... | |
| virtual void | mouseScrolled (const float x, const float y) |
| Mouse scrolled callback. More... | |
| virtual void | controllerConnected (const int index, const std::string &name) |
| Controller connected callback. More... | |
| virtual void | controllerDisconnected (const int index) |
| Controller disconnected callback. More... | |
| virtual void | controllerAxisShifted (const int index, const int axisIndex, const float shift) |
| Controller axis callback. More... | |
| virtual void | controllerButtonPressed (const int index, const int button) |
| Controller button pressed callback. More... | |
| virtual void | controllerButtonReleased (const int index, const int button) |
| Controller button released callback. More... | |
| virtual void | touchPressed (const int touchId, const float x, const float y) |
| Touch pressed callback. More... | |
| virtual void | touchReleased (const int touchId, const float x, const float y) |
| Touch released callback. More... | |
| virtual void | touchMoved (const int touchId, const float x, const float y) |
| Touch moved callback. More... | |
| virtual void | touchMovedAbsolute (const int touchId, const float x, const float y) |
| Touch moved callback. More... | |
| virtual void | touchInfo (const int touchId, const int info, const float value) |
| Touch event information callback. More... | |
| virtual void | touchScrolled (const float x, const float y) |
| Touch scrolled callback. More... | |
Public Attributes | |
| float | m_lastMouseX |
| For internal use. Do not touch. More... | |
| float | m_lastMouseY |
| For internal use. Do not touch. More... | |
Protected Attributes | |
| Window & | m_windowRef |
| Reference to the window. More... | |
Friends | |
| class | Window |
Definition at line 38 of file WindowEventHandler.hpp.
| jop::WindowEventHandler::WindowEventHandler | ( | Window & | windowRef | ) |
Constructor.
| windowRef | Reference to the window this handler will be bound to |
|
pure virtual |
Virtual destructor.
|
virtual |
Close callback.
This will be called if the window was requested to be closed.
|
virtual |
Controller axis callback.
| index | Index of the controller |
| axisIndex | Index of the axis |
| shift | Shift of the axis, between -1 and 1 |
|
virtual |
Controller button pressed callback.
| index | Index of the controller |
| button | The controller button |
|
virtual |
Controller button released callback.
| index | Index of the controller |
| button | The controller button |
|
virtual |
Controller connected callback.
This will be called when a controller or a joystick is connected.
| index | Index of the new controller |
| name | Name of the controller |
|
virtual |
Controller disconnected callback.
| index | Index of the controller |
|
virtual |
Gained focus callback.
This will be called when the window gains focus or is restored.
|
virtual |
Key pressed callback.
This will be called when a keyboard key is pressed.
| key | The key that was pressed |
| scanCode | The scan code |
| mods | Modifiers |
|
virtual |
Key released callback.
This will be called when a keyboard key is released.
| key | The key that was released |
| scanCode | The scan code |
| mods | Modifiers |
|
virtual |
Focus lost callback.
This will be called when the window loses focus or is minimized.
|
virtual |
Mouse button pressed callback.
This will be called when one of the mouse buttons is pressed.
| button | The mouse button |
| mods | Modifiers |
|
virtual |
Mouse button released callback.
This will be called when one of the mouse buttons is released.
| button | The mouse button |
| mods | Modifiers |
|
virtual |
Mouse entered callback.
This will be called when the mouse cursor enters the window. On Android this means that the application gained input focus.
|
virtual |
Mouse left callback.
This will be called when the mouse cursor leaves the window. On Android this means that the application lost input focus.
|
virtual |
Mouse moved callback.
This will be called when the mouse is moved.
| x | The vertical offset |
| y | The horizontal offset |
|
virtual |
Mouse position callback.
This will be called when the mouse is moved.
| x | The vertical position |
| y | The horizontal position |
|
virtual |
Mouse scrolled callback.
This will be called when the mouse wheel is scrolled.
| x | The vertical offset |
| y | The horizontal offset |
|
virtual |
Resize callback.
This will be called when the window frame buffer size has changed.
| x | The new width |
| y | The new height |
|
virtual |
Text entered callback.
This will produce an unicode code point whenever text is entered.
| code | The character code point |
|
virtual |
Touch event information callback.
| touchId | Id for finger in case of multiple touches |
| info | Enum value of information |
| value | Pressure or radius of touch |
|
virtual |
Touch moved callback.
This will be called when touch isn't stationary.
| touchId | Id for finger in case of multiple touches |
| x | The vertical offset |
| y | The horizontal offset |
|
virtual |
Touch moved callback.
This will be called when touch isn't stationary.
| touchId | Id for finger in case of multiple touches |
| x | The vertical offset |
| y | The horizontal offset |
| touchId | Id for finger in case of multiple touches |
| x | The vertical position |
| y | The horizontal position |
|
virtual |
Touch pressed callback.
This will be called when touch is started.
| touchId | Id for finger in case of multiple touches |
| x | The vertical position |
| y | The horizontal position |
|
virtual |
Touch released callback.
This will be called when touch is ended.
| touchId | Id for finger in case of multiple touches |
| x | The vertical position |
| y | The horizontal position |
|
virtual |
Touch scrolled callback.
This will be called when touch has momentum only on one axis.
| x | The vertical offset |
| y | The horizontal offset |
|
friend |
Definition at line 44 of file WindowEventHandler.hpp.
| float jop::WindowEventHandler::m_lastMouseX |
For internal use. Do not touch.
Definition at line 299 of file WindowEventHandler.hpp.
| float jop::WindowEventHandler::m_lastMouseY |
For internal use. Do not touch.
Definition at line 300 of file WindowEventHandler.hpp.
|
protected |
Reference to the window.
Definition at line 295 of file WindowEventHandler.hpp.
1.8.11