summaryrefslogtreecommitdiffhomepage
path: root/SDK/Libraries/CoreSystem/Sources/App.c
diff options
context:
space:
mode:
Diffstat (limited to 'SDK/Libraries/CoreSystem/Sources/App.c')
-rw-r--r--SDK/Libraries/CoreSystem/Sources/App.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/SDK/Libraries/CoreSystem/Sources/App.c b/SDK/Libraries/CoreSystem/Sources/App.c
new file mode 100644
index 00000000..42ea19c6
--- /dev/null
+++ b/SDK/Libraries/CoreSystem/Sources/App.c
@@ -0,0 +1,31 @@
+/* -------------------------------------------
+
+ Copyright SoftwareLabs
+
+------------------------------------------- */
+
+#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.
+CS_EXTERN_C SizeType RtGetAppArgumentsCount(VoidType)
+{
+ CS_MUST_PASS(kSharedApplication);
+
+ return kSharedApplication->Invoke(kSharedApplication, kCallGetArgsCount);
+}
+
+/// @brief Gets the app arguments pointer.
+/// @param void no arguments.
+/// @return
+CS_EXTERN_C CharacterTypeUTF8** RtGetAppArgumentsPtr(VoidType)
+{
+ CS_MUST_PASS(kSharedApplication);
+
+ return (CharacterTypeUTF8**)kSharedApplication->Invoke(kSharedApplication,
+ kCallGetArgsPtr);
+}