24#ifndef GAMP_WTWINEVENT_HPP_
25#define GAMP_WTWINEVENT_HPP_
45 std::string getEventTypeString()
const noexcept {
54 default:
return "unknown (" + std::to_string(
type()) +
")";
64 std::string res =
"WindowEvent[";
65 res.append(getEventTypeString()).append(
", ").append(
WTEvent::toString()).append(
"]");
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
WTEvent(uint16_t type, const jau::fraction_timespec &when, const WindowRef &source) noexcept
std::string toString() const noexcept
WindowEvent(uint16_t type, const jau::fraction_timespec &when, const WindowRef &source) noexcept
Listener for multiple WindowEvent.
virtual void windowRepaint(WindowEvent &)
Window area shall be repainted.
virtual ~WindowListener() noexcept=default
virtual void windowFocusChanged(WindowEvent &, bool)
Window gained or lost focus.
virtual void windowVisibilityChanged(WindowEvent &, bool)
Window visibility changed.
virtual void windowResized(WindowEvent &, const jau::math::Vec2i &, const jau::math::Vec2i &)
Window is resized, your application shall respect the new window-size in window units and surface-siz...
virtual void windowDestroyed(WindowEvent &)
Window has been destroyed.
virtual void windowDestroyNotify(WindowEvent &)
Window destruction has been requested.
virtual void windowMoved(WindowEvent &, const jau::math::Vec2i &)
Window has been moved to given windows-position in window units.
std::ostream & operator<<(std::ostream &os, const T v)
static constexpr uint16_t EVENT_WINDOW_RESIZED
std::shared_ptr< WindowListener > WindowListenerRef
static constexpr uint16_t EVENT_WINDOW_MOVED
static constexpr uint16_t EVENT_WINDOW_DESTROY_NOTIFY
static constexpr uint16_t EVENT_WINDOW_DESTROYED
static constexpr uint16_t EVENT_WINDOW_REPAINT
std::shared_ptr< Window > WindowRef
static constexpr uint16_t EVENT_WINDOW_FOCUS_CHANGED
static constexpr uint16_t EVENT_WINDOW_VISIBILITY_CHANGED
__pack(...): Produces MSVC, clang and gcc compatible lead-in and -out macros.
Timespec structure using int64_t for its components in analogy to struct timespec_t on 64-bit platfor...