Beginning writing gui and window wrapper for GLFW

This commit is contained in:
Pcornat 2022-01-08 21:57:17 +01:00
parent 10cb797084
commit 9dfe0faa56
Signed by: Pcornat
GPG key ID: 2F3932FF46D9ECA0
8 changed files with 141 additions and 4 deletions

18
include/gui.hpp Normal file
View file

@ -0,0 +1,18 @@
#ifndef BILLYSHEET_GUI_HPP
#define BILLYSHEET_GUI_HPP
namespace gui {
class Gui final {
private:
public:
Gui() = delete;
~Gui() noexcept;
};
}
#endif //BILLYSHEET_GUI_HPP

16
include/gui_data.hpp Normal file
View file

@ -0,0 +1,16 @@
#ifndef BILLYSHEET_GUI_DATA_HPP
#define BILLYSHEET_GUI_DATA_HPP
namespace gui {
class GuiData final {
private:
// GLFWwindow *window{ nullptr };
public:
GuiData() = delete;
~GuiData() noexcept = default;
};
}
#endif //BILLYSHEET_GUI_DATA_HPP

25
include/window.hpp Normal file
View file

@ -0,0 +1,25 @@
#ifndef BILLYSHEET_WINDOW_HPP
#define BILLYSHEET_WINDOW_HPP
#include <memory>
#include <GLFW/glfw3.h>
namespace gui {
class Window final {
private:
static void delete_glfw_window(GLFWwindow *glfWwindow) {
glfwDestroyWindow(glfWwindow);
glfwTerminate();
}
std::unique_ptr<GLFWwindow, decltype(&delete_glfw_window)> wwindow{ nullptr, delete_glfw_window };
public:
Window();
~Window() noexcept = default;
};
}
#endif //BILLYSHEET_WINDOW_HPP