summaryrefslogtreecommitdiffhomepage
path: root/SDK/Developer/CoreSystem/Sources/App.c
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-08 12:32:41 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-08 12:32:41 +0200
commit09dd11ddf800898c00ecb04a65fb5cd10fb481fa (patch)
treeeda0b4e23d6a71da7de3a78f0bb76ec3201dd2f9 /SDK/Developer/CoreSystem/Sources/App.c
parentca83108fd138cc0398f900e6a6c0a53ad51aee31 (diff)
MHR-23: :boom: changes, reworked project tree.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'SDK/Developer/CoreSystem/Sources/App.c')
-rw-r--r--SDK/Developer/CoreSystem/Sources/App.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/SDK/Developer/CoreSystem/Sources/App.c b/SDK/Developer/CoreSystem/Sources/App.c
new file mode 100644
index 00000000..7778c064
--- /dev/null
+++ b/SDK/Developer/CoreSystem/Sources/App.c
@@ -0,0 +1,31 @@
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
+
+#include <Headers/Defines.h>
+
+/// @brief Main Application object, retrieved from the RtGetAppPointer symbol.
+ApplicationInterfaceRef kSharedApplication = NullPtr;
+
+/// @brief Gets the app arguments count.
+/// @param void no arguments.
+/// @return The number of arguments given to the application.
+CA_EXTERN_C SizeType RtGetAppArgumentsCount(VoidType)
+{
+ CA_MUST_PASS(kSharedApplication);
+
+ return kSharedApplication->Invoke(kSharedApplication, kCallGetArgsCount);
+}
+
+/// @brief Gets the app arguments pointer.
+/// @param void no arguments.
+/// @return
+CA_EXTERN_C CharacterTypeUTF8** RtGetAppArgumentsPtr(VoidType)
+{
+ CA_MUST_PASS(kSharedApplication);
+
+ return (CharacterTypeUTF8**)kSharedApplication->Invoke(kSharedApplication,
+ kCallGetArgsPtr);
+}