Catos Engine (Source)
0.0.1
Lightweight Game engine
Loading...
Searching...
No Matches
window.h
Go to the documentation of this file.
1
//
2
// Created by allos on 5/16/2024.
3
//
4
#pragma once
5
6
#ifdef _WIN32
7
#define ON_WINDOWS
8
#endif
9
10
11
#include "
math/vecs.h
"
12
#include <GLFW/glfw3.h>
13
#include "
types.h
"
14
15
namespace
catos
{
16
17
class
App;
18
19
struct
WindowCreationInfo
{
20
math::Vector2
size
{800, 600};
21
math::Vector2
position
{ 50, 50};
22
cstr
title
=
"Catos Application "
;
23
bool
is_fullscreen
=
false
;
24
bool
borderless
=
false
;
25
bool
enable_darktheme
=
true
;
// NOTE: WINDOWS ONLY!!!!!
26
};
27
28
29
class
Window
{
30
31
public
:
32
friend
class
App
;
33
34
Window
(
WindowCreationInfo
& creationInfo);
35
~Window
();
36
37
static
math::Vector2
getMonitorSize
();
38
39
bool
should_window_close
();
40
41
void
update
();
42
43
GLFWwindow*
get_glfw_window
();
44
45
46
private
:
47
GLFWwindow* _raw_window;
48
WindowCreationInfo
& _createInfo;
49
50
void
enable_dark_theme();
51
52
};
53
54
}
types.h
cstr
const char * cstr
Definition
types.h:13
vecs.h
catos
Definition
application.h:13
catos::App
Main class that holds all information.
Definition
application.h:25
catos::WindowCreationInfo
Definition
window.h:19
catos::WindowCreationInfo::is_fullscreen
bool is_fullscreen
Definition
window.h:23
catos::WindowCreationInfo::borderless
bool borderless
Definition
window.h:24
catos::WindowCreationInfo::title
cstr title
Definition
window.h:22
catos::WindowCreationInfo::size
math::Vector2 size
Definition
window.h:20
catos::WindowCreationInfo::position
math::Vector2 position
Definition
window.h:21
catos::WindowCreationInfo::enable_darktheme
bool enable_darktheme
Definition
window.h:25
catos::Window
Definition
window.h:29
catos::Window::Window
Window(WindowCreationInfo &creationInfo)
Definition
window.cpp:20
catos::Window::~Window
~Window()
Definition
window.cpp:58
catos::Window::update
void update()
Definition
window.cpp:94
catos::Window::should_window_close
bool should_window_close()
Definition
window.cpp:90
catos::Window::getMonitorSize
static math::Vector2 getMonitorSize()
Definition
window.cpp:80
catos::Window::get_glfw_window
GLFWwindow * get_glfw_window()
Definition
window.cpp:99
catos::math::Vector2
Definition
vecs.h:13