summaryrefslogtreecommitdiffhomepage
path: root/Public/Developer/SystemLib/Sources/App.c
blob: c85b2dd83c1a6934c9e812d9d1276864ff5d0405 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* -------------------------------------------

    Copyright Mahrouss Logic

------------------------------------------- */

#include <Headers/Defines.h>

/// @brief Main Application object, retrieved from the RtGetAppPointer symbol.
ApplicationRef 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);
}