diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-04-02 21:35:34 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-04-02 21:35:34 +0200 |
| commit | efc6b5d169d2b6eaabe7384141cec6054ae622a0 (patch) | |
| tree | 056fb3f24bcf0be7fb372106676349a1f5b644b8 | |
| parent | 96d7e324ae1657216e6bb49a82466977d43d9a89 (diff) | |
OS: Changes related to System API, breaking changes, also added HTMLLib.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
| -rw-r--r-- | Private/Builtins/Toolbox/Toolbox.hxx | 77 | ||||
| -rw-r--r-- | Private/Builtins/Toolbox/Utils.hxx | 70 | ||||
| -rw-r--r-- | Private/KernelRsrc.rc | 25 | ||||
| -rw-r--r-- | Private/NewKit/Application.hxx | 2 | ||||
| -rw-r--r-- | Private/Root/Boot/kernel-logo.ico | bin | 0 -> 150570 bytes | |||
| -rw-r--r-- | Private/Root/Boot/kernel-logo.svg | 10 | ||||
| -rw-r--r-- | Private/makefile | 1 | ||||
| -rw-r--r-- | Public/Developer/CxxLib/Sources/New+Delete.cxx | 6 | ||||
| -rw-r--r-- | Public/Developer/HTMLLib/.gitkeep | 0 | ||||
| -rw-r--r-- | Public/Developer/HTMLLib/Headers/.gitkeep | 0 | ||||
| -rw-r--r-- | Public/Developer/HTMLLib/Headers/HTML.h | 50 | ||||
| -rw-r--r-- | Public/Developer/HTMLLib/Sources/.gitkeep | 0 | ||||
| -rw-r--r-- | Public/Developer/SystemLib/Headers/Defines.h | 47 | ||||
| -rw-r--r-- | Public/Developer/SystemLib/Headers/Heap.h | 8 | ||||
| -rw-r--r-- | Public/Developer/SystemLib/Headers/Rsrc.h | 9 | ||||
| -rw-r--r-- | Public/Developer/SystemLib/Headers/Window.h | 34 | ||||
| -rw-r--r-- | Public/Developer/SystemLib/Sources/Heap.c | 8 |
17 files changed, 220 insertions, 127 deletions
diff --git a/Private/Builtins/Toolbox/Toolbox.hxx b/Private/Builtins/Toolbox/Toolbox.hxx index f831acb5..2ac23267 100644 --- a/Private/Builtins/Toolbox/Toolbox.hxx +++ b/Private/Builtins/Toolbox/Toolbox.hxx @@ -8,11 +8,72 @@ #include <NewKit/Defines.hpp> -EXTERN_C NewOS::Void _hal_init_mouse(); -EXTERN_C NewOS::Boolean _hal_draw_mouse(); -EXTERN_C NewOS::Void _hal_handle_mouse(); -EXTERN_C NewOS::Boolean _hal_left_button_pressed(); -EXTERN_C NewOS::Boolean _hal_middle_button_pressed(); -EXTERN_C NewOS::Boolean _hal_right_button_pressed(); - -#include <Builtins/Toolbox/Utils.hxx> +EXTERN_C NewOS::Void _hal_init_mouse(); +EXTERN_C NewOS::Boolean _hal_draw_mouse(); +EXTERN_C NewOS::Void _hal_handle_mouse(); +EXTERN_C NewOS::Boolean _hal_left_button_pressed(); +EXTERN_C NewOS::Boolean _hal_middle_button_pressed(); +EXTERN_C NewOS::Boolean _hal_right_button_pressed(); + +#define ToolboxInitRsrc() NewOS::SizeT uA = 0 + +#define kClearClr RGB(00, 00, 00) + +#define ToolboxClearRsrc() uA = 0 + +/// @brief Draws a resource. +#define ToolboxDrawRsrc(ImgPtr, _Height, _Width, BaseX, BaseY) \ + uA = 0; \ + \ + for (NewOS::SizeT i = BaseX; i < _Height + BaseX; ++i) { \ + for (NewOS::SizeT u = BaseY; u < _Width + BaseY; ++u) { \ + if (ImgPtr[uA] == 0) { \ + *(((volatile NewOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + 4 * \ + kHandoverHeader->f_GOP \ + .f_PixelPerLine * \ + i + \ + 4 * u))) |= ImgPtr[uA]; \ + } else { \ + *(((volatile NewOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + 4 * \ + kHandoverHeader->f_GOP \ + .f_PixelPerLine * \ + i + \ + 4 * u))) = ImgPtr[uA]; \ + } \ + \ + ++uA; \ + } \ + } + + +/// @brief Cleans a resource. +#define ToolboxClearZone(_Height, _Width, BaseX, BaseY) \ + \ + for (NewOS::SizeT i = BaseX; i < _Height + BaseX; ++i) { \ + for (NewOS::SizeT u = BaseY; u < _Width + BaseY; ++u) { \ + *(((volatile NewOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + 4 * \ + kHandoverHeader->f_GOP \ + .f_PixelPerLine * \ + i + \ + 4 * u))) = kClearClr; \ + } \ + } + + +/// @brief Draws inside a zone. +#define ToolboxDrawZone(_Clr, _Height, _Width, BaseX, BaseY) \ + \ + for (NewOS::SizeT i = BaseX; i < _Width + BaseX; ++i) { \ + for (NewOS::SizeT u = BaseY; u < _Height + BaseY; ++u) { \ + *(((volatile NewOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ + 4 * \ + kHandoverHeader->f_GOP \ + .f_PixelPerLine * \ + i + \ + 4 * u))) = _Clr; \ + } \ + } + diff --git a/Private/Builtins/Toolbox/Utils.hxx b/Private/Builtins/Toolbox/Utils.hxx deleted file mode 100644 index 29ca585a..00000000 --- a/Private/Builtins/Toolbox/Utils.hxx +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef __RSRC_UTIL__ -#define __RSRC_UTIL__ - -// Last Rev -// Sat Feb 24 CET 2024 - -#define ToolboxInitRsrc() NewOS::SizeT uA = 0 - -#define kClearClr RGB(00, 00, 00) - -#define ToolboxClearRsrc() uA = 0 - -/// @brief Draws a resource. -#define ToolboxDrawRsrc(ImgPtr, _Height, _Width, BaseX, BaseY) \ - uA = 0; \ - \ - for (NewOS::SizeT i = BaseX; i < _Height + BaseX; ++i) { \ - for (NewOS::SizeT u = BaseY; u < _Width + BaseY; ++u) { \ - if (ImgPtr[uA] == 0) { \ - *(((volatile NewOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ - 4 * \ - kHandoverHeader->f_GOP \ - .f_PixelPerLine * \ - i + \ - 4 * u))) |= ImgPtr[uA]; \ - } else { \ - *(((volatile NewOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ - 4 * \ - kHandoverHeader->f_GOP \ - .f_PixelPerLine * \ - i + \ - 4 * u))) = ImgPtr[uA]; \ - } \ - \ - ++uA; \ - } \ - } - - -/// @brief Cleans a resource. -#define ToolboxClearZone(_Height, _Width, BaseX, BaseY) \ - \ - for (NewOS::SizeT i = BaseX; i < _Height + BaseX; ++i) { \ - for (NewOS::SizeT u = BaseY; u < _Width + BaseY; ++u) { \ - *(((volatile NewOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ - 4 * \ - kHandoverHeader->f_GOP \ - .f_PixelPerLine * \ - i + \ - 4 * u))) = kClearClr; \ - } \ - } - - -/// @brief Draws inside a zone. -#define ToolboxDrawZone(_Clr, _Height, _Width, BaseX, BaseY) \ - \ - for (NewOS::SizeT i = BaseX; i < _Width + BaseX; ++i) { \ - for (NewOS::SizeT u = BaseY; u < _Height + BaseY; ++u) { \ - *(((volatile NewOS::UInt32*)(kHandoverHeader->f_GOP.f_The + \ - 4 * \ - kHandoverHeader->f_GOP \ - .f_PixelPerLine * \ - i + \ - 4 * u))) = _Clr; \ - } \ - } - - -#endif diff --git a/Private/KernelRsrc.rc b/Private/KernelRsrc.rc new file mode 100644 index 00000000..3f5fffd3 --- /dev/null +++ b/Private/KernelRsrc.rc @@ -0,0 +1,25 @@ +1 ICON "Root/Boot/kernel-logo.ico" + +1 VERSIONINFO +FILEVERSION 1,0,0,0 +PRODUCTVERSION 1,0,0,0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "080904E4" + BEGIN + VALUE "CompanyName", "Mahrouss Logic" + VALUE "FileDescription", "NewOS Microkernel for AMD64" + VALUE "FileVersion", "1.0" + VALUE "InternalName", "NewKernel" + VALUE "LegalCopyright", "Mahrouss Logic" + VALUE "OriginalFilename", "NewKernel.exe" + VALUE "ProductName", "NewKernel" + VALUE "ProductVersion", "1.0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x809, 1252 + END +END
\ No newline at end of file diff --git a/Private/NewKit/Application.hxx b/Private/NewKit/Application.hxx index 8075e8ac..f19dbd97 100644 --- a/Private/NewKit/Application.hxx +++ b/Private/NewKit/Application.hxx @@ -27,4 +27,4 @@ typedef struct Application final { NewOS::Void(*Query)(struct Application* Self, NewOS::VoidPtr* Dst, NewOS::SizeT SzDst, NewOS::XRN::GUIDSequence GuidOf); } Application, *ApplicationRef; -#define object_cast reinterpret_cast<ApplicationRef> +#define app_cast reinterpret_cast<ApplicationRef> diff --git a/Private/Root/Boot/kernel-logo.ico b/Private/Root/Boot/kernel-logo.ico Binary files differnew file mode 100644 index 00000000..945049b9 --- /dev/null +++ b/Private/Root/Boot/kernel-logo.ico diff --git a/Private/Root/Boot/kernel-logo.svg b/Private/Root/Boot/kernel-logo.svg new file mode 100644 index 00000000..751ec02c --- /dev/null +++ b/Private/Root/Boot/kernel-logo.svg @@ -0,0 +1,10 @@ +<svg width="61" height="61" viewBox="0 0 61 61" fill="none" xmlns="http://www.w3.org/2000/svg"> +<rect x="0.5" y="0.5" width="60" height="60" rx="9.5" fill="#302929" fill-opacity="0.7" stroke="#323232"/> +<circle cx="31" cy="30" r="14.5" fill="url(#paint0_radial_0_1)" stroke="#323232"/> +<defs> +<radialGradient id="paint0_radial_0_1" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(31 30) rotate(90) scale(15)"> +<stop stop-color="#820F0F"/> +<stop offset="1" stop-color="#FF0000" stop-opacity="0.52"/> +</radialGradient> +</defs> +</svg> diff --git a/Private/makefile b/Private/makefile index af311d44..0a47157a 100644 --- a/Private/makefile +++ b/Private/makefile @@ -43,6 +43,7 @@ MOVEALL=./MoveAll.sh .PHONY: h-core-amd64-epm h-core-amd64-epm: clean + windres KernelRsrc.rc -O coff -o KernelRsrc.obj $(CC) $(CCFLAGS) $(DISKDRIVER) $(DEBUG) $(wildcard Source/*.cxx HALKit/AMD64/Storage/*.cxx) $(wildcard HALKit/AMD64/PCI/*.cxx) $(wildcard Source/Network/*.cxx) $(wildcard Source/Storage/*.cxx) $(wildcard HALKit/AMD64/*.cxx) $(wildcard HALKit/AMD64/*.cpp) $(wildcard HALKit/AMD64/*.s) $(ASM) $(ASMFLAGS) HALKit/AMD64/HalInterruptAPI.asm $(ASM) $(ASMFLAGS) HALKit/AMD64/HalSMPCoreManager.asm diff --git a/Public/Developer/CxxLib/Sources/New+Delete.cxx b/Public/Developer/CxxLib/Sources/New+Delete.cxx index c95da3e1..e065e1ed 100644 --- a/Public/Developer/CxxLib/Sources/New+Delete.cxx +++ b/Public/Developer/CxxLib/Sources/New+Delete.cxx @@ -11,17 +11,17 @@ typedef SizeType size_t; void* operator new[](size_t sz) { if (sz == 0) ++sz; - return RtAllocateProcessPtr(sz, kStandardAllocation); + return RtTlsAllocate(sz, kStandardAllocation); } void* operator new(size_t sz) { if (sz == 0) ++sz; - return RtAllocateProcessPtr(sz, kArrayAllocation); + return RtTlsAllocate(sz, kArrayAllocation); } void operator delete[](void* ptr) { if (ptr == nullptr) return; - RtFreeProcessPtr(ptr); + RtTlsFree(ptr); }
\ No newline at end of file diff --git a/Public/Developer/HTMLLib/.gitkeep b/Public/Developer/HTMLLib/.gitkeep new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/Public/Developer/HTMLLib/.gitkeep diff --git a/Public/Developer/HTMLLib/Headers/.gitkeep b/Public/Developer/HTMLLib/Headers/.gitkeep new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/Public/Developer/HTMLLib/Headers/.gitkeep diff --git a/Public/Developer/HTMLLib/Headers/HTML.h b/Public/Developer/HTMLLib/Headers/HTML.h new file mode 100644 index 00000000..6618f99f --- /dev/null +++ b/Public/Developer/HTMLLib/Headers/HTML.h @@ -0,0 +1,50 @@ +/* ------------------------------------------- + + Copyright Mahrouss Logic + +------------------------------------------- */ + +#pragma once + +#include <Headers/Defines.h> +#include <Headers/Window.h> + +struct _HtmlBody; +struct _HtmlDOMElement; + +CA_EXTERN_C VoidType HtmlLoadFile(const char* filePath, WindowPort* port, + BooleanType enforceJavascript, + BooleanType enforceHTTPS); + +CA_EXTERN_C VoidType HtmlLoadURL(const char* filePath, WindowPort* port, + BooleanType enforceJavascript, + BooleanType enforceHTTPS); + +CA_EXTERN_C VoidType HtmlLoadJavaScript(const char* code, WindowPort* port); + +CA_EXTERN_C VoidType HtmlLoadTypeScript(const char* code, WindowPort* port); + +typedef PtrVoidType HtmlPlugin; + +CA_EXTERN_C HtmlPlugin HtmlLoadPlugin(const char* pluginPath, WindowPort* port); + +CA_EXTERN_C VoidType HtmlUnloadPlugin(HtmlPlugin pluginHandle); + +typedef struct _HtmlBody { + CharacterTypeUTF8* Body; + SizeType BodyLength; +} HtmlBody, *HtmlBodyRef; + +/// @brief HTML Document, part of the DOM. +typedef struct _HtmlDOMElement { + StrType255 fNameElement; + struct _HtmlBody* fBodyElement; + + struct _HtmlDOMElement* fNextElement; + struct _HtmlDOMElement* fPrevElement; + struct _HtmlDOMElement* fChildElement; + struct _HtmlDOMElement* fParentElement; +} HtmlDOMElement, *HtmlDOMElementRef; + + +#define kHtmlRootElement "document" diff --git a/Public/Developer/HTMLLib/Sources/.gitkeep b/Public/Developer/HTMLLib/Sources/.gitkeep new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/Public/Developer/HTMLLib/Sources/.gitkeep diff --git a/Public/Developer/SystemLib/Headers/Defines.h b/Public/Developer/SystemLib/Headers/Defines.h index c4cc552b..6ab27497 100644 --- a/Public/Developer/SystemLib/Headers/Defines.h +++ b/Public/Developer/SystemLib/Headers/Defines.h @@ -26,6 +26,9 @@ #endif +struct Application; +struct GUID; + CA_EXTERN_C void __assert_chk_fail(void); #define CA_STDCALL __attribute__((stdcall)) @@ -57,26 +60,6 @@ typedef __INT32_TYPE__ Int32Type; typedef CharacterTypeUTF8 BooleanType; -#define CA_COPY_DELETE(KLASS) \ - KLASS &operator=(const KLASS &) = delete; \ - KLASS(const KLASS &) = delete; - - -#define CA_COPY_DEFAULT(KLASS) \ - KLASS &operator=(const KLASS &) = default; \ - KLASS(const KLASS &) = default; - - -#define CA_MOVE_DELETE(KLASS) \ - KLASS &operator=(KLASS &&) = delete; \ - KLASS(KLASS &&) = delete; - - -#define CA_MOVE_DEFAULT(KLASS) \ - KLASS &operator=(KLASS &&) = default; \ - KLASS(KLASS &&) = default; - - #define Yes 1 #define No 0 @@ -166,14 +149,34 @@ typedef struct Application { #ifdef __cplusplus -#define object_cast reinterpret_cast<ApplicationRef> +#define CA_COPY_DELETE(KLASS) \ + KLASS &operator=(const KLASS &) = delete; \ + KLASS(const KLASS &) = delete; + + +#define CA_COPY_DEFAULT(KLASS) \ + KLASS &operator=(const KLASS &) = default; \ + KLASS(const KLASS &) = default; + + +#define CA_MOVE_DELETE(KLASS) \ + KLASS &operator=(KLASS &&) = delete; \ + KLASS(KLASS &&) = delete; + + +#define CA_MOVE_DEFAULT(KLASS) \ + KLASS &operator=(KLASS &&) = default; \ + KLASS(KLASS &&) = default; + + +#define app_cast reinterpret_cast<ApplicationRef> template <SizeType N> using StrType = CharacterTypeUTF8[N]; #else -#define object_cast (ApplicationRef) +#define app_cast (ApplicationRef) #endif // ifdef C++ diff --git a/Public/Developer/SystemLib/Headers/Heap.h b/Public/Developer/SystemLib/Headers/Heap.h index 2dc13b0f..1c8873bd 100644 --- a/Public/Developer/SystemLib/Headers/Heap.h +++ b/Public/Developer/SystemLib/Headers/Heap.h @@ -19,20 +19,20 @@ enum RtAllocationKind { /// @param sz the size /// @param flags the allocation flags. /// @return -CA_EXTERN_C PtrVoidType RtAllocateProcessPtr(QWordType sz, +CA_EXTERN_C PtrVoidType RtTlsAllocate(QWordType sz, DWordType flags); /// @brief Check if the pointer exists. /// @param ptr the pointer to free. /// @return -CA_EXTERN_C BooleanType RtProcessPtrExists(PtrVoidType ptr); +CA_EXTERN_C BooleanType RtTlsPtrExists(PtrVoidType ptr); /// @brief Gets the size of the process' pointer. /// @param ptr the pointer to free. /// @return -CA_EXTERN_C QWordType RtProcessPtrSize(PtrVoidType ptr); +CA_EXTERN_C QWordType RtTlsGetSize(PtrVoidType ptr); /// @brief Frees the process pointer. /// @param ptr the pointer to free. /// @return -CA_EXTERN_C VoidType RtFreeProcessPtr(PtrVoidType ptr); +CA_EXTERN_C VoidType RtTlsFree(PtrVoidType ptr); diff --git a/Public/Developer/SystemLib/Headers/Rsrc.h b/Public/Developer/SystemLib/Headers/Rsrc.h new file mode 100644 index 00000000..1ff71332 --- /dev/null +++ b/Public/Developer/SystemLib/Headers/Rsrc.h @@ -0,0 +1,9 @@ +/* ------------------------------------------- + + Copyright Mahrouss Logic + +------------------------------------------- */ + +#pragma once + +#include <Headers/Defines.h> diff --git a/Public/Developer/SystemLib/Headers/Window.h b/Public/Developer/SystemLib/Headers/Window.h index 786197d5..1fd9e9e3 100644 --- a/Public/Developer/SystemLib/Headers/Window.h +++ b/Public/Developer/SystemLib/Headers/Window.h @@ -27,6 +27,10 @@ typedef float PositionType; typedef double PositionType; #endif +struct _ControlPort; +struct _WmPoint; +struct _WindowPort; + typedef QWordType DCRef; /// @brief A point, can represent the size, position of a window. @@ -48,8 +52,8 @@ typedef struct _WindowPort { WmPoint windowSize; BooleanType windowInvalidate; DWordType windowClearColor; - struct _WindowPort* menuPort; - struct _WindowPort* parentPort; + struct _WindowPort* windowMenuPort; ///! Attached menu to it. + struct _WindowPort* windowParentPort; } WindowPort; /// @brief Control port type. @@ -94,72 +98,72 @@ CA_EXTERN_C const ColorRef kRgbWhite; /// @brief Creates a new control /// @param id the control rsrc fork. /// @return -CA_EXTERN_C ControlPort* WmCreateControl(DWordType id); +CA_EXTERN_C ControlPort* WmCreateControl(DWordType id); /// @brief Releases the control /// @param id the control ref. /// @return -CA_EXTERN_C VoidType WmReleaseControl(ControlPort* id); +CA_EXTERN_C VoidType WmReleaseControl(ControlPort* id); /// @brief Moves a control inside a ControlPort. /// @param id the control ref. /// @param where where to move at. /// @return -CA_EXTERN_C Int32Type WmSetControlPosition(ControlPort* id, WmPoint where); +CA_EXTERN_C Int32Type WmSetControlPosition(ControlPort* id, WmPoint where); /// @brief Enable control. /// @param id /// @param enabled /// @return -CA_EXTERN_C Int32Type WmSetControlEnabled(ControlPort* id, BooleanType enabled); +CA_EXTERN_C Int32Type WmSetControlEnabled(ControlPort* id, BooleanType enabled); /// @brief Make control visible. /// @param id /// @param visible /// @return -CA_EXTERN_C Int32Type WmMakeControlVisible(ControlPort* id, BooleanType visible); +CA_EXTERN_C Int32Type WmMakeControlVisible(ControlPort* 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 WindowPort* WmCreateWindow(const CharacterTypeUTF8* name, const DWordType rsrcId); +CA_EXTERN_C WindowPort* WmCreateWindow(const CharacterTypeUTF8* 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 WindowPort* WmCreateMenu(const CharacterTypeUTF8* name, const DWordType rsrcId); +CA_EXTERN_C WindowPort* WmCreateMenu(const CharacterTypeUTF8* name, const DWordType rsrcId); /// @brief Releases the window. /// @param port the window port. /// @return void -CA_EXTERN_C VoidType WmReleaseWindow(WindowPort* port); +CA_EXTERN_C VoidType WmReleaseWindow(WindowPort* port); /// @brief Releases the menu /// @param port the menu port. /// @return void -CA_EXTERN_C VoidType WmReleaseMenu(WindowPort* port); +CA_EXTERN_C VoidType WmReleaseMenu(WindowPort* 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 WmMoveWindow(WindowPort* id, WmPoint where); +CA_EXTERN_C Int32Type WmMoveWindow(WindowPort* id, WmPoint where); /// @brief Get last message. /// @param id /// @return -CA_EXTERN_C Int64Type WmGetMessage(WindowPort* id); +CA_EXTERN_C Int64Type WmGetMessage(WindowPort* id); /// @brief Translate message internally. /// @return -CA_EXTERN_C VoidType WmTranslateMessage(WindowPort* port, Int64Type msg); +CA_EXTERN_C VoidType WmTranslateMessage(WindowPort* port, Int64Type msg); /// @brief Dispatch message to event queue. /// @param id /// @return -CA_EXTERN_C Int32Type WmDispatchMessage(WindowPort* id); +CA_EXTERN_C Int32Type WmDispatchMessage(WindowPort* id); enum { kWmErrIncompatible = 0x74, diff --git a/Public/Developer/SystemLib/Sources/Heap.c b/Public/Developer/SystemLib/Sources/Heap.c index c9b2b938..c866ef5d 100644 --- a/Public/Developer/SystemLib/Sources/Heap.c +++ b/Public/Developer/SystemLib/Sources/Heap.c @@ -10,7 +10,7 @@ /// @param sz size of object. /// @param flags flags. /// @return -CA_EXTERN_C PtrVoidType RtAllocateProcessPtr(QWordType sz, +CA_EXTERN_C PtrVoidType RtTlsAllocate(QWordType sz, DWordType flags) { CA_MUST_PASS(sz); CA_MUST_PASS(flags); @@ -20,7 +20,7 @@ CA_EXTERN_C PtrVoidType RtAllocateProcessPtr(QWordType sz, /// @brief Free pointer from the user's heap. /// @param ptr the pointer to free. -CA_EXTERN_C VoidType RtFreeProcessPtr(PtrVoidType ptr) { +CA_EXTERN_C VoidType RtTlsFree(PtrVoidType ptr) { CA_MUST_PASS(ptr); CA_UNREFERENCED_PARAMETER(kSharedApplication->Invoke(kSharedApplication, kCallFreePtr, ptr)); } @@ -28,7 +28,7 @@ CA_EXTERN_C VoidType RtFreeProcessPtr(PtrVoidType ptr) { /// @brief Get pointer size. /// @param ptr the pointer to find. /// @return the size. -CA_EXTERN_C QWordType RtProcessPtrSize(PtrVoidType ptr) { +CA_EXTERN_C QWordType RtTlsGetSize(PtrVoidType ptr) { CA_MUST_PASS(ptr); return kSharedApplication->Invoke(kSharedApplication, kCallSizePtr, ptr); } @@ -36,7 +36,7 @@ CA_EXTERN_C QWordType RtProcessPtrSize(PtrVoidType ptr) { /// @brief Check if the pointer exists. /// @param ptr the pointer to check. /// @return if it exists -CA_EXTERN_C BooleanType RtProcessPtrExists(PtrVoidType ptr) { +CA_EXTERN_C BooleanType RtTlsPtrExists(PtrVoidType ptr) { CA_MUST_PASS(ptr); return kSharedApplication->Invoke(kSharedApplication, kCallCheckPtr, ptr); } |
