summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-13 17:20:30 +0100
committerAmlal El Mahrouss <amlalelmahrouss@icloud.com>2024-02-13 17:21:05 +0100
commitb75417b44d5f63ea0ead68cbe8f62bd76df62229 (patch)
tree81527a21bdf4ae8f14fb8acd0ff04d9d127f24d3
parenta9ac78b47dd040e04afc4990dace2472df2302e4 (diff)
HCR-15: Merge to master branch.
Important commit and end of ticket. Signed-off-by: Amlal El Mahrouss <amlalelmahrouss@icloud.com>
-rw-r--r--.gitignore2
-rw-r--r--Private/KernelKit/DebugOutput.hpp2
-rw-r--r--Private/KernelKit/DeviceManager.hpp (renamed from Private/KernelKit/Device.hpp)0
-rw-r--r--Private/KernelKit/DriveManager.hpp2
-rw-r--r--Private/KernelKit/PCI/Dma.hpp91
-rw-r--r--Private/NetworkKit/NetworkDevice.hpp2
-rw-r--r--Private/NewBoot/Source/makefile2
-rw-r--r--Private/Root/System/LookAndFeel.css46
-rw-r--r--Private/Source/DeviceManager.cxx (renamed from Private/Source/Device.cxx)2
-rw-r--r--Private/Source/DriveManager.cxx4
-rw-r--r--Private/StorageKit/NVME.hpp12
-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.hxx35
14 files changed, 149 insertions, 59 deletions
diff --git a/.gitignore b/.gitignore
index 3102b158..ce3034d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,6 +8,8 @@ build.ninja
cmake_install.cmake
qtcsettings.cmake
+LOOK.CSS
+
x86_64/
*.epm
diff --git a/Private/KernelKit/DebugOutput.hpp b/Private/KernelKit/DebugOutput.hpp
index dd34df8e..6e651924 100644
--- a/Private/KernelKit/DebugOutput.hpp
+++ b/Private/KernelKit/DebugOutput.hpp
@@ -9,7 +9,7 @@
#pragma once
-#include <KernelKit/Device.hpp>
+#include <KernelKit/DeviceManager.hpp>
#include <NewKit/OwnPtr.hpp>
#include <NewKit/Stream.hpp>
diff --git a/Private/KernelKit/Device.hpp b/Private/KernelKit/DeviceManager.hpp
index 9a689b26..9a689b26 100644
--- a/Private/KernelKit/Device.hpp
+++ b/Private/KernelKit/DeviceManager.hpp
diff --git a/Private/KernelKit/DriveManager.hpp b/Private/KernelKit/DriveManager.hpp
index ac39c177..8e6aaefd 100644
--- a/Private/KernelKit/DriveManager.hpp
+++ b/Private/KernelKit/DriveManager.hpp
@@ -11,7 +11,7 @@
#define __DRIVE_MANAGER__
#include <CompilerKit/CompilerKit.hpp>
-#include <KernelKit/Device.hpp>
+#include <KernelKit/DeviceManager.hpp>
#include <NewKit/Defines.hpp>
#include <NewKit/String.hpp>
diff --git a/Private/KernelKit/PCI/Dma.hpp b/Private/KernelKit/PCI/Dma.hpp
index 8e027179..0b4b55b8 100644
--- a/Private/KernelKit/PCI/Dma.hpp
+++ b/Private/KernelKit/PCI/Dma.hpp
@@ -9,73 +9,70 @@
#pragma once
-#include <KernelKit/Device.hpp>
+#include <KernelKit/DeviceManager.hpp>
#include <KernelKit/PCI/Device.hpp>
#include <NewKit/Array.hpp>
#include <NewKit/OwnPtr.hpp>
#include <NewKit/Ref.hpp>
-namespace HCore
-{
-enum class DmaKind
-{
- PCI, // Bus mastering is required to be turned on. Basiaclly a request
- // control system. 64-Bit access depends on the PAE bit and the device
- // (if Double Address Cycle is available)
- ISA, // Four DMA channels 0-3; 8 bit transfers and only a megabyte of RAM.
- Invalid,
+namespace HCore {
+enum class DmaKind {
+ PCI, // Bus mastering is required to be turned on. Basiaclly a request
+ // control system. 64-Bit access depends on the PAE bit and the device
+ // (if Double Address Cycle is available)
+ ISA, // Four DMA channels 0-3; 8 bit transfers and only a megabyte of RAM.
+ Invalid,
};
-class DMAWrapper final
-{
- public:
- explicit DMAWrapper() = delete;
+class DMAWrapper final {
+ public:
+ explicit DMAWrapper() = delete;
- public:
- explicit DMAWrapper(nullPtr) = delete;
- explicit DMAWrapper(voidPtr Ptr, DmaKind Kind = DmaKind::PCI) : m_Address(Ptr), m_Kind(Kind)
- {
- }
+ public:
+ explicit DMAWrapper(nullPtr) = delete;
+ explicit DMAWrapper(voidPtr Ptr, DmaKind Kind = DmaKind::PCI)
+ : m_Address(Ptr), m_Kind(Kind) {}
- public:
- DMAWrapper &operator=(voidPtr Ptr);
+ public:
+ DMAWrapper &operator=(voidPtr Ptr);
- public:
- DMAWrapper &operator=(const DMAWrapper &) = default;
- DMAWrapper(const DMAWrapper &) = default;
+ public:
+ DMAWrapper &operator=(const DMAWrapper &) = default;
+ DMAWrapper(const DMAWrapper &) = default;
- public:
- ~DMAWrapper() = default;
+ public:
+ ~DMAWrapper() = default;
- template <class T> T *operator->();
+ template <class T>
+ T *operator->();
- template <class T> T *Get(const UIntPtr off = 0);
+ template <class T>
+ T *Get(const UIntPtr off = 0);
- public:
- operator bool();
- bool operator!();
+ public:
+ operator bool();
+ bool operator!();
- public:
- bool Write(const UIntPtr &bit, const UIntPtr &offset);
- UIntPtr Read(const UIntPtr &offset);
- Boolean Check(UIntPtr offset) const;
+ public:
+ bool Write(const UIntPtr &bit, const UIntPtr &offset);
+ UIntPtr Read(const UIntPtr &offset);
+ Boolean Check(UIntPtr offset) const;
- public:
- UIntPtr operator[](const UIntPtr &offset);
+ public:
+ UIntPtr operator[](const UIntPtr &offset);
- private:
- voidPtr m_Address{nullptr};
- DmaKind m_Kind{DmaKind::Invalid};
+ private:
+ voidPtr m_Address{nullptr};
+ DmaKind m_Kind{DmaKind::Invalid};
- private:
- friend class DMAFactory;
+ private:
+ friend class DMAFactory;
};
-class DMAFactory final
-{
- public:
- static OwnPtr<IOBuf<Char *>> Construct(OwnPtr<DMAWrapper> &dma);
+class DMAFactory final {
+ public:
+ static OwnPtr<IOBuf<Char *>> Construct(OwnPtr<DMAWrapper> &dma);
};
-} // namespace HCore
+} // namespace HCore
#include <KernelKit/PCI/Dma.inl>
diff --git a/Private/NetworkKit/NetworkDevice.hpp b/Private/NetworkKit/NetworkDevice.hpp
index a9edb09c..e631e868 100644
--- a/Private/NetworkKit/NetworkDevice.hpp
+++ b/Private/NetworkKit/NetworkDevice.hpp
@@ -10,7 +10,7 @@
#ifndef _INC_NETWORKDEVICE_HPP__
#define _INC_NETWORKDEVICE_HPP__
-#include <KernelKit/Device.hpp>
+#include <KernelKit/DeviceManager.hpp>
#include <NetworkKit/IP.hpp>
namespace HCore {
diff --git a/Private/NewBoot/Source/makefile b/Private/NewBoot/Source/makefile
index 23678e9d..fab7453d 100644
--- a/Private/NewBoot/Source/makefile
+++ b/Private/NewBoot/Source/makefile
@@ -22,7 +22,7 @@ bootloader-amd64:
$(ASM) $(FLAG_ASM) HEl/AMD64/AMD64-VirtualMemory.asm
$(LD_GNU) $(OBJ) $(LD_FLAGS) -o HCoreLdr.exe
cp HCoreLdr.exe CDROM/EFI/BOOT/BOOTX64.EFI
- cp ../../HCoreKrnl.exe CDROM/HCOREKRNL.EXE
+ cp ../../HCoreKrnl.exe CDROM/HCOREKRNL.EXE && cp ../../Root/System/LookAndFeel.css CDROM/LOOK.CSS
.PHONY: run-efi-amd64
run-efi-amd64:
diff --git a/Private/Root/System/LookAndFeel.css b/Private/Root/System/LookAndFeel.css
new file mode 100644
index 00000000..44e38465
--- /dev/null
+++ b/Private/Root/System/LookAndFeel.css
@@ -0,0 +1,46 @@
+@layer base {
+ :root {
+ --background: 0 0% 100%;
+ --foreground: 240 10% 3.9%;
+ --card: 0 0% 100%;
+ --card-foreground: 240 10% 3.9%;
+ --popover: 0 0% 100%;
+ --popover-foreground: 240 10% 3.9%;
+ --primary: 240 5.9% 10%;
+ --primary-foreground: 0 0% 98%;
+ --secondary: 240 4.8% 95.9%;
+ --secondary-foreground: 240 5.9% 10%;
+ --muted: 240 4.8% 95.9%;
+ --muted-foreground: 240 3.8% 46.1%;
+ --accent: 240 4.8% 95.9%;
+ --accent-foreground: 240 5.9% 10%;
+ --destructive: 0 84.2% 60.2%;
+ --destructive-foreground: 0 0% 98%;
+ --border: 240 5.9% 90%;
+ --input: 240 5.9% 90%;
+ --ring: 240 5.9% 10%;
+ --radius: 0.5rem;
+ }
+
+ .dark {
+ --background: 240 10% 3.9%;
+ --foreground: 0 0% 98%;
+ --card: 240 10% 3.9%;
+ --card-foreground: 0 0% 98%;
+ --popover: 240 10% 3.9%;
+ --popover-foreground: 0 0% 98%;
+ --primary: 0 0% 98%;
+ --primary-foreground: 240 5.9% 10%;
+ --secondary: 240 3.7% 15.9%;
+ --secondary-foreground: 0 0% 98%;
+ --muted: 240 3.7% 15.9%;
+ --muted-foreground: 240 5% 64.9%;
+ --accent: 240 3.7% 15.9%;
+ --accent-foreground: 0 0% 98%;
+ --destructive: 0 62.8% 30.6%;
+ --destructive-foreground: 0 0% 98%;
+ --border: 240 3.7% 15.9%;
+ --input: 240 3.7% 15.9%;
+ --ring: 240 4.9% 83.9%;
+ }
+}
diff --git a/Private/Source/Device.cxx b/Private/Source/DeviceManager.cxx
index ae72fdad..e5b84bd3 100644
--- a/Private/Source/Device.cxx
+++ b/Private/Source/DeviceManager.cxx
@@ -7,4 +7,4 @@
* ========================================================
*/
-#include <KernelKit/Device.hpp>
+#include <KernelKit/DeviceManager.hpp>
diff --git a/Private/Source/DriveManager.cxx b/Private/Source/DriveManager.cxx
index bc100a1a..371758b1 100644
--- a/Private/Source/DriveManager.cxx
+++ b/Private/Source/DriveManager.cxx
@@ -33,7 +33,7 @@ bool DriveSelector::Mount(DriveTraits *drive) {
fDrive = drive;
fDrive->fMount();
- kcout << "[Krnl] mounted: " << fDrive->fName << "\n";
+ kcout << "Mount: " << fDrive->fName << "\n";
return true;
}
@@ -49,7 +49,7 @@ DriveTraits *DriveSelector::Unmount() {
fDrive->fUnmount();
fDrive = nullptr;
- kcout << "[Krnl] unmounted: " << fDrive->fName << "\n";
+ kcout << "Unmount: " << fDrive->fName << "\n";
return drivePointer;
}
diff --git a/Private/StorageKit/NVME.hpp b/Private/StorageKit/NVME.hpp
index 1b638989..2e778883 100644
--- a/Private/StorageKit/NVME.hpp
+++ b/Private/StorageKit/NVME.hpp
@@ -9,7 +9,7 @@
#pragma once
-#include <KernelKit/Device.hpp>
+#include <KernelKit/DeviceManager.hpp>
#include <NewKit/OwnPtr.hpp>
namespace HCore {
@@ -37,4 +37,14 @@ class NVMEDevice : public DeviceInterface<NVMEPacket> {
private:
void (*fCleanup)(void);
};
+
+class NVMEPacket {
+ UIntPtr DataPtr;
+ SizeT DataSz;
+ UInt64 DriveID;
+
+ Boolean ErrorSet;
+ Boolean BusySet;
+ Boolean ReadySet;
+};
} // namespace HCore
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