24#ifndef GAMP_WTEVENT_HPP_
25#define GAMP_WTEVENT_HPP_
81 : m_type(
type), m_when(
when), m_source(
source), m_consumed(
false) {}
83 constexpr uint16_t
type() const noexcept {
return m_type; }
88 constexpr bool consumed() const noexcept {
return m_consumed; }
90 constexpr void setConsumed(
bool v)
noexcept { m_consumed = v; }
92 std::string s =
"WTEvent[consumed ";
93 s.append(m_consumed ?
"true" :
"false");
94 s.append(
", when ").append(m_when.to_string());
260 std::vector<InputButton> res;
263 const InputButton_info_t& ei = InputButton_info_t::get();
264 InputButton_info_t::iterator end = ei.end();
265 for(
typename InputButton_info_t::iterator iter = ei.begin(); iter != end; ++iter) {
303 std::string s =
"InputEvent[modifier";
constexpr const WindowWeakPtr & source() const noexcept
constexpr const jau::fraction_timespec & when() const noexcept
constexpr uint16_t type() const noexcept
std::string toString() const noexcept
constexpr void setConsumed(bool v) noexcept
Consumed events will stop traversing through listener.
constexpr bool consumed() const noexcept
Consumed events will stop traversing through listener.
WTEvent(uint16_t type, const jau::fraction_timespec &when, const WindowRef &source) noexcept
constexpr uint32_t ct_bit_count(uint32_t n) noexcept
Returns the number of set bits within given 32bit integer (w/o branching) in O(1) and constant time (...
constexpr bool has_any(const E mask, const E bits) noexcept
#define JAU_MAKE_ENUM_STRING(type,...)
#define JAU_MAKE_BITFIELD_ENUM_STRING(type,...)
constexpr bool is_set(const E mask, const E bits) noexcept
std::ostream & operator<<(std::ostream &os, const T v)
#define JAU_MAKE_ENUM_INFO(type,...)
static constexpr uint16_t EVENT_WINDOW_RESIZED
static constexpr short EVENT_POINTER_WHEEL
static constexpr short EVENT_POINTER_PRESSED
static constexpr short EVENT_POINTER_RELEASED
static constexpr short EVENT_POINTER_CLICKED
static constexpr uint16_t EVENT_WINDOW_MOVED
static constexpr uint16_t EVENT_WINDOW_DESTROY_NOTIFY
static constexpr uint16_t EVENT_KEY_PRESSED
A key has been pressed, excluding auto-repeat-modifier keys.
static constexpr uint16_t EVENT_WINDOW_DESTROYED
static constexpr short EVENT_POINTER_EXITED
Only generated for PointerType::mouse.
static constexpr short EVENT_POINTER_DRAGGED
static constexpr uint16_t EVENT_WINDOW_REPAINT
std::shared_ptr< Window > WindowRef
static constexpr uint16_t EVENT_WINDOW_FOCUS_CHANGED
static constexpr short EVENT_POINTER_MOVED
static constexpr short EVENT_POINTER_ENTERED
Only generated for PointerType::mouse.
static constexpr uint16_t EVENT_WINDOW_VISIBILITY_CHANGED
static constexpr uint16_t EVENT_KEY_RELEASED
A key has been released, excluding auto-repeat-modifier keys.
@ button_all
mask for all 16 buttons, see InputButton::button_count
@ button1_bit
button property description, no actual bitmask value
@ repeat
Event is caused by auto-repeat.
@ invisible
Pointer is invisible, see Window#setPointerVisible(boolean).
@ confined
Pointer is confined, see Window#confinePointer(boolean).
@ button_last
button property description, no actual bitmask value
@ button_count
button property description, no actual bitmask value
std::string to_string(const math_error_t v) noexcept
Returns std::string representation of math_error_t.
std::weak_ptr< Window > WindowWeakPtr
Author: Sven Gothel sgothel@jausoft.com Copyright Gothel Software e.K.
Timespec structure using int64_t for its components in analogy to struct timespec_t on 64-bit platfor...