summaryrefslogtreecommitdiffhomepage
path: root/Public/Developer/SystemLib/Headers
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-04-03 09:20:28 +0200
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-04-03 09:20:28 +0200
commit3facc32b746a44b0e3a91cbe1897127194396d1b (patch)
tree0725ebbf35a18e6933596ea5c765ac81adf7834f /Public/Developer/SystemLib/Headers
parentefc6b5d169d2b6eaabe7384141cec6054ae622a0 (diff)
MHR-3: See main changes below.
Kernel: Improve Disk interfaces regarding the struct they're using (all of them are using MountpountInterface now) SystemLib: Start adding PowerPC code to the SystemLib to be cross compiled as a PEF FAT binary. Kernel: Adding new builtins to support a wide range of hardware. Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'Public/Developer/SystemLib/Headers')
-rw-r--r--Public/Developer/SystemLib/Headers/Defines.h23
-rw-r--r--Public/Developer/SystemLib/Headers/File.h4
2 files changed, 21 insertions, 6 deletions
diff --git a/Public/Developer/SystemLib/Headers/Defines.h b/Public/Developer/SystemLib/Headers/Defines.h
index 6ab27497..d3b6b793 100644
--- a/Public/Developer/SystemLib/Headers/Defines.h
+++ b/Public/Developer/SystemLib/Headers/Defines.h
@@ -11,7 +11,7 @@
#endif
#ifdef _DEBUG
-#define CA_MUST_PASS(e) { if (!e) { DlgMsgBox("Sorry, an assertion 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__) RtAssertTriggerInterrupt() } }
#else
#define CA_MUST_PASS(e) CA_UNREFERENCED_PARAMETER(e)
#endif
@@ -29,7 +29,7 @@
struct Application;
struct GUID;
-CA_EXTERN_C void __assert_chk_fail(void);
+CA_EXTERN_C void RtAssertTriggerInterrupt(void);
#define CA_STDCALL __attribute__((stdcall))
#define CA_CDECL __attribute__((cdecl))
@@ -115,6 +115,10 @@ enum RtProcessCall {
/// @brief Open a specific handle (can be used as sel to call methods related to it.)
kCallOpenFile,
kCallCloseFile,
+ kCallOpenDir,
+ kCallCloseDir,
+ kCallOpenDevice,
+ kCallCloseDevice,
kCallCreateWindow,
kCallCloseWindow,
kCallCreateMenu,
@@ -180,9 +184,20 @@ using StrType = CharacterTypeUTF8[N];
#endif // ifdef C++
-CA_EXTERN_C ApplicationRef RtGetAppObject(VoidType);
+/// @brief Get app singleton.
+/// @param
+/// @return
+CA_EXTERN_C ApplicationRef RtGetApp(VoidType);
+
+/// @brief Get argument count
+/// @param
+/// @return
CA_EXTERN_C SizeType RtGetAppArgumentsCount(VoidType);
-CA_EXTERN_C CharacterTypeUTF8* RtGetAppArgumentsPtr(VoidType);
+
+/// @brief Get argument pointer.
+/// @param
+/// @return
+CA_EXTERN_C CharacterTypeUTF8** RtGetAppArgumentsPtr(VoidType);
CA_EXTERN_C ApplicationRef kSharedApplication;
diff --git a/Public/Developer/SystemLib/Headers/File.h b/Public/Developer/SystemLib/Headers/File.h
index 6333bf6a..5e58d104 100644
--- a/Public/Developer/SystemLib/Headers/File.h
+++ b/Public/Developer/SystemLib/Headers/File.h
@@ -23,8 +23,6 @@ CA_EXTERN_C FSRef FsOpenFile(const CharacterTypeUTF8* path, const CharacterTypeU
/// @return
CA_EXTERN_C VoidType FsCloseFile(FSRef refFs);
-typedef QWordType FSForkRef;
-
/// @brief A fork information header.
typedef struct _Fork {
PtrVoidType forkData;
@@ -34,6 +32,8 @@ typedef struct _Fork {
CharacterTypeUTF8 forkName[256];
} ForkType;
+typedef ForkType* FSForkRef;
+
/// @brief Gets the fork inside a file.
/// @param refFs the filesystem ref
/// @param forkName the fork's name