diff options
| author | PancakeTAS <pancake@mgnet.work> | 2026-06-25 11:19:54 +0200 |
|---|---|---|
| committer | PancakeTAS <pancake@mgnet.work> | 2026-06-25 11:19:54 +0200 |
| commit | ab752cafbde3755e7a09b3ecae021a6727cb7112 (patch) | |
| tree | f7718df132f7683976c64974113d3148b43c46c5 | |
| parent | Bug fixes all across the project (diff) | |
Project hierarchy overhaul
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | include/drm++/drm.hpp | 3 | ||||
| -rw-r--r-- | include/drm++/gem.hpp | 3 | ||||
| -rw-r--r-- | include/drm++/helper/ioctl.hpp (renamed from include/drm++/ioctl.hpp) | 3 | ||||
| -rw-r--r-- | include/drm++/helper/macros.hpp (renamed from include/drm++/helper.hpp) | 20 | ||||
| -rw-r--r-- | include/drm++/helper/types.hpp | 22 | ||||
| -rw-r--r-- | include/drm++/syncobject.hpp | 3 | ||||
| -rw-r--r-- | src/drm.cpp | 4 | ||||
| -rw-r--r-- | src/gem.cpp | 4 | ||||
| -rw-r--r-- | src/helper/ioctl.cpp (renamed from src/ioctl.cpp) | 2 | ||||
| -rw-r--r-- | src/syncobject.cpp | 4 |
11 files changed, 38 insertions, 32 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a37e540..52e6ceb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,9 +8,9 @@ project(drm++ include(cmake/Diagnostics.cmake) add_library(drm++ SHARED + "src/helper/ioctl.cpp" "src/drm.cpp" "src/gem.cpp" - "src/ioctl.cpp" "src/syncobject.cpp") target_include_directories(drm++ diff --git a/include/drm++/drm.hpp b/include/drm++/drm.hpp index c75495b..2833adf 100644 --- a/include/drm++/drm.hpp +++ b/include/drm++/drm.hpp @@ -130,7 +130,8 @@ /// This library requires a C++ compiler capable of C++20 or newer. /// -#include "drm++/helper.hpp" +#include "helper/macros.hpp" +#include "helper/types.hpp" namespace drm { diff --git a/include/drm++/gem.hpp b/include/drm++/gem.hpp index 35829ee..e3e3306 100644 --- a/include/drm++/gem.hpp +++ b/include/drm++/gem.hpp @@ -68,7 +68,8 @@ /// This table is not exhaustive, but it is not recommended to use any other values for bpp. /// -#include "drm++/helper.hpp" +#include "helper/macros.hpp" +#include "helper/types.hpp" #include <unordered_map> diff --git a/include/drm++/ioctl.hpp b/include/drm++/helper/ioctl.hpp index 49f8a1c..fe87f3c 100644 --- a/include/drm++/ioctl.hpp +++ b/include/drm++/helper/ioctl.hpp @@ -2,7 +2,8 @@ #pragma once -#include "drm++/helper.hpp" +#include "macros.hpp" +#include "types.hpp" #include <exception> #include <string> diff --git a/include/drm++/helper.hpp b/include/drm++/helper/macros.hpp index 7b927bf..3187177 100644 --- a/include/drm++/helper.hpp +++ b/include/drm++/helper/macros.hpp @@ -2,26 +2,6 @@ #pragma once -#include <cstdint> -#include <functional> - -namespace drm { - -using u8 = uint8_t; -using u16 = uint16_t; -using u32 = uint32_t; -using u64 = uint64_t; -using s8 = int8_t; -using s16 = int16_t; -using s32 = int32_t; -using s64 = int64_t; - -template<typename T> -using ref = std::reference_wrapper<T>; - -} - -/* Helpful macros */ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-macros" diff --git a/include/drm++/helper/types.hpp b/include/drm++/helper/types.hpp new file mode 100644 index 0000000..0669700 --- /dev/null +++ b/include/drm++/helper/types.hpp @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: MIT */ + +#pragma once + +#include <cstdint> +#include <functional> + +namespace drm { + +using u8 = uint8_t; +using u16 = uint16_t; +using u32 = uint32_t; +using u64 = uint64_t; +using s8 = int8_t; +using s16 = int16_t; +using s32 = int32_t; +using s64 = int64_t; + +template<typename T> +using ref = std::reference_wrapper<T>; + +} diff --git a/include/drm++/syncobject.hpp b/include/drm++/syncobject.hpp index beee332..b5a032d 100644 --- a/include/drm++/syncobject.hpp +++ b/include/drm++/syncobject.hpp @@ -37,7 +37,8 @@ /// this by providing separate classes for each type of sync object. /// -#include "drm++/helper.hpp" +#include "helper/macros.hpp" +#include "helper/types.hpp" #include <optional> #include <vector> diff --git a/src/drm.cpp b/src/drm.cpp index 6bb0a3a..3046412 100644 --- a/src/drm.cpp +++ b/src/drm.cpp @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: MIT */ #include "drm++/drm.hpp" -#include "drm++/helper.hpp" -#include "drm++/ioctl.hpp" +#include "drm++/helper/ioctl.hpp" +#include "drm++/helper/types.hpp" #include <stdexcept> diff --git a/src/gem.cpp b/src/gem.cpp index b6b3d38..82a459d 100644 --- a/src/gem.cpp +++ b/src/gem.cpp @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: MIT */ #include "drm++/gem.hpp" -#include "drm++/helper.hpp" -#include "drm++/ioctl.hpp" +#include "drm++/helper/ioctl.hpp" +#include "drm++/helper/types.hpp" #include <cassert> #include <cerrno> diff --git a/src/ioctl.cpp b/src/helper/ioctl.cpp index 8b4962f..21a1ccb 100644 --- a/src/ioctl.cpp +++ b/src/helper/ioctl.cpp @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: MIT */ -#include "drm++/ioctl.hpp" +#include "drm++/helper/ioctl.hpp" #include <format> #include <string> diff --git a/src/syncobject.cpp b/src/syncobject.cpp index 4ec1a9c..6d7f68e 100644 --- a/src/syncobject.cpp +++ b/src/syncobject.cpp @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: MIT */ #include "drm++/syncobject.hpp" -#include "drm++/helper.hpp" -#include "drm++/ioctl.hpp" +#include "drm++/helper/ioctl.hpp" +#include "drm++/helper/types.hpp" #include <cassert> #include <cstddef> |
