Remove Config.hpp options and refactor headers

- Rename Config.hpp to Export.hpp
- Remove Debug.hpp and DebugOff.hpp (not used anymore)
This commit is contained in:
SirLynix
2024-02-19 13:56:31 +01:00
committed by Jérôme Leclercq
parent 3c7e2a1685
commit 5130a2ff84
1350 changed files with 1881 additions and 4103 deletions

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -8,8 +8,8 @@
#define NAZARA_PLATFORM_CLIPBOARD_HPP
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Platform/Config.hpp>
#include <Nazara/Platform/Enums.hpp>
#include <Nazara/Platform/Export.hpp>
#include <string>
namespace Nz

View File

@@ -1,11 +1,9 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{
}
#include <Nazara/Platform/DebugOff.hpp>

View File

@@ -1,17 +0,0 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_PLATFORM_CONFIGCHECK_HPP
#define NAZARA_PLATFORM_CONFIGCHECK_HPP
/// This file is used to check the constant values defined in Config.hpp
#include <type_traits>
#define NazaraCheckTypeAndVal(name, type, op, val, err) static_assert(std::is_ ##type <decltype(name)>::value && name op val, #type err)
#undef NazaraCheckTypeAndVal
#endif // NAZARA_PLATFORM_CONFIGCHECK_HPP

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -10,8 +10,8 @@
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Core/Image.hpp>
#include <Nazara/Math/Vector2.hpp>
#include <Nazara/Platform/Config.hpp>
#include <Nazara/Platform/Enums.hpp>
#include <Nazara/Platform/Export.hpp>
#include <NazaraUtils/EnumArray.hpp>
#include <array>

View File

@@ -1,8 +1,7 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{
@@ -24,4 +23,3 @@ namespace Nz
}
}
#include <Nazara/Platform/DebugOff.hpp>

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once

View File

@@ -1,8 +1,7 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{
@@ -12,4 +11,3 @@ namespace Nz
}
}
#include <Nazara/Platform/DebugOff.hpp>

View File

@@ -1,5 +0,0 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// no header guards

View File

@@ -1,5 +0,0 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// no header guards

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once

View File

@@ -24,19 +24,8 @@
#pragma once
#ifndef NAZARA_PLATFORM_CONFIG_HPP
#define NAZARA_PLATFORM_CONFIG_HPP
/// Each modification of a parameter needs a recompilation of the module
// Activate the security tests based on the code (Advised for development)
#define NAZARA_PLATFORM_SAFE 1
// Protect the classes against data race
//#define NAZARA_PLATFORM_THREADSAFE 1
// On Windows, ALT and F10 keys do not activate the window menu
#define NAZARA_PLATFORM_WINDOWS_DISABLE_MENU_KEYS 1
#ifndef NAZARA_PLATFORM_EXPORT_HPP
#define NAZARA_PLATFORM_EXPORT_HPP
#if defined(NAZARA_STATIC)
#define NAZARA_PLATFORM_API
@@ -48,4 +37,4 @@
#endif
#endif
#endif // NAZARA_PLATFORM_CONFIG_HPP
#endif // NAZARA_PLATFORM_EXPORT_HPP

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -8,7 +8,7 @@
#define NAZARA_PLATFORM_ICON_HPP
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Platform/Config.hpp>
#include <Nazara/Platform/Export.hpp>
#include <memory>
namespace Nz

View File

@@ -1,9 +1,8 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Core/ErrorFlags.hpp>
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{
@@ -13,4 +12,3 @@ namespace Nz
}
}
#include <Nazara/Platform/DebugOff.hpp>

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
// Interface inspired by the SFML of Laurent Gomila (and its team)
@@ -10,7 +10,7 @@
#define NAZARA_PLATFORM_KEYBOARD_HPP
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Platform/Config.hpp>
#include <Nazara/Platform/Export.hpp>
#include <string>
namespace Nz

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -9,8 +9,8 @@
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Core/Color.hpp>
#include <Nazara/Platform/Config.hpp>
#include <Nazara/Platform/Enums.hpp>
#include <Nazara/Platform/Export.hpp>
#include <NazaraUtils/Result.hpp>
#include <string>
#include <vector>

