TermOx
is_sendable.hpp
1 #ifndef TERMOX_SYSTEM_DETAIL_IS_SENDABLE_HPP
2 #define TERMOX_SYSTEM_DETAIL_IS_SENDABLE_HPP
3 #include <termox/system/event_fwd.hpp>
4 #include "termox/system/event.hpp"
5 
6 namespace esc {
7 struct Window_resize;
8 } // namespace esc
9 
10 namespace ox::detail {
11 
13 template <typename T>
14 [[nodiscard]] auto is_sendable(T const& event) -> bool
15 {
16  return event.receiver.get().is_enabled();
17 }
18 
19 [[nodiscard]] auto is_sendable(ox::Move_event const& event) -> bool;
20 
21 [[nodiscard]] auto is_sendable(ox::Resize_event const& event) -> bool;
22 
23 [[nodiscard]] auto is_sendable(ox::Key_press_event const& event) -> bool;
24 
25 [[nodiscard]] auto is_sendable(ox::Key_release_event const& event) -> bool;
26 
27 [[nodiscard]] auto is_sendable(ox::Child_added_event const&) -> bool;
28 
29 [[nodiscard]] auto is_sendable(ox::Child_removed_event const&) -> bool;
30 
31 [[nodiscard]] auto is_sendable(ox::Child_polished_event const&) -> bool;
32 
33 [[nodiscard]] auto is_sendable(ox::Delete_event const&) -> bool;
34 
35 [[nodiscard]] auto is_sendable(ox::Disable_event const&) -> bool;
36 
37 [[nodiscard]] auto is_sendable(ox::Focus_in_event const&) -> bool;
38 
39 [[nodiscard]] auto is_sendable(ox::Focus_out_event const&) -> bool;
40 
41 [[nodiscard]] auto is_sendable(ox::Custom_event const&) -> bool;
42 
43 [[nodiscard]] auto is_sendable(ox::Dynamic_color_event const&) -> bool;
44 
45 [[nodiscard]] auto is_sendable(::esc::Window_resize const&) -> bool;
46 
47 } // namespace ox::detail
48 #endif // TERMOX_SYSTEM_DETAIL_IS_SENDABLE_HPP
Definition: event.hpp:57
Definition: event.hpp:67
Definition: event.hpp:62
Definition: event.hpp:115
Definition: event.hpp:72
Definition: event.hpp:76
Definition: event.hpp:106
Definition: event.hpp:84
Definition: event.hpp:88
Definition: event.hpp:27
Definition: event.hpp:32
Definition: event.hpp:92
Definition: event.hpp:97