aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/platform')
-rw-r--r--include/cru/platform/graphics/Base.hpp2
-rw-r--r--include/cru/platform/graphics/Brush.hpp2
-rw-r--r--include/cru/platform/graphics/Factory.hpp9
-rw-r--r--include/cru/platform/graphics/Font.hpp2
-rw-r--r--include/cru/platform/graphics/Geometry.hpp4
-rw-r--r--include/cru/platform/graphics/Resource.hpp6
-rw-r--r--include/cru/platform/graphics/TextLayout.hpp2
-rw-r--r--include/cru/platform/gui/UiApplication.hpp2
8 files changed, 13 insertions, 16 deletions
diff --git a/include/cru/platform/graphics/Base.hpp b/include/cru/platform/graphics/Base.hpp
index 60af40ab..62ff15c3 100644
--- a/include/cru/platform/graphics/Base.hpp
+++ b/include/cru/platform/graphics/Base.hpp
@@ -8,7 +8,7 @@
namespace cru::platform::graphics {
// forward declarations
-struct IGraphFactory;
+struct IGraphicsFactory;
struct IBrush;
struct ISolidColorBrush;
struct IFont;
diff --git a/include/cru/platform/graphics/Brush.hpp b/include/cru/platform/graphics/Brush.hpp
index 18d9705e..aa21f79d 100644
--- a/include/cru/platform/graphics/Brush.hpp
+++ b/include/cru/platform/graphics/Brush.hpp
@@ -2,7 +2,7 @@
#include "Resource.hpp"
namespace cru::platform::graphics {
-struct IBrush : virtual IGraphResource {};
+struct IBrush : virtual IGraphicsResource {};
struct ISolidColorBrush : virtual IBrush {
virtual Color GetColor() = 0;
diff --git a/include/cru/platform/graphics/Factory.hpp b/include/cru/platform/graphics/Factory.hpp
index 4ee10204..ad198929 100644
--- a/include/cru/platform/graphics/Factory.hpp
+++ b/include/cru/platform/graphics/Factory.hpp
@@ -6,21 +6,18 @@
#include "Geometry.hpp"
#include "TextLayout.hpp"
-#include <string>
-#include <string_view>
-
namespace cru::platform::graphics {
// Entry point of the graph module.
-struct IGraphFactory : virtual IPlatformResource {
+struct IGraphicsFactory : virtual IPlatformResource {
virtual std::unique_ptr<ISolidColorBrush> CreateSolidColorBrush() = 0;
virtual std::unique_ptr<IGeometryBuilder> CreateGeometryBuilder() = 0;
- virtual std::unique_ptr<IFont> CreateFont(std::u16string font_family,
+ virtual std::unique_ptr<IFont> CreateFont(String font_family,
float font_size) = 0;
virtual std::unique_ptr<ITextLayout> CreateTextLayout(
- std::shared_ptr<IFont> font, std::u16string text) = 0;
+ std::shared_ptr<IFont> font, String text) = 0;
std::unique_ptr<ISolidColorBrush> CreateSolidColorBrush(const Color& color) {
std::unique_ptr<ISolidColorBrush> brush = CreateSolidColorBrush();
diff --git a/include/cru/platform/graphics/Font.hpp b/include/cru/platform/graphics/Font.hpp
index c8a155fc..e1a419eb 100644
--- a/include/cru/platform/graphics/Font.hpp
+++ b/include/cru/platform/graphics/Font.hpp
@@ -2,7 +2,7 @@
#include "Resource.hpp"
namespace cru::platform::graphics {
-struct IFont : virtual IGraphResource {
+struct IFont : virtual IGraphicsResource {
virtual float GetFontSize() = 0;
};
} // namespace cru::platform::graphics
diff --git a/include/cru/platform/graphics/Geometry.hpp b/include/cru/platform/graphics/Geometry.hpp
index cc8f8761..f01132fb 100644
--- a/include/cru/platform/graphics/Geometry.hpp
+++ b/include/cru/platform/graphics/Geometry.hpp
@@ -2,13 +2,13 @@
#include "Resource.hpp"
namespace cru::platform::graphics {
-struct IGeometry : virtual IGraphResource {
+struct IGeometry : virtual IGraphicsResource {
virtual bool FillContains(const Point& point) = 0;
};
// After called Build, calling every method will throw a
-struct IGeometryBuilder : virtual IGraphResource {
+struct IGeometryBuilder : virtual IGraphicsResource {
virtual void BeginFigure(const Point& point) = 0;
virtual void LineTo(const Point& point) = 0;
virtual void QuadraticBezierTo(const Point& control_point,
diff --git a/include/cru/platform/graphics/Resource.hpp b/include/cru/platform/graphics/Resource.hpp
index 212e5b18..cd1e5283 100644
--- a/include/cru/platform/graphics/Resource.hpp
+++ b/include/cru/platform/graphics/Resource.hpp
@@ -2,9 +2,9 @@
#include "Base.hpp"
namespace cru::platform::graphics {
-struct IGraphFactory;
+struct IGraphicsFactory;
-struct IGraphResource : virtual IPlatformResource {
- virtual IGraphFactory* GetGraphFactory() = 0;
+struct IGraphicsResource : virtual IPlatformResource {
+ virtual IGraphicsFactory* GetGraphicsFactory() = 0;
};
} // namespace cru::platform::graphics
diff --git a/include/cru/platform/graphics/TextLayout.hpp b/include/cru/platform/graphics/TextLayout.hpp
index 716c8047..ec3c2d96 100644
--- a/include/cru/platform/graphics/TextLayout.hpp
+++ b/include/cru/platform/graphics/TextLayout.hpp
@@ -5,7 +5,7 @@
#include <vector>
namespace cru::platform::graphics {
-struct ITextLayout : virtual IGraphResource {
+struct ITextLayout : virtual IGraphicsResource {
virtual String GetText() = 0;
virtual void SetText(String new_text) = 0;
diff --git a/include/cru/platform/gui/UiApplication.hpp b/include/cru/platform/gui/UiApplication.hpp
index 407e4fa1..86eb0904 100644
--- a/include/cru/platform/gui/UiApplication.hpp
+++ b/include/cru/platform/gui/UiApplication.hpp
@@ -62,7 +62,7 @@ struct CRU_PLATFORM_GUI_API IUiApplication : public virtual IPlatformResource {
virtual INativeWindow* CreateWindow(INativeWindow* parent,
CreateWindowFlag flags) = 0;
- virtual cru::platform::graphics::IGraphFactory* GetGraphFactory() = 0;
+ virtual cru::platform::graphics::IGraphicsFactory* GetGraphFactory() = 0;
virtual ICursorManager* GetCursorManager() = 0;
};