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,10 +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/Clipboard.hpp>
#include <Nazara/Platform/SDL2/InputImpl.hpp>
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{

View File

@@ -1,11 +1,10 @@
// 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/Cursor.hpp>
#include <Nazara/Core/ErrorFlags.hpp>
#include <Nazara/Platform/SDL2/CursorImpl.hpp>
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{

View File

@@ -1,10 +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/Icon.hpp>
#include <Nazara/Platform/SDL2/IconImpl.hpp>
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{

View File

@@ -1,10 +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/Keyboard.hpp>
#include <Nazara/Platform/SDL2/InputImpl.hpp>
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{

View File

@@ -1,13 +1,12 @@
// 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/MessageBox.hpp>
#include <Nazara/Platform/SDL2/WindowImpl.hpp>
#include <NazaraUtils/EnumArray.hpp>
#include <NazaraUtils/StackArray.hpp>
#include <SDL_messagebox.h>
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{

View File

@@ -1,11 +1,10 @@
// 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/Mouse.hpp>
#include <Nazara/Platform/Window.hpp>
#include <Nazara/Platform/SDL2/InputImpl.hpp>
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{

View File

@@ -1,13 +1,12 @@
// 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/Platform.hpp>
#include <Nazara/Platform/Config.hpp>
#include <Nazara/Platform/Cursor.hpp>
#include <Nazara/Platform/Export.hpp>
#include <Nazara/Platform/Window.hpp>
#include <NazaraUtils/CallOnExit.hpp>
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{

View File

@@ -1,12 +1,11 @@
// 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/SDL2/CursorImpl.hpp>
#include <Nazara/Core/ErrorFlags.hpp>
#include <Nazara/Core/PixelFormat.hpp>
#include <array>
#include <Nazara/Platform/Debug.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

View File

@@ -1,12 +1,11 @@
// 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/SDL2/IconImpl.hpp>
#include <Nazara/Core/ErrorFlags.hpp>
#include <Nazara/Core/Image.hpp>
#include <Nazara/Core/PixelFormat.hpp>
#include <Nazara/Platform/Debug.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

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
#include <Nazara/Platform/SDL2/InputImpl.hpp>
#include <Nazara/Core/Error.hpp>
@@ -12,7 +12,6 @@
#include <SDL_keyboard.h>
#include <SDL_keycode.h>
#include <SDL_mouse.h>
#include <Nazara/Platform/Debug.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

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/Platform/SDL2/SDLHelper.hpp>
#include <Nazara/Platform/Debug.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

View File

@@ -1,13 +1,12 @@
// 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/SDL2/VideoModeImpl.hpp>
#include <Nazara/Core/Error.hpp>
#include <Nazara/Platform/VideoMode.hpp>
#include <SDL_video.h>
#include <algorithm>
#include <Nazara/Platform/Debug.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

View File

@@ -1,13 +1,13 @@
// 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/SDL2/WindowImpl.hpp>
#include <Nazara/Core/Error.hpp>
#include <Nazara/Core/ErrorFlags.hpp>
#include <Nazara/Core/Image.hpp>
#include <Nazara/Platform/Config.hpp>
#include <Nazara/Platform/Cursor.hpp>
#include <Nazara/Platform/Export.hpp>
#include <Nazara/Platform/Icon.hpp>
#include <Nazara/Platform/SDL2/CursorImpl.hpp>
#include <Nazara/Platform/SDL2/IconImpl.hpp>
@@ -24,7 +24,6 @@
#include <utf8cpp/utf8.h>
#include <cstdio>
#include <memory>
#include <Nazara/Platform/Debug.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
@@ -12,7 +12,7 @@
#include <NazaraUtils/Prerequisites.hpp>
#include <Nazara/Math/Rect.hpp>
#include <Nazara/Math/Vector2.hpp>
#include <Nazara/Platform/Config.hpp>
#include <Nazara/Platform/Export.hpp>
#include <Nazara/Platform/Keyboard.hpp>
#include <Nazara/Platform/Mouse.hpp>
#include <Nazara/Platform/VideoMode.hpp>

View File

@@ -1,12 +1,11 @@
// 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/VideoMode.hpp>
#include <Nazara/Platform/SDL2/VideoModeImpl.hpp>
#include <algorithm>
#include <functional>
#include <Nazara/Platform/Debug.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

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
#include <Nazara/Platform/Window.hpp>
#include <Nazara/Core/Error.hpp>
@@ -8,7 +8,6 @@
#include <Nazara/Platform/Icon.hpp>
#include <Nazara/Platform/SDL2/WindowImpl.hpp>
#include <NazaraUtils/CallOnExit.hpp>
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{
@@ -168,46 +167,25 @@ NAZARA_WARNING_POP()
bool Window::HasFocus() const
{
#if NAZARA_PLATFORM_SAFE
if (!m_impl)
{
NazaraError("window not created");
return false;
}
#endif
NazaraAssert(m_impl, "window not created");
return m_impl->HasFocus();
}
bool Window::IsMinimized() const
{
#if NAZARA_PLATFORM_SAFE
if (!m_impl)
{
NazaraError("window not created");
return false;
}
#endif
NazaraAssert(m_impl, "window not created");
return m_impl->IsMinimized();
}
bool Window::IsVisible() const
{
#if NAZARA_PLATFORM_SAFE
if (!m_impl)
{
NazaraError("window not created");
return false;
}
#endif
NazaraAssert(m_impl, "window not created");
return m_impl->IsVisible();
}
void Window::SetCursor(std::shared_ptr<Cursor> cursor)
{
NazaraAssert(m_impl, "Window not created");
NazaraAssert(m_impl, "window not created");
NazaraAssert(cursor && cursor->IsValid(), "Invalid cursor");
m_cursor = std::move(cursor);
@@ -216,13 +194,7 @@ NAZARA_WARNING_POP()
void Window::SetFocus()
{
#if NAZARA_PLATFORM_SAFE
if (!m_impl)
{
NazaraError("window not created");
return;
}
#endif
NazaraAssert(m_impl, "window not created");
m_impl->RaiseFocus();
}
@@ -238,143 +210,49 @@ NAZARA_WARNING_POP()
void Window::SetMaximumSize(const Vector2i& maxSize)
{
#if NAZARA_PLATFORM_SAFE
if (!m_impl)
{
NazaraError("window not created");
return;
}
#endif
NazaraAssert(m_impl, "window not created");
m_impl->UpdateMaximumSize(maxSize.x, maxSize.y);
}
void Window::SetMaximumSize(int width, int height)
{
#if NAZARA_PLATFORM_SAFE
if (!m_impl)
{
NazaraError("window not created");
return;
}
#endif
m_impl->UpdateMaximumSize(width, height);
}
void Window::SetMinimumSize(const Vector2i& minSize)
{
#if NAZARA_PLATFORM_SAFE
if (!m_impl)
{
NazaraError("window not created");
return;
}
#endif
NazaraAssert(m_impl, "window not created");
m_impl->UpdateMinimumSize(minSize.x, minSize.y);
}
void Window::SetMinimumSize(int width, int height)
{
#if NAZARA_PLATFORM_SAFE
if (!m_impl)
{
NazaraError("window not created");
return;
}
#endif
m_impl->UpdateMinimumSize(width, height);
}
void Window::SetPosition(const Vector2i& position)
{
#if NAZARA_PLATFORM_SAFE
if (!m_impl)
{
NazaraError("window not created");
return;
}
#endif
NazaraAssert(m_impl, "window not created");
m_impl->UpdatePosition(position.x, position.y);
}
void Window::SetPosition(int x, int y)
{
#if NAZARA_PLATFORM_SAFE
if (!m_impl)
{
NazaraError("window not created");
return;
}
#endif
m_impl->UpdatePosition(x, y);
}
void Window::SetSize(const Vector2i& size)
{
#if NAZARA_PLATFORM_SAFE
if (!m_impl)
{
NazaraError("window not created");
return;
}
#endif
NazaraAssert(m_impl, "window not created");
m_impl->UpdateSize(size.x, size.y);
}
void Window::SetSize(unsigned int width, unsigned int height)
{
#if NAZARA_PLATFORM_SAFE
if (!m_impl)
{
NazaraError("window not created");
return;
}
#endif
m_impl->UpdateSize(width, height);
}
void Window::SetStayOnTop(bool stayOnTop)
{
#if NAZARA_PLATFORM_SAFE
if (!m_impl)
{
NazaraError("window not created");
return;
}
#endif
NazaraAssert(m_impl, "window not created");
m_impl->UpdateStayOnTop(stayOnTop);
}
void Window::SetTitle(const std::string& title)
{
#if NAZARA_PLATFORM_SAFE
if (!m_impl)
{
NazaraError("window not created");
return;
}
#endif
NazaraAssert(m_impl, "window not created");
m_impl->UpdateTitle(title);
}
void Window::SetVisible(bool visible)
{
#if NAZARA_PLATFORM_SAFE
if (!m_impl)
{
NazaraError("window not created");
return;
}
#endif
NazaraAssert(m_impl, "window not created");
m_impl->Show(visible);
}
@@ -423,13 +301,7 @@ NAZARA_WARNING_POP()
void Window::IgnoreNextMouseEvent(int mouseX, int mouseY) const
{
#if NAZARA_PLATFORM_SAFE
if (!m_impl)
{
NazaraError("window not created");
return;
}
#endif
NazaraAssert(m_impl, "window not created");
m_impl->IgnoreNextMouseEvent(mouseX, mouseY);
}

View File

@@ -1,10 +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/WindowingAppComponent.hpp>
#include <Nazara/Core/ApplicationBase.hpp>
#include <Nazara/Platform/Debug.hpp>
namespace Nz
{