Just™ Game Engine
window_events.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021-2022 Konstanty Misiak
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7#pragma once
8#include "jng/core/event.hpp"
9#include "jng/core/base.hpp"
10
11namespace jng {
12
14 public Event
15 {
16 public:
17 WindowCloseEvent() = default;
18
19 EVENT_CLASS_TYPE(WindowClose)
20 };
21
23 public Event
24 {
25 public:
26 WindowResizeEvent(u32 width, u32 height) :
27 m_width(width),
28 m_height(height) {}
29
30 u32 getWidth() const { return m_width; }
31 u32 getHeight() const { return m_height; }
32
33 EVENT_CLASS_TYPE(WindowResize)
34 private:
35 u32 m_width;
36 u32 m_height;
37 };
38
39} // namespace jng
Definition: event.hpp:24
Definition: window_events.hpp:15
WindowCloseEvent()=default
Definition: window_events.hpp:24
u32 getWidth() const
Definition: window_events.hpp:30
u32 getHeight() const
Definition: window_events.hpp:31
WindowResizeEvent(u32 width, u32 height)
Definition: window_events.hpp:26
#define EVENT_CLASS_TYPE(type)
Definition: event.hpp:61
Definition: base.hpp:11
uint32_t u32
Definition: base.hpp:41