SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
WindowEvents.h
1#pragma once
2
3#include "spark/events/Event.h"
4
5namespace spark::events
6{
10 class SPARK_EVENTS_EXPORT WindowResizeEvent final : public Event
11 {
12 DECLARE_SPARK_RTTI(WindowResizeEvent, Event)
13 DEFINE_EVENT_TYPE(EventType::WindowResize)
14 DEFINE_EVENT_CATEGORY(EventCategoryApplication)
15
16 public:
22 explicit WindowResizeEvent(unsigned int width, unsigned int height);
23
28 [[nodiscard]] unsigned int width() const;
29
34 [[nodiscard]] unsigned int height() const;
35
36 private:
37 unsigned int m_width, m_height;
38 };
39
43 class SPARK_EVENTS_EXPORT WindowCloseEvent final : public Event
44 {
45 DECLARE_SPARK_RTTI(WindowCloseEvent, Event)
46 DEFINE_EVENT_TYPE(EventType::WindowClose)
47 DEFINE_EVENT_CATEGORY(EventCategoryApplication)
48
49 public:
53 explicit WindowCloseEvent() = default;
54 };
55}
56
57IMPLEMENT_SPARK_RTTI(spark::events::WindowResizeEvent)
58
59IMPLEMENT_SPARK_RTTI(spark::events::WindowCloseEvent)
A base class for all events in SPARK.
Definition Event.h:53
A class representing a window close event.
Definition WindowEvents.h:44
WindowCloseEvent()=default
Instantiates a new WindowCloseEvent.
A class representing a window resize event.
Definition WindowEvents.h:11