sandbox
Loading...
Searching...
No Matches
events.hpp
1// SPDX-License-Identifier: MIT
2#ifndef LIBSBX_DEVICES_EVENTS_HPP_
3#define LIBSBX_DEVICES_EVENTS_HPP_
4
5#include <cinttypes>
6#include <cmath>
7
8#include <libsbx/devices/key.hpp>
9#include <libsbx/devices/mouse_button.hpp>
10#include <libsbx/devices/input_action.hpp>
11#include <libsbx/devices/input_mod.hpp>
12
13namespace sbx::devices {
14
19
21 std::int32_t x{};
22 std::int32_t y{};
23};
24
26 std::int32_t width{};
27 std::int32_t height{};
28};
29
31 std::int32_t width{};
32 std::int32_t height{};
33};
34
36 devices::key key;
37 input_mod mods;
38}; // struct key_pressed_event
39
41 devices::key key;
42 input_mod mods;
43}; // struct key_released_event
44
46 std::float_t x;
47 std::float_t y;
48}; // struct mouse_moved_event
49
51 mouse_button button;
52 input_mod mods;
53}; // struct mouse_button_pressed_event
54
56 mouse_button button;
57 input_mod mods;
58}; // struct mouse_button_released_event
59
61 std::float_t x;
62 std::float_t y;
63}; // struct mouse_scrolled_event
64
65} // namespace sbx::devices
66
67#endif // LIBSBX_DEVICES_EVENTS_HPP_
Definition: events.hpp:35
Definition: events.hpp:40
Definition: events.hpp:45
Definition: events.hpp:60
An event that is fired when a window requests to be closed.
Definition: events.hpp:18
Definition: events.hpp:20
Definition: events.hpp:25