diff options
| author | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-13 16:21:59 +0000 |
|---|---|---|
| committer | Amlal El Mahrouss <amlalelmahrouss@icloud.com> | 2024-02-13 16:21:59 +0000 |
| commit | ddc819e396d7b9626b832b092f6298c0faaccde4 (patch) | |
| tree | 81527a21bdf4ae8f14fb8acd0ff04d9d127f24d3 /Public | |
| parent | a4af4dc720a0ba8d4c3a23e05825989329a48a2f (diff) | |
| parent | b75417b44d5f63ea0ead68cbe8f62bd76df62229 (diff) | |
Merge branch 'HCR-15' into 'trunk'
HCR-15: Load Kernel into memory.
See merge request mahrouss-logic/micro-kernel!5
Diffstat (limited to 'Public')
| -rw-r--r-- | Public/Kits/GKit/Core.hpp | 8 | ||||
| -rw-r--r-- | Public/Kits/GKit/Frame.cxx (renamed from Public/Kits/GKit/GFrame.cxx) | 4 | ||||
| -rw-r--r-- | Public/Kits/GKit/Frame.hpp (renamed from Public/Kits/GKit/GFrame.hpp) | 4 | ||||
| -rw-r--r-- | Public/Kits/GKit/Stylesheet.hxx | 35 |
4 files changed, 43 insertions, 8 deletions
diff --git a/Public/Kits/GKit/Core.hpp b/Public/Kits/GKit/Core.hpp index 00ae524e..39eb341b 100644 --- a/Public/Kits/GKit/Core.hpp +++ b/Public/Kits/GKit/Core.hpp @@ -132,12 +132,12 @@ class G_API GApplication final { GDocument* Document() noexcept { return nullptr; } - GApplication* Shared() noexcept { - STATIC GApplication* gApp = nullptr; + static GApplication* Shared() noexcept { + STATIC GApplication* kApp = nullptr; - if (!gApp) gApp = new GApplication(); + if (!kApp) kApp = new GApplication(); - return gApp; + return kApp; } }; diff --git a/Public/Kits/GKit/GFrame.cxx b/Public/Kits/GKit/Frame.cxx index 427c95ba..939dfc5a 100644 --- a/Public/Kits/GKit/GFrame.cxx +++ b/Public/Kits/GKit/Frame.cxx @@ -2,7 +2,7 @@ Copyright Mahrouss Logic - File: GFrame.cpp + File: Frame.cpp Purpose: Revision History: @@ -11,6 +11,6 @@ ------------------------------------------- */ -#include <GKit/GFrame.hpp> +#include <GKit/Frame.hpp> namespace HCore {} diff --git a/Public/Kits/GKit/GFrame.hpp b/Public/Kits/GKit/Frame.hpp index f70f8f8e..f71628a7 100644 --- a/Public/Kits/GKit/GFrame.hpp +++ b/Public/Kits/GKit/Frame.hpp @@ -2,7 +2,7 @@ Copyright Mahrouss Logic - File: GFrame.hpp + File: Frame.hpp Purpose: Revision History: @@ -18,7 +18,7 @@ #include <NewKit/MutableArray.hpp> namespace HCore { -class GFrame { +class G_API GFrame { public: explicit GFrame(GFrame* parent = nullptr) : m_ParentFrame(parent) {} ~GFrame() {} diff --git a/Public/Kits/GKit/Stylesheet.hxx b/Public/Kits/GKit/Stylesheet.hxx index bd764fcb..a34dd435 100644 --- a/Public/Kits/GKit/Stylesheet.hxx +++ b/Public/Kits/GKit/Stylesheet.hxx @@ -14,3 +14,38 @@ #pragma once /// TODO: Stylesheets for GUI. + +#include <GKit/Core.hpp> +#include <GKit/Dim2d.hpp> +#include <NewKit/MutableArray.hpp> + +#include "NewKit/String.hpp" + +namespace HCore { +class G_API Stylesheet final { + public: + explicit Stylesheet() = default; + ~Stylesheet() = default; + + HCORE_COPY_DEFAULT(Stylesheet); + + MutableArray<StringView>& Props() { return mProps; } + + private: + MutableArray<StringView> mProps; +}; + +class StylesheetParser final { + public: + static MutableArray<Stylesheet> FromBlob(WideChar* Blob, SizeT BlobSz) { + MutableArray<Stylesheet> stylesheet; + + if (!Blob || BlobSz < 1) return stylesheet; + + for (auto BlobIndex = 0UL; BlobIndex < BlobSz; ++BlobIndex) { + } + + return stylesheet; + } +}; +} // namespace HCore |
