-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraphicalAPI.hpp
More file actions
78 lines (46 loc) · 1.68 KB
/
Copy pathGraphicalAPI.hpp
File metadata and controls
78 lines (46 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
** EPITECH PROJECT, 2020
** GraphicalAPI.hpp
** File description:
** header for GraphicalAPI.c
*/
#pragma once
#include <myxmlpp/myxmlpp.hpp>
#include <GraphicalAPI/modules/TextureModule.hpp>
#include "Utilities/safe_ptr.hpp"
#include "DynamicLoader/DynamicLoader.hpp"
namespace arcade{class ISpriteModule; class ITextModule; class IDisplayModule;}
namespace Polymorph
{
namespace Settings{class VideoSettings;}
class DisplayModule;
using Display = safe_ptr<DisplayModule>;
using DisplayBase = std::shared_ptr<DisplayModule>;
class GraphicalAPI : public DynamicLibLoader
{
////////////////////// CONSTRUCTORS/DESTRUCTORS /////////////////////////
public:
explicit GraphicalAPI(std::string handlerPath);
~GraphicalAPI();
//////////////////////--------------------------/////////////////////////
///////////////////////////// PROPERTIES ////////////////////////////////
public:
static inline Display CurrentDisplay = Display(nullptr);
private:
std::string _handlerPath;
std::vector<DisplayBase> _displays;
static inline GraphicalAPI *_instance = nullptr;
public:
//////////////////////--------------------------/////////////////////////
/////////////////////////////// METHODS /////////////////////////////////
public:
static Display createDisplay(std::shared_ptr<Settings::VideoSettings>& videoSettings, const std::string& title);
static void reloadAPI(const std::string& newHandler);
#ifdef _WIN32
static HINSTANCE getHandler();
#else
static void *getHandler();
#endif
private:
};
}