diff options
| author | Amlal <amlalelmahrouss@icloud.com> | 2024-06-13 06:32:06 +0000 |
|---|---|---|
| committer | Amlal <amlalelmahrouss@icloud.com> | 2024-06-13 06:32:06 +0000 |
| commit | 36ff25861676cd1f5fb94b901fa59b015c614bc5 (patch) | |
| tree | 92d68c0e4ba1eeb0d608a917bfdc587909260e13 /Usr/Sys/CoreSystem/Sources/App.c | |
| parent | 4e75e05a20ddd0dbca982e8f3bc2ea8043ed3a3f (diff) | |
| parent | a0b3442fe9978093326dc29d0938f1116eadd147 (diff) | |
Merged in MHR-23 (pull request #15)
MHR-23
Diffstat (limited to 'Usr/Sys/CoreSystem/Sources/App.c')
| -rw-r--r-- | Usr/Sys/CoreSystem/Sources/App.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Usr/Sys/CoreSystem/Sources/App.c b/Usr/Sys/CoreSystem/Sources/App.c new file mode 100644 index 00000000..3334dad4 --- /dev/null +++ b/Usr/Sys/CoreSystem/Sources/App.c @@ -0,0 +1,31 @@ +/* ------------------------------------------- + + Copyright Zeta Electronics Corporation + +------------------------------------------- */ + +#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); +} |
