summaryrefslogtreecommitdiffhomepage
path: root/Public/Developer
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-27 08:35:15 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-27 08:35:15 +0100
commit6a18e607ffc4e83f2bd953c9de5c14f18e077df8 (patch)
treec4fe27391a237361b2cfc3c59a88f28240e20461 /Public/Developer
parent3ba0a4aea3d57c67f316b183ca1efb2f6a3e5ee8 (diff)
Kernel: Update System API, add prefix to functions.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Public/Developer')
-rw-r--r--Public/Developer/System.Containers/Headers/XIFF.hxx3
-rw-r--r--Public/Developer/System.Core/Headers/Defines.hxx6
-rw-r--r--Public/Developer/System.Core/Headers/Dialog.hxx2
-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.hxx9
-rw-r--r--Public/Developer/System.Core/Headers/Rsrc.hxx9
-rw-r--r--Public/Developer/System.Core/Headers/Thread.hxx4
-rw-r--r--Public/Developer/System.Core/Headers/TrueType.hxx4
-rw-r--r--Public/Developer/System.Core/Headers/Window.hxx28
9 files changed, 22 insertions, 45 deletions
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,
};