<commit_before>
#pragma once

#include <ionMath.h>

#include "CWindow.h"
#undef CreateWindow


enum class EWindowType
{
	Fullscreen,
	Windowed
};

class CWindowManager : public Singleton<CWindowManager>, public IEventListener
{

public:

	void Init();
	void PollEvents();
	bool ShouldClose() const;
	bool Run();

	CWindow * CreateWindow(vec2i const & Size, std::string const & Title, EWindowType const Type);

protected:

	CWindow * PrimaryWindow;
	std::map<GLFWwindow *, CWindow *> Windows;

	static void KeyCallback(GLFWwindow * window, int key, int scancode, int action, int mods);
	static void MouseButtonCallback(GLFWwindow * window, int button, int action, int mods);
	static void MouseScrollCallback(GLFWwindow * window, double xoffset, double yoffset);
	static void MouseCursorCallback(GLFWwindow * window, double xpos, double ypos);
	static void CharCallback(GLFWwindow * window, unsigned int c);

private:

	friend class Singleton<CWindowManager>;
	CWindowManager();<commit_msg>Move CreateWindow undef to make its purpose more clear<commit_after>
#pragma once

#include <ionMath.h>

#include "CWindow.h"


enum class EWindowType
{
	Fullscreen,
	Windowed
};

class CWindowManager : public Singleton<CWindowManager>, public IEventListener
{

public:

	void Init();
	void PollEvents();
	bool ShouldClose() const;
	bool Run();

#undef CreateWindow
	CWindow * CreateWindow(vec2i const & Size, std::string const & Title, EWindowType const Type);

protected:

	CWindow * PrimaryWindow;
	std::map<GLFWwindow *, CWindow *> Windows;

	static void KeyCallback(GLFWwindow * window, int key, int scancode, int action, int mods);
	static void MouseButtonCallback(GLFWwindow * window, int button, int action, int mods);
	static void MouseScrollCallback(GLFWwindow * window, double xoffset, double yoffset);
	static void MouseCursorCallback(GLFWwindow * window, double xpos, double ypos);
	static void CharCallback(GLFWwindow * window, unsigned int c);

private:

	friend class Singleton<CWindowManager>;
	CWindowManager();
{'fraction_non_alphanumeric': 0.09419930589985126, 'fraction_numerical': 0.0009915716410510659, 'mean_word_length': 5.934707903780069, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '633327', 'n_tokens_mistral': 613, 'n_tokens_neox': 600, 'n_words': 199}