Antkeeper  0.0.1
mouse-events.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Christopher J. Howard
3  *
4  * This file is part of Antkeeper source code.
5  *
6  * Antkeeper source code is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * Antkeeper source code is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with Antkeeper source code. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef ANTKEEPER_INPUT_MOUSE_EVENTS_HPP
21 #define ANTKEEPER_INPUT_MOUSE_EVENTS_HPP
22 
26 #include <engine/math/vector.hpp>
27 #include <cstdint>
28 
29 namespace input {
30 
31 class mouse;
32 
37 {
39  mouse* mouse{nullptr};
40 
43 
46 };
47 
52 {
54  mouse* mouse{nullptr};
55 
58 
61 };
62 
67 {
69  mouse* mouse{nullptr};
70 
73 
76 };
77 
82 {
84  mouse* mouse{nullptr};
85 
88 
90  math::fvec2 velocity{0.0f, 0.0f};
91 };
92 
93 } // namespace input
94 
95 #endif // ANTKEEPER_INPUT_MOUSE_EVENTS_HPP
A virtual mouse which generates mouse-related input events.
Definition: mouse.hpp:36
Input devices, events, and mapping.
@ mouse
Mouse input device.
mouse_button
Mouse buttons.
Event generated when a mouse button has been pressed.
math::vec2< std::int32_t > position
Mouse position, in pixels, relative to the window, when the button was pressed.
mouse_button button
Mouse button being pressed.
Event generated when a mouse button has been released.
math::vec2< std::int32_t > position
Mouse position, in pixels, relative to the window, when the button was released.
mouse_button button
Mouse button being released.
Event generated when a mouse has been moved.
math::vec2< std::int32_t > position
Mouse position, in pixels, relative to the window.
math::vec2< std::int32_t > difference
Relative movement of the mouse, in pixels.
Event generated when a mouse has been scrolled.
math::vec2< std::int32_t > position
Mouse position, in pixels, relative to the window, when the mouse was scrolled.
math::fvec2 velocity
Scroll velocity.
n-dimensional vector.
Definition: vector.hpp:44