#ifndef LINUX_WINDOW_HPP
#define LINUX_WINDOW_HPP


#include "open_engine/core.hpp"
#include "renderer/graphics_context.hpp"
#include "window/window.hpp"

#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>

namespace OpenEngine {
    class LinuxWindow
        : public Window
    {
        public:
            LinuxWindow(const WindowProps& props);
            virtual ~LinuxWindow();

            void OnUpdate() override;

            inline unsigned int GetWidth() const override { return data.width; };
            inline unsigned int GetHeight() const override { return data.height; };

            inline void SetEventCallback(const EventCallbackFunction& callback) override
                { data.event_callback = callback; };
            void SetVSync(bool enabled) override;
            bool IsVSync() const override;

            inline virtual void* GetNativeWindow() const override { return gl_window; };

        private:
            virtual void Init(const WindowProps& props);
            virtual void Shutdown();

            int window_count;
            WindowData data;
            GLFWwindow* gl_window;
            Scope<GraphicsContext> context;
    };
}

#endif // LINUX_WINDOW_HPP
