|
SimpleGL
1.1.0
A framework for platform independent rendering
|
This class wraps a GLFW key callback. More...
#include <glfw_callback.hpp>
Public Member Functions | |
| KeyCallback (void) | |
| Creates a key callback. More... | |
| ~KeyCallback (void) | |
| Destroys a key callback. More... | |
| virtual void | invoke (GLFWwindow *window, Key key, int scancode, Action action, Modifier mods) |
| This function gets called whenever a key is pressed or released. More... | |
Static Public Member Functions | |
| static KeyCallback * | getCurrent () |
| Returns the current key callback. More... | |
| static void | setCurrent (KeyCallback *callback) |
| Sets the current key callback. More... | |
| static void | dispatch (GLFWwindow *window, int key, int scancode, int action, int mods) |
| Dispatches the member function. More... | |
Static Protected Attributes | |
| static KeyCallback * | current = nullptr |
| Stores the current instance of the key callback. More... | |
This class wraps a GLFW key callback.
Definition at line 75 of file glfw_callback.hpp.
| sgl::KeyCallback::KeyCallback | ( | void | ) |
Creates a key callback.
Definition at line 72 of file glfw_callback.cpp.
| sgl::KeyCallback::~KeyCallback | ( | void | ) |
Destroys a key callback.
Definition at line 76 of file glfw_callback.cpp.
|
static |
Dispatches the member function.
| window | The window which received the event. |
| key | The key of the event. |
| scancode | The system-specific scancode for the key. |
| action | The action of the event. |
| mods | A bit field that describes which modifier keys were active. |
Definition at line 65 of file glfw_callback.cpp.
|
static |
Returns the current key callback.
Definition at line 54 of file glfw_callback.cpp.
|
virtual |
This function gets called whenever a key is pressed or released.
Default implementation of the key callback.
| window | The window which received the event. |
| key | The key of the event. |
| scancode | The system-specific scancode for the key. |
| action | The action of the event. |
| mods | A bit field that describes which modifier keys were active. |
Definition at line 84 of file glfw_callback.cpp.
|
static |
Sets the current key callback.
| callback | The key callback to set. |
Definition at line 58 of file glfw_callback.cpp.
|
staticprotected |
Stores the current instance of the key callback.
Definition at line 79 of file glfw_callback.hpp.
1.8.11