Karma Engine
Loading...
Searching...
No Matches
ApplicationEvent.h
1#pragma once
2
3#include "krpch.h"
4
5#include "Event.h"
6
7namespace Karma
8{
9 class KARMA_API WindowResizeEvent : public Event
10 {
11 public:
12 WindowResizeEvent(unsigned int width, unsigned int height)
13 : m_Width(width), m_Height(height)
14 {
15 }
16 inline unsigned int GetWidth() const { return m_Width; }
17 inline unsigned int GetHeight() const { return m_Height; }
18
19 std::string ToString() const override
20 {
21 std::stringstream ss;
22 ss << "WindowResizeEvent: " << m_Width << ", " << m_Height;
23 return ss.str();
24 }
25
26 EVENT_CLASS_TYPE(WindowResize)
27 EVENT_CLASS_CATEGORY(EventCategoryApplication)
28
29 private:
30 unsigned int m_Width, m_Height;
31 };
32
33 class KARMA_API WindowCloseEvent : public Event
34 {
35 public:
37 {
38 }
39
40 EVENT_CLASS_TYPE(WindowClose)
41 EVENT_CLASS_CATEGORY(EventCategoryApplication)
42 };
43
44 class KARMA_API AppTickEvent : public Event
45 {
46 public:
48 {
49 }
50
51 EVENT_CLASS_TYPE(AppTick)
52 EVENT_CLASS_CATEGORY(EventCategoryApplication)
53 };
54
55 class KARMA_API AppUpdateEvent : public Event
56 {
57 public:
59 {
60 }
61
62 EVENT_CLASS_TYPE(AppUpdate)
63 EVENT_CLASS_CATEGORY(EventCategoryApplication)
64 };
65
66 class KARMA_API AppRenderEvent : public Event
67 {
68 public:
70 {
71 }
72
73 EVENT_CLASS_TYPE(AppRender)
74 EVENT_CLASS_CATEGORY(EventCategoryApplication)
75 };
76}
Definition ApplicationEvent.h:67
Definition ApplicationEvent.h:45
Definition ApplicationEvent.h:56
Definition Event.h:35
Definition ApplicationEvent.h:34
Definition ApplicationEvent.h:10