aboutsummaryrefslogtreecommitdiff
path: root/src/platform
diff options
context:
space:
mode:
Diffstat (limited to 'src/platform')
-rw-r--r--src/platform/CMakeLists.txt4
-rw-r--r--src/platform/graph/CMakeLists.txt14
-rw-r--r--src/platform/graphics/CMakeLists.txt14
-rw-r--r--src/platform/gui/CMakeLists.txt14
-rw-r--r--src/platform/gui/Keyboard.cpp (renamed from src/platform/native/Keyboard.cpp)6
-rw-r--r--src/platform/gui/UiApplication.cpp (renamed from src/platform/native/UiApplication.cpp)6
-rw-r--r--src/platform/native/CMakeLists.txt14
7 files changed, 36 insertions, 36 deletions
diff --git a/src/platform/CMakeLists.txt b/src/platform/CMakeLists.txt
index 51253b56..623ec08f 100644
--- a/src/platform/CMakeLists.txt
+++ b/src/platform/CMakeLists.txt
@@ -10,5 +10,5 @@ target_sources(cru_platform_base INTERFACE
)
target_link_libraries(cru_platform_base INTERFACE cru_base)
-add_subdirectory(graph)
-add_subdirectory(native)
+add_subdirectory(graphics)
+add_subdirectory(gui)
diff --git a/src/platform/graph/CMakeLists.txt b/src/platform/graph/CMakeLists.txt
deleted file mode 100644
index 3bf11e8d..00000000
--- a/src/platform/graph/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-set(CRU_PLATFORM_GRAPH_INCLUDE_DIR ${CRU_INCLUDE_DIR}/cru/platform/graph)
-add_library(cru_platform_graph INTERFACE)
-target_sources(cru_platform_graph INTERFACE
- ${CRU_PLATFORM_GRAPH_INCLUDE_DIR}/Base.hpp
- ${CRU_PLATFORM_GRAPH_INCLUDE_DIR}/Brush.hpp
- ${CRU_PLATFORM_GRAPH_INCLUDE_DIR}/Font.hpp
- ${CRU_PLATFORM_GRAPH_INCLUDE_DIR}/Geometry.hpp
- ${CRU_PLATFORM_GRAPH_INCLUDE_DIR}/Factory.hpp
- ${CRU_PLATFORM_GRAPH_INCLUDE_DIR}/Resource.hpp
- ${CRU_PLATFORM_GRAPH_INCLUDE_DIR}/Painter.hpp
- ${CRU_PLATFORM_GRAPH_INCLUDE_DIR}/TextLayout.hpp
- ${CRU_PLATFORM_GRAPH_INCLUDE_DIR}/util/Painter.hpp
-)
-target_link_libraries(cru_platform_graph INTERFACE cru_platform_base)
diff --git a/src/platform/graphics/CMakeLists.txt b/src/platform/graphics/CMakeLists.txt
new file mode 100644
index 00000000..5f841267
--- /dev/null
+++ b/src/platform/graphics/CMakeLists.txt
@@ -0,0 +1,14 @@
+set(CRU_PLATFORM_GRAPHICS_INCLUDE_DIR ${CRU_INCLUDE_DIR}/cru/platform/graphics)
+add_library(cru_platform_graphics INTERFACE)
+target_sources(cru_platform_graphics INTERFACE
+ ${CRU_PLATFORM_GRAPHICS_INCLUDE_DIR}/Base.hpp
+ ${CRU_PLATFORM_GRAPHICS_INCLUDE_DIR}/Brush.hpp
+ ${CRU_PLATFORM_GRAPHICS_INCLUDE_DIR}/Font.hpp
+ ${CRU_PLATFORM_GRAPHICS_INCLUDE_DIR}/Geometry.hpp
+ ${CRU_PLATFORM_GRAPHICS_INCLUDE_DIR}/Factory.hpp
+ ${CRU_PLATFORM_GRAPHICS_INCLUDE_DIR}/Resource.hpp
+ ${CRU_PLATFORM_GRAPHICS_INCLUDE_DIR}/Painter.hpp
+ ${CRU_PLATFORM_GRAPHICS_INCLUDE_DIR}/TextLayout.hpp
+ ${CRU_PLATFORM_GRAPHICS_INCLUDE_DIR}/util/Painter.hpp
+)
+target_link_libraries(cru_platform_graphics INTERFACE cru_platform_base)
diff --git a/src/platform/gui/CMakeLists.txt b/src/platform/gui/CMakeLists.txt
new file mode 100644
index 00000000..aca7620c
--- /dev/null
+++ b/src/platform/gui/CMakeLists.txt
@@ -0,0 +1,14 @@
+set(CRU_PLATFORM_GUI_INCLUDE_DIR ${CRU_INCLUDE_DIR}/cru/platform/gui)
+add_library(cru_platform_gui STATIC
+ Keyboard.cpp
+ UiApplication.cpp
+)
+target_sources(cru_platform_gui PUBLIC
+ ${CRU_PLATFORM_GUI_INCLUDE_DIR}/Base.hpp
+ ${CRU_PLATFORM_GUI_INCLUDE_DIR}/Cursor.hpp
+ ${CRU_PLATFORM_GUI_INCLUDE_DIR}/InputMethod.hpp
+ ${CRU_PLATFORM_GUI_INCLUDE_DIR}/Keyboard.hpp
+ ${CRU_PLATFORM_GUI_INCLUDE_DIR}/Window.hpp
+ ${CRU_PLATFORM_GUI_INCLUDE_DIR}/UiApplication.hpp
+)
+target_link_libraries(cru_platform_gui PUBLIC cru_platform_graphics)
diff --git a/src/platform/native/Keyboard.cpp b/src/platform/gui/Keyboard.cpp
index dd0e8f23..24880e00 100644
--- a/src/platform/native/Keyboard.cpp
+++ b/src/platform/gui/Keyboard.cpp
@@ -1,10 +1,10 @@
-#include "cru/platform/native/Keyboard.hpp"
+#include "cru/platform/gui/Keyboard.hpp"
#include <array>
#include <string>
#include <string_view>
-namespace cru::platform::native {
+namespace cru::platform::gui {
constexpr std::array<std::u16string_view,
static_cast<int>(KeyCode::NumPad9) + 1>
key_code_string_list{u"Unknown",
@@ -139,4 +139,4 @@ std::u16string ToString(KeyModifier key_modifier,
return result;
}
-} // namespace cru::platform::native
+} // namespace cru::platform::gui
diff --git a/src/platform/native/UiApplication.cpp b/src/platform/gui/UiApplication.cpp
index 200b10e0..f095361e 100644
--- a/src/platform/native/UiApplication.cpp
+++ b/src/platform/gui/UiApplication.cpp
@@ -1,6 +1,6 @@
-#include "cru/platform/native/UiApplication.hpp"
+#include "cru/platform/gui/UiApplication.hpp"
-namespace cru::platform::native {
+namespace cru::platform::gui {
IUiApplication* IUiApplication::instance = nullptr;
IUiApplication::IUiApplication() {
@@ -12,4 +12,4 @@ IUiApplication::IUiApplication() {
}
IUiApplication::~IUiApplication() { instance = nullptr; }
-} // namespace cru::platform::native
+} // namespace cru::platform::gui
diff --git a/src/platform/native/CMakeLists.txt b/src/platform/native/CMakeLists.txt
deleted file mode 100644
index 3fe4370a..00000000
--- a/src/platform/native/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-set(CRU_PLATFORM_NATIVE_INCLUDE_DIR ${CRU_INCLUDE_DIR}/cru/platform/native)
-add_library(cru_platform_native STATIC
- Keyboard.cpp
- UiApplication.cpp
-)
-target_sources(cru_platform_native PUBLIC
- ${CRU_PLATFORM_NATIVE_INCLUDE_DIR}/Base.hpp
- ${CRU_PLATFORM_NATIVE_INCLUDE_DIR}/Cursor.hpp
- ${CRU_PLATFORM_NATIVE_INCLUDE_DIR}/InputMethod.hpp
- ${CRU_PLATFORM_NATIVE_INCLUDE_DIR}/Keyboard.hpp
- ${CRU_PLATFORM_NATIVE_INCLUDE_DIR}/Window.hpp
- ${CRU_PLATFORM_NATIVE_INCLUDE_DIR}/UiApplication.hpp
-)
-target_link_libraries(cru_platform_native PUBLIC cru_platform_graph)