20#ifndef _SOURCE_RENDERING_TFKEYEVENT_H_
21#define _SOURCE_RENDERING_TFKEYEVENT_H_
23#include <Magnum/Platform/GlfwApplication.h>
35 using KeyEventDelegateType =
HRESULT (*)(Magnum::Platform::GlfwApplication::KeyEvent*);
36 using KeyEventHandlerType =
HRESULT (*)(
struct KeyEvent*);
38 typedef size_t KeyEventDelegateHandle;
39 typedef size_t KeyEventHandlerHandle;
43 Magnum::Platform::GlfwApplication::KeyEvent *glfw_event;
45 KeyEvent(Magnum::Platform::GlfwApplication::KeyEvent *glfw_event=NULL) : glfw_event(glfw_event) {}
48 static HRESULT invoke(Magnum::Platform::GlfwApplication::KeyEvent &ke);
56 static KeyEventDelegateHandle
addDelegate(KeyEventDelegateType *_delegate);
64 static KeyEventHandlerHandle
addHandler(KeyEventHandlerType *_handler);
72 static KeyEventDelegateType *
getDelegate(
const KeyEventDelegateHandle &handle);
80 static KeyEventHandlerType *
getHandler(
const KeyEventHandlerHandle &handle);
100 std::string keyName();
Include Python header, disable linking to pythonX_d.lib on Windows in debug mode.
Definition tfAngleConfig.h:26
Definition tfKeyEvent.h:42
static KeyEventDelegateHandle addDelegate(KeyEventDelegateType *_delegate)
Adds an event delegate.
static bool removeHandler(const KeyEventHandlerHandle &handle)
Remove an event handler.
static bool removeDelegate(const KeyEventDelegateHandle &handle)
Remove an event delegate.
static KeyEventHandlerType * getHandler(const KeyEventHandlerHandle &handle)
Get an event handler.
static KeyEventHandlerHandle addHandler(KeyEventHandlerType *_handler)
Adds an event handler.
static KeyEventDelegateType * getDelegate(const KeyEventDelegateHandle &handle)
Get an event delegate.
int32_t HRESULT
Definition tf_port.h:255