From ae87ff9f949a71a398b4355fe9074c0531de34ba Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 24 Aug 2024 10:47:51 +0200 Subject: [IMP] CoreCG's User Interface Kit, this is a driver/kernel library only. + Reserved for pre-boot/boot operations, before user mode jump. Signed-off-by: Amlal El Mahrouss --- dev/ZKA/Sources/DLLMain.cxx | 22 ++++++++++++++++++++++ dev/ZKA/Sources/KernelCheck.cxx | 2 +- dev/ZKA/Sources/ThreadScheduler.cxx | 2 +- dev/ZKA/Sources/Utils.cxx | 4 ++-- 4 files changed, 26 insertions(+), 4 deletions(-) (limited to 'dev/ZKA/Sources') diff --git a/dev/ZKA/Sources/DLLMain.cxx b/dev/ZKA/Sources/DLLMain.cxx index edfc804f..16e7a82a 100644 --- a/dev/ZKA/Sources/DLLMain.cxx +++ b/dev/ZKA/Sources/DLLMain.cxx @@ -23,6 +23,7 @@ #include #include #include +#include EXTERN Kernel::Property cKernelVersion; @@ -184,6 +185,27 @@ namespace Kernel::Detail /// @return Void EXTERN_C Kernel::Void KeMain(Kernel::Void) { + + CGInit(); + + CGDrawInRegion(CGColor(0x45, 0x00, 0x06), CG::UIAccessibilty::The().Height(), CG::UIAccessibilty::The().Width(), + 0, 0); + + CGFini(); + + auto root_zka_wnd = CG::CGCreateWindow(0, "ZKA System", "Window", 0, 0, 512, 214); + + root_zka_wnd->w_x = 10; + root_zka_wnd->w_y = 10; + + root_zka_wnd->w_needs_repaint = Yes; + + CG::CGDrawWindowList(&root_zka_wnd, 1); + /// Now run kernel loop, until no process are running. Kernel::Detail::FilesystemInstaller(); // automatic filesystem creation. + + while (Yes) + { + } } diff --git a/dev/ZKA/Sources/KernelCheck.cxx b/dev/ZKA/Sources/KernelCheck.cxx index 7b919613..f046fe41 100644 --- a/dev/ZKA/Sources/KernelCheck.cxx +++ b/dev/ZKA/Sources/KernelCheck.cxx @@ -35,7 +35,7 @@ namespace Kernel auto panicBack = RGB(0xff, 0x3a, 0x3a); auto panicTxt = RGB(0xff, 0xff, 0xff); - CGDrawInRegion(panicBack, UIAccessibilty::The().Height(), UIAccessibilty::The().Width(), 0, 0); + CGDrawInRegion(panicBack, CG::UIAccessibilty::The().Height(), CG::UIAccessibilty::The().Width(), 0, 0); auto start_y = 10; auto x = 10; diff --git a/dev/ZKA/Sources/ThreadScheduler.cxx b/dev/ZKA/Sources/ThreadScheduler.cxx index fe2a4782..a38ff9bc 100644 --- a/dev/ZKA/Sources/ThreadScheduler.cxx +++ b/dev/ZKA/Sources/ThreadScheduler.cxx @@ -28,7 +28,7 @@ namespace Kernel::Detail UIntPtr fBSS; UIntPtr fProcessHeader; - // GX buffers. + // CG video buffer and it's size. UIntPtr fTGB; UIntPtr fTGBSize; }; diff --git a/dev/ZKA/Sources/Utils.cxx b/dev/ZKA/Sources/Utils.cxx index 1557ce7d..4a56df3b 100644 --- a/dev/ZKA/Sources/Utils.cxx +++ b/dev/ZKA/Sources/Utils.cxx @@ -62,12 +62,12 @@ namespace Kernel return cnt; } - voidPtr rt_set_memory(voidPtr src, char value, Size len) + voidPtr rt_set_memory(voidPtr src, UInt32 value, Size len) { if (!src || len < 1) return nullptr; - char* start = reinterpret_cast(src); + UInt32* start = reinterpret_cast(src); while (len) { -- cgit v1.2.3