summaryrefslogtreecommitdiff
path: root/src/window_gui.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/window_gui.h')
-rw-r--r--src/window_gui.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/window_gui.h b/src/window_gui.h
index 70c6d0e86..3b8e792b6 100644
--- a/src/window_gui.h
+++ b/src/window_gui.h
@@ -266,6 +266,11 @@ struct ViewportData : ViewPort {
* Data structure for an opened window
*/
struct Window : ZeroedMemoryAllocator {
+ enum EventState {
+ ES_HANDLED,
+ ES_NOT_HANDLED,
+ };
+
private:
WindowProc *wndproc; ///< Event handler function for the window. Do not use directly, call HandleWindowEvent() instead.
void HandleWindowEvent(WindowEvent *e);
@@ -345,17 +350,17 @@ public:
* A key has been pressed.
* @param key the Unicode value of the key.
* @param keycode the untranslated key code including shift state.
- * @return true if the key press has been handled and no other
+ * @return ES_HANDLED if the key press has been handled and no other
* window should receive the event.
*/
- virtual bool OnKeyPress(uint16 key, uint16 keycode);
+ virtual EventState OnKeyPress(uint16 key, uint16 keycode);
/**
* The state of the control key has changed
- * @return true if the change has been handled and no other
+ * @return ES_HANDLED if the change has been handled and no other
* window should receive the event.
*/
- virtual bool OnCTRLStateChange();
+ virtual EventState OnCTRLStateChange();
/**