aboutsummaryrefslogtreecommitdiff
path: root/include/mglpp/window/Event.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mglpp/window/Event.hpp')
-rw-r--r--include/mglpp/window/Event.hpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/include/mglpp/window/Event.hpp b/include/mglpp/window/Event.hpp
index 5b9e357..f3e9535 100644
--- a/include/mglpp/window/Event.hpp
+++ b/include/mglpp/window/Event.hpp
@@ -29,26 +29,35 @@ namespace mgl {
bool system;
};
- struct MouseMoveEvent {
- int x; /* relative to left of the window */
- int y; /* relative to the top of the window */
- };
-
struct MouseButtonEvent {
Mouse::Button button;
+ int x; /* mouse position relative to left of the window */
+ int y; /* mouse position relative to top of the window */
+ };
+
+ struct MouseWheelScrollEvent {
+ int delta; /* positive = up, negative = down */
+ int x; /* mouse position relative to left of the window */
+ int y; /* mouse position relative to left of the window */
+ };
+
+ struct MouseMoveEvent {
int x; /* relative to left of the window */
- int y; /* relative to top of the window */
+ int y; /* relative to the top of the window */
};
enum Type : int {
Unknown,
Closed, /* Window closed */
Resized, /* Window resized */
+ LostFocus,
+ GainedFocus,
TextEntered,
KeyPressed,
KeyReleased,
MouseButtonPressed,
MouseButtonReleased,
+ MouseWheelScrolled,
MouseMoved
};
@@ -59,6 +68,7 @@ namespace mgl {
TextEvent text;
KeyEvent key;
MouseButtonEvent mouse_button;
+ MouseWheelScrollEvent mouse_wheel_scroll;
MouseMoveEvent mouse_move;
};
};