diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-27 08:35:15 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-27 08:35:15 +0100 |
| commit | 6a18e607ffc4e83f2bd953c9de5c14f18e077df8 (patch) | |
| tree | c4fe27391a237361b2cfc3c59a88f28240e20461 | |
| parent | 3ba0a4aea3d57c67f316b183ca1efb2f6a3e5ee8 (diff) | |
Kernel: Update System API, add prefix to functions.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
| -rw-r--r-- | Private/FSKit/NewFS.hxx | 4 | ||||
| -rw-r--r-- | Private/FirmwareKit/EFI/EFI.hxx | 12 | ||||
| -rw-r--r-- | Private/FirmwareKit/EPM.hxx | 2 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/BootEPM.cxx | 4 | ||||
| -rw-r--r-- | Public/Developer/System.Containers/Headers/XIFF.hxx | 3 | ||||
| -rw-r--r-- | Public/Developer/System.Core/Headers/Defines.hxx | 6 | ||||
| -rw-r--r-- | Public/Developer/System.Core/Headers/Dialog.hxx | 2 | ||||
| -rw-r--r-- | Public/Developer/System.Core/Headers/FS.hxx (renamed from Public/Developer/System.Core/Headers/Image.hxx) | 2 | ||||
| -rw-r--r-- | Public/Developer/System.Core/Headers/Menu.hxx | 9 | ||||
| -rw-r--r-- | Public/Developer/System.Core/Headers/Rsrc.hxx | 9 | ||||
| -rw-r--r-- | Public/Developer/System.Core/Headers/Thread.hxx | 4 | ||||
| -rw-r--r-- | Public/Developer/System.Core/Headers/TrueType.hxx | 4 | ||||
| -rw-r--r-- | Public/Developer/System.Core/Headers/Window.hxx | 28 |
13 files changed, 34 insertions, 55 deletions
diff --git a/Private/FSKit/NewFS.hxx b/Private/FSKit/NewFS.hxx index 9645d29c..ffd198d2 100644 --- a/Private/FSKit/NewFS.hxx +++ b/Private/FSKit/NewFS.hxx @@ -167,7 +167,9 @@ class NewFSParser { HCORE_COPY_DEFAULT(NewFSParser); public: - virtual _Output NewFork* GetForkFrom(NewCatalog& catalog, const Char* name) = 0; + virtual void CreateFork(_Input NewCatalog& catalog, _Input NewFork& theFork) = 0; + + virtual _Output NewFork* FindFork(_Input NewCatalog& catalog, _Input const Char* name) = 0; virtual _Output NewCatalog* FindCatalog(const char* catalogName) = 0; diff --git a/Private/FirmwareKit/EFI/EFI.hxx b/Private/FirmwareKit/EFI/EFI.hxx index 463d757b..7ac8d624 100644 --- a/Private/FirmwareKit/EFI/EFI.hxx +++ b/Private/FirmwareKit/EFI/EFI.hxx @@ -42,7 +42,7 @@ struct EfiFileProtocol; typedef UInt64 EfiStatusType; -/// @brief Core Handle Type +/// @brief Core Handle Kind /// This is like NT's Win32 HANDLE type. typedef struct EfiHandle { } *EfiHandlePtr; @@ -189,15 +189,15 @@ typedef enum EfiAllocateType { typedef struct EfiMemoryDescriptor { /// - /// Type of the memory region. - /// Type EFI_MEMORY_TYPE is defined in the + /// Kind of the memory region. + /// Kind EFI_MEMORY_TYPE is defined in the /// AllocatePages() function description. /// - UInt32 Type; + UInt32 Kind; /// /// Physical address of the first byte in the memory region. PhysicalStart /// must be aligned on a 4 KiB boundary, and must not be above - /// 0xfffffffffffff000. Type EFI_PHYSICAL_ADDRESS is defined in the + /// 0xfffffffffffff000. Kind EFI_PHYSICAL_ADDRESS is defined in the /// AllocatePages() function description /// UIntPtr PhysicalStart; @@ -403,7 +403,7 @@ typedef struct EfiLoadFileProtocol { } EfiLoadFileProtocol; typedef struct EfiDevicePathProtocol { - UInt8 Type; + UInt8 Kind; UInt8 SubType; UInt8 Length[2]; } EfiDevicePathProtocol; diff --git a/Private/FirmwareKit/EPM.hxx b/Private/FirmwareKit/EPM.hxx index 0746a050..2c68b40a 100644 --- a/Private/FirmwareKit/EPM.hxx +++ b/Private/FirmwareKit/EPM.hxx @@ -50,7 +50,7 @@ struct PACKED PartitionBlock { HCore::Int64 SectorEnd; HCore::Int64 SectorSz; HCore::Int64 SectorStart; - HCore::Int16 Type; + HCore::Int16 Kind; HCore::Int32 Version; HCore::Char Fs[kEPMFilesystemLength]; /* NewFS, HCFS... */ }; diff --git a/Private/NewBoot/Source/HEL/AMD64/BootEPM.cxx b/Private/NewBoot/Source/HEL/AMD64/BootEPM.cxx index 871f35a3..bd650031 100644 --- a/Private/NewBoot/Source/HEL/AMD64/BootEPM.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/BootEPM.cxx @@ -75,7 +75,7 @@ EXTERN_C Boolean boot_write_newfs_partition(const Char* namePart, SizeT namePart partBlock->SectorSz = kATASectorSize; partBlock->SectorStart = kEPMStartPartition + MIB(4); partBlock->Version = kNewFSVersionInteger; - partBlock->Type = kNewFSPartitionTypeStandard; + partBlock->Kind = kNewFSPartitionTypeStandard; partBlock->SectorEnd = 0; /// grows on the disk. PartitionBlock* swapBlock = (PartitionBlock*)(buf + sizeof(BootBlock) + sizeof(PartitionBlock)); @@ -96,7 +96,7 @@ EXTERN_C Boolean boot_write_newfs_partition(const Char* namePart, SizeT namePart swapBlock->SectorSz = kATASectorSize; swapBlock->SectorStart = kEPMStartPartition; swapBlock->Version = kNewFSVersionInteger; - swapBlock->Type = kNewFSPartitionTypeBoot; + swapBlock->Kind = kNewFSPartitionTypeBoot; swapBlock->SectorEnd = MIB(4); /// 4 MIB swap partition. ataInterface->Write(buf, 1); diff --git a/Public/Developer/System.Containers/Headers/XIFF.hxx b/Public/Developer/System.Containers/Headers/XIFF.hxx index 4c97e2a3..faf8e947 100644 --- a/Public/Developer/System.Containers/Headers/XIFF.hxx +++ b/Public/Developer/System.Containers/Headers/XIFF.hxx @@ -7,7 +7,7 @@ /** --------------------------------------------------- - * THIS FILE CONTAINS CODE FOR THE eXtended Information File Format. + * The eXtended Information File Format. * XIFF is used to make setup programs/audio/video files. ------------------------------------------------------- */ @@ -59,5 +59,4 @@ struct ML_PACKED XiffMetadataHeader final { /// UI resource #define kXIFFResourceMetadata4CC "resx" - #endif // ifndef __XIFF__ diff --git a/Public/Developer/System.Core/Headers/Defines.hxx b/Public/Developer/System.Core/Headers/Defines.hxx index 9932298e..64b1295e 100644 --- a/Public/Developer/System.Core/Headers/Defines.hxx +++ b/Public/Developer/System.Core/Headers/Defines.hxx @@ -11,7 +11,7 @@ #endif #ifdef _DEBUG -#define CA_MUST_PASS(e) { if (!e) { MsgBox("Sorry, ssertion failed.\nFile: %s\nLine: %i", __FILE__, __LINE__) __assert_chk_fail() } } +#define CA_MUST_PASS(e) { if (!e) { DlgMsgBox("Sorry, an assertion failed.\nFile: %s\nLine: %i", __FILE__, __LINE__) __assert_chk_fail() } } #else #define CA_MUST_PASS(e) CA_UNREFERENCED_PARAMETER(e) #endif @@ -131,9 +131,7 @@ enum RtProcessCall { }; #include <System.Core/Headers/Hint.hxx> - -#define kObjectGlobalNamespaceSystem "HCORE_ROOT\\" -#define kObjectGlobalNamespaceUser "HCORE_USER_ROOT\\" +#include <System.Core/Headers/Dialog.hxx> enum { kObjectTypeProcess, diff --git a/Public/Developer/System.Core/Headers/Dialog.hxx b/Public/Developer/System.Core/Headers/Dialog.hxx index 1cc97a6e..0faaae67 100644 --- a/Public/Developer/System.Core/Headers/Dialog.hxx +++ b/Public/Developer/System.Core/Headers/Dialog.hxx @@ -13,4 +13,4 @@ /// @param format the format /// @param va_list the va args, that goes along with it. /// @return void -CA_EXTERN_C VoidType MsgBox(CharacterTypeUTF8* title, CharacterTypeUTF8* format, ...); +CA_EXTERN_C VoidType DlgMsgBox(CharacterTypeUTF8* title, CharacterTypeUTF8* format, ...); diff --git a/Public/Developer/System.Core/Headers/Image.hxx b/Public/Developer/System.Core/Headers/FS.hxx index 0fc4e738..62ed1255 100644 --- a/Public/Developer/System.Core/Headers/Image.hxx +++ b/Public/Developer/System.Core/Headers/FS.hxx @@ -5,5 +5,3 @@ ------------------------------------------- */ #pragma once - -#include <System.Core/Headers/Window.hxx> diff --git a/Public/Developer/System.Core/Headers/Menu.hxx b/Public/Developer/System.Core/Headers/Menu.hxx deleted file mode 100644 index 0fc4e738..00000000 --- a/Public/Developer/System.Core/Headers/Menu.hxx +++ /dev/null @@ -1,9 +0,0 @@ -/* ------------------------------------------- - - Copyright Mahrouss Logic - -------------------------------------------- */ - -#pragma once - -#include <System.Core/Headers/Window.hxx> diff --git a/Public/Developer/System.Core/Headers/Rsrc.hxx b/Public/Developer/System.Core/Headers/Rsrc.hxx deleted file mode 100644 index 0fc4e738..00000000 --- a/Public/Developer/System.Core/Headers/Rsrc.hxx +++ /dev/null @@ -1,9 +0,0 @@ -/* ------------------------------------------- - - Copyright Mahrouss Logic - -------------------------------------------- */ - -#pragma once - -#include <System.Core/Headers/Window.hxx> diff --git a/Public/Developer/System.Core/Headers/Thread.hxx b/Public/Developer/System.Core/Headers/Thread.hxx index a441041d..6118ea21 100644 --- a/Public/Developer/System.Core/Headers/Thread.hxx +++ b/Public/Developer/System.Core/Headers/Thread.hxx @@ -28,11 +28,11 @@ typedef VoidType(*ThreadEntrypointKind)(VoidType); /// @param threadName the thread's name. /// @param threadStart where to start. /// @return -CA_EXTERN_C ThreadRef CreateThread(const CharacterTypeUTF8* threadName, ThreadEntrypointKind threadStart); +CA_EXTERN_C ThreadRef TmCreateThread(const CharacterTypeUTF8* threadName, ThreadEntrypointKind threadStart); /// @brief Dispoes the thread, and exits with code kThreadErrorExit /// @param ref /// @return -CA_EXTERN_C VoidType DisposeThread(ThreadRef ref); +CA_EXTERN_C VoidType TmDisposeThread(ThreadRef ref); #endif // __THREAD_API__ diff --git a/Public/Developer/System.Core/Headers/TrueType.hxx b/Public/Developer/System.Core/Headers/TrueType.hxx index 001d986e..185bbc78 100644 --- a/Public/Developer/System.Core/Headers/TrueType.hxx +++ b/Public/Developer/System.Core/Headers/TrueType.hxx @@ -23,9 +23,9 @@ typedef QWordType TTFFontRef; /// @brief Loads a new font into app's memory. /// @param name /// @return -CA_EXTERN_C TTFFontRef CreateFont(const char* name); +CA_EXTERN_C TTFFontRef FnCreateFont(const char* name); /// @brief Dispose an allocated font. /// @param fon /// @return -CA_EXTERN_C VoidType DisposeFont(TTFFontRef fon);
\ No newline at end of file +CA_EXTERN_C VoidType FnDisposeFont(TTFFontRef fon);
\ No newline at end of file diff --git a/Public/Developer/System.Core/Headers/Window.hxx b/Public/Developer/System.Core/Headers/Window.hxx index b7671661..39d5eb47 100644 --- a/Public/Developer/System.Core/Headers/Window.hxx +++ b/Public/Developer/System.Core/Headers/Window.hxx @@ -83,62 +83,62 @@ typedef QWordType ControlRef; /// @brief Creates a new control /// @param id the control rsrc fork. /// @return -CA_EXTERN_C ControlRef CreateControl(const DWordType id); +CA_EXTERN_C ControlRef WmCreateControl(const DWordType id); /// @brief Releases the control /// @param id the control ref. /// @return -CA_EXTERN_C VoidType ReleaseControl(const ControlRef id); +CA_EXTERN_C VoidType WmReleaseControl(const ControlRef id); /// @brief Moves a control inside a GraphicsPort. /// @param id the control ref. /// @param where where to move at. /// @return -CA_EXTERN_C Int32Type SetControlPosition(const ControlRef id, GraphicsPoint where); +CA_EXTERN_C Int32Type WmSetControlPosition(const ControlRef id, GraphicsPoint where); /// @brief Enable control. /// @param id /// @param enabled /// @return -CA_EXTERN_C Int32Type SetControlEnabled(const ControlRef id, BooleanType enabled); +CA_EXTERN_C Int32Type WmSetControlEnabled(const ControlRef id, BooleanType enabled); /// @brief Make control visible. /// @param id /// @param visible /// @return -CA_EXTERN_C Int32Type MakeControlVisible(const ControlRef id, BooleanType visible); +CA_EXTERN_C Int32Type WmMakeControlVisible(const ControlRef id, BooleanType visible); /// @brief Creates a new window. /// @param name the window name /// @param rsrcId the window fork rsrc id. /// @return the window graphics port. -CA_EXTERN_C GraphicsPort* CreateWindow(const char* name, const DWordType rsrcId); +CA_EXTERN_C GraphicsPort* WmCreateWindow(const char* name, const DWordType rsrcId); /// @brief Creates a new menu /// @param name the menu's name /// @param rsrcId the menu fork rsrc id. /// @return the menu graphics port. -CA_EXTERN_C GraphicsPort* CreateMenu(const char* name, const DWordType rsrcId); +CA_EXTERN_C GraphicsPort* WmCreateMenu(const char* name, const DWordType rsrcId); /// @brief Releases the window. /// @param port the window port. /// @return void -CA_EXTERN_C VoidType ReleaseWindow(GraphicsPort* port); +CA_EXTERN_C VoidType WmReleaseWindow(GraphicsPort* port); /// @brief Releases the menu /// @param port the menu port. /// @return void -CA_EXTERN_C VoidType ReleaseMenu(GraphicsPort* port); +CA_EXTERN_C VoidType WmReleaseMenu(GraphicsPort* port); /// @brief Moves a window on the desktop. (menu arent movable, will return kErrIncompatible is menu is provided.) /// @param id the gfx port. /// @param where to move. /// @return error code. -CA_EXTERN_C Int32Type MoveWindow(const GraphicsPort* id, GraphicsPoint where); +CA_EXTERN_C Int32Type WmMoveWindow(const GraphicsPort* id, GraphicsPoint where); enum { - kWinErrIncompatible = 0x74, - kWinErrOutOfMemory, - kWinErrInvalidArg, - kWinErrNotImplemented, + kWmErrIncompatible = 0x74, + kWmErrOutOfMemory, + kWmErrInvalidArg, + kWmErrNotImplemented, }; |
