|
The Joe Engine
Joe's engine programming playground
|
The JEIOHandler class. More...
#include <IOHandler.h>
Public Member Functions | |
| JEIOHandler ()=default | |
| Constructor. More... | |
| ~JEIOHandler ()=default | |
| Destructor. More... | |
| void | Initialize (GLFWwindow *glfwWindow) |
| Initialization. More... | |
| void | PollInput () |
| Poll for input. More... | |
| void | AddCallback (int key, JECallbackFunction callback) |
| Add callback function. More... | |
| void | ExecuteCallbacksForKey (int key) |
| Execute callbacks for key. More... | |
The JEIOHandler class.
Class that maps keyboard inputs to callback functions.
|
default |
Constructor.
|
default |
Destructor.
| void JoeEngine::JEIOHandler::AddCallback | ( | int | key, |
| JECallbackFunction | callback | ||
| ) |
Add callback function.
Registers the specified callback function to the specified key index.
| key | The keypress to register a clalback function to. |
| callback | the callback function to register |
| void JoeEngine::JEIOHandler::ExecuteCallbacksForKey | ( | int | key | ) |
Execute callbacks for key.
Invokes all callbacks registered for the specified key index.
| key | the key index to execute the callbacks of |
| void JoeEngine::JEIOHandler::Initialize | ( | GLFWwindow * | glfwWindow | ) |
Initialization.
Called once by the JEEngineInstance that owns this class. Sets the member pointer to the specified window.
| glfwWindow | the specified GLFW window to expect keyboard and mouse events from. |
| void JoeEngine::JEIOHandler::PollInput | ( | ) |
Poll for input.
Wrapper function around the GLFW poll input function.