diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-29 17:01:55 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-29 17:06:28 +0100 |
| commit | 7e5be1572c043484293ee0cdd840dd41f54e87ee (patch) | |
| tree | 171427b27eb240d4006fda89e485ce6da28fd749 /Private | |
| parent | d7eb7affee3733dfeee6864045da4c2f5df2e919 (diff) | |
Kernel and SystemLib: See below.
What has been done:
- Rename most System.Core to SystemLib.
- Reworked it's API and the concept of ObjectRef to become the
ApplicationRef object.
- Remove unused ODF and XIFF file format from tree, ODF will be part of
the text editing program.
- Update Readme for SystemLib.
- Add Support folder on NewFS partitions.
What is next:
- NewFS filesystem support.
- Program loading.
- Preemptive scheduler on non-SMP systems using timers.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Private')
| -rw-r--r-- | Private/NewKit/Application.hxx | 29 | ||||
| -rw-r--r-- | Private/ObjectKit/ObjectKit.hxx | 35 | ||||
| -rw-r--r-- | Private/Root/Support/.gitkeep (renamed from Private/Root/Frameworks/.gitkeep) | 0 | ||||
| -rw-r--r-- | Private/Root/Users/.USERHASH | 0 | ||||
| -rw-r--r-- | Private/Root/Users/User.script | 3 |
5 files changed, 32 insertions, 35 deletions
diff --git a/Private/NewKit/Application.hxx b/Private/NewKit/Application.hxx new file mode 100644 index 00000000..292bb434 --- /dev/null +++ b/Private/NewKit/Application.hxx @@ -0,0 +1,29 @@ +/* ------------------------------------------- + + Copyright Mahrouss Logic + +------------------------------------------- */ + +#pragma once + +/// +/// @brief Main application object, given by the OS to interact with the OS. +/// @file Application.hxx +/// @author Amlal EL Mahrouss +/// + +#include <NewKit/Defines.hpp> +#include <CFKit/GUIDWrapper.hpp> + +/// \brief Application Interface. +/// \author Amlal El Mahrouss +typedef struct Application final { + /// @brief Releases the object exit the process on main object. + NewOS::Void(*Release)(struct Application* Self, NewOS::Int32 ExitCode); + /// @brief Invoke a function from the application object. + NewOS::IntPtr(*Invoke)(struct Application* Self, NewOS::Int32 Sel, ...); + /// @brief Query a new application object from a GUID. + NewOS::Void(*Query)(struct Application* Self, NewOS::VoidPtr* Dst, NewOS::SizeT SzDst, NewOS::XRN::GUIDSequence GuidOf); +} Application, *ApplicationRef; + +#define object_cast reinterpret_cast<ApplicationRef> diff --git a/Private/ObjectKit/ObjectKit.hxx b/Private/ObjectKit/ObjectKit.hxx deleted file mode 100644 index 384bf145..00000000 --- a/Private/ObjectKit/ObjectKit.hxx +++ /dev/null @@ -1,35 +0,0 @@ -/* ------------------------------------------- - - Copyright Mahrouss Logic - -------------------------------------------- */ - -#pragma once - -#include <NewKit/Defines.hpp> -#include <CFKit/GUIDWrapper.hpp> - -#define kObjectGlobalNamespace ":\\" - -enum { - kObjectTypeGeneric, - kObjectTypeFile, - kObjectTypeDevice, - kObjectTypeNetwork, - kObjectTypeInvalid, - kObjectTypeCount = 5, -}; - -/// \brief Object handle. -/// \author Amlal El Mahrouss -typedef struct Object final { - NewOS::Char ObjectName[255]; - NewOS::Int32 ObjectType; - NewOS::Char ObjectNamespace[255]; - - NewOS::Void(*Release)(struct Object* Self); - NewOS::IntPtr(*Invoke)(struct Object* Self, NewOS::Int32 Sel, ...); - NewOS::Void(*Query)(struct Object* Self, NewOS::VoidPtr* Dst, NewOS::SizeT SzDst, NewOS::XRN::GUIDSequence GuidOf); -} *ObjectRef; - -#define object_cast reinterpret_cast<ObjectRef> diff --git a/Private/Root/Frameworks/.gitkeep b/Private/Root/Support/.gitkeep index e69de29b..e69de29b 100644 --- a/Private/Root/Frameworks/.gitkeep +++ b/Private/Root/Support/.gitkeep diff --git a/Private/Root/Users/.USERHASH b/Private/Root/Users/.USERHASH deleted file mode 100644 index e69de29b..00000000 --- a/Private/Root/Users/.USERHASH +++ /dev/null diff --git a/Private/Root/Users/User.script b/Private/Root/Users/User.script new file mode 100644 index 00000000..09cecb8b --- /dev/null +++ b/Private/Root/Users/User.script @@ -0,0 +1,3 @@ +# User script + +Guest: true; |