View File

@@ -1,9 +1,8 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <NazaraUtils/Algorithm.hpp>
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{
@@ -67,4 +66,3 @@ namespace Nz
}
}
#include <Nazara/Platform/DebugOff.hpp>

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
// Interface inspired by the SFML of Laurent Gomila (and its team)
@@ -11,7 +11,7 @@
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Math/Vector2.hpp>
#include <Nazara/Platform/Config.hpp>
#include <Nazara/Platform/Export.hpp>
namespace Nz
{

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -9,7 +9,7 @@
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Core/Core.hpp>
#include <Nazara/Platform/Config.hpp>
#include <Nazara/Platform/Export.hpp>
namespace Nz
{

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
// Interface inspirée de la SFML par Laurent Gomila
@@ -10,7 +10,7 @@
#define NAZARA_PLATFORM_VIDEOMODE_HPP
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Platform/Config.hpp>
#include <Nazara/Platform/Export.hpp>
#include <vector>
namespace Nz

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
// Interface inspirée de la SFML par Laurent Gomila
@@ -11,10 +11,10 @@
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Math/Vector2.hpp>
#include <Nazara/Platform/Config.hpp>
#include <Nazara/Platform/Cursor.hpp>
#include <Nazara/Platform/CursorController.hpp>
#include <Nazara/Platform/Enums.hpp>
#include <Nazara/Platform/Export.hpp>
#include <Nazara/Platform/Icon.hpp>
#include <Nazara/Platform/VideoMode.hpp>
#include <Nazara/Platform/WindowEventHandler.hpp>
@@ -77,13 +77,9 @@ namespace Nz
void SetFocus();
void SetIcon(std::shared_ptr<Icon> icon);
void SetMaximumSize(const Vector2i& maxSize);
void SetMaximumSize(int width, int height);
void SetMinimumSize(const Vector2i& minSize);
void SetMinimumSize(int width, int height);
void SetPosition(const Vector2i& position);
void SetPosition(int x, int y);
void SetSize(const Vector2i& size);
void SetSize(unsigned int width, unsigned int height);
void SetStayOnTop(bool stayOnTop);
void SetTitle(const std::string& title);
void SetVisible(bool visible);

View File

@@ -1,9 +1,8 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Core/ErrorFlags.hpp>
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{
@@ -102,4 +101,3 @@ namespace Nz
}
}
#include <Nazara/Platform/DebugOff.hpp>

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
// Interface inspired by the SFML of Laurent Gomila (and its team)

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -10,7 +10,7 @@
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Core/HandledObject.hpp>
#include <Nazara/Core/ObjectHandle.hpp>
#include <Nazara/Platform/Config.hpp>
#include <Nazara/Platform/Export.hpp>
#include <Nazara/Platform/WindowEvent.hpp>
#include <NazaraUtils/Signal.hpp>

View File

@@ -1,9 +1,8 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <memory>
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{
@@ -97,4 +96,3 @@ namespace Nz
}
}
#include <Nazara/Platform/DebugOff.hpp>

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -8,7 +8,7 @@
#define NAZARA_PLATFORM_WINDOWHANDLE_HPP
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Core/Config.hpp>
#include <Nazara/Core/Export.hpp>
namespace Nz
{

View File

@@ -1,6 +1,6 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#pragma once
@@ -9,7 +9,7 @@
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Core/ApplicationComponent.hpp>
#include <Nazara/Platform/Config.hpp>
#include <Nazara/Platform/Export.hpp>
#include <Nazara/Platform/Window.hpp>
namespace Nz

View File

@@ -1,8 +1,7 @@
// Copyright (C) 2024 Jérôme "SirLynix" Leclercq (lynix680@gmail.com)
// This file is part of the "Nazara Engine - Platform module"
// For conditions of distribution and use, see copyright notice in Config.hpp
// For conditions of distribution and use, see copyright notice in Export.hpp
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{
@@ -34,4 +33,3 @@ namespace Nz
}
}
#include <Nazara/Platform/DebugOff.hpp>