@@ -19,20 +19,20 @@ #import "OFObject.h" OF_ASSUME_NONNULL_BEGIN -/*! @file */ +/** @file */ @class OFArray OF_GENERIC(ObjectType); @class OFDictionary OF_GENERIC(KeyType, ObjectType); @class OFMutableArray OF_GENERIC(ObjectType); @class OFMutableDictionary OF_GENERIC(KeyType, ObjectType); @class OFSandbox; @class OFString; -/*! +/** * @brief Specify the class to be used as the application delegate. * * An instance of this class will be created and act as the application * delegate. * @@ -64,31 +64,31 @@ #ifdef OF_HAVE_PLEDGE # define OF_HAVE_SANDBOX #endif -/*! +/** * @protocol OFApplicationDelegate OFApplication.h ObjFW/OFApplication.h * * @brief A protocol for delegates of OFApplication. * * @note Signals are not available on AmigaOS! */ @protocol OFApplicationDelegate -/*! +/** * @brief A method which is called when the application was initialized and is * running now. */ - (void)applicationDidFinishLaunching; @optional -/*! +/** * @brief A method which is called when the application will terminate. */ - (void)applicationWillTerminate; -/*! +/** * @brief A method which is called when the application received a SIGINT. * * @warning You are not allowed to send any messages inside this method, as * message dispatching is not signal-safe! You are only allowed to do * signal-safe operations like setting a variable or calling a @@ -95,11 +95,11 @@ * signal-safe function! */ - (void)applicationDidReceiveSIGINT; #ifdef SIGHUP -/*! +/** * @brief A method which is called when the application received a SIGHUP. * * This signal is not available on Windows. * * @warning You are not allowed to send any messages inside this method, as @@ -109,11 +109,11 @@ */ - (void)applicationDidReceiveSIGHUP; #endif #ifdef SIGUSR1 -/*! +/** * @brief A method which is called when the application received a SIGUSR1. * * This signal is not available on Windows. * * @warning You are not allowed to send any messages inside this method, as @@ -123,11 +123,11 @@ */ - (void)applicationDidReceiveSIGUSR1; #endif #ifdef SIGUSR2 -/*! +/** * @brief A method which is called when the application received a SIGUSR2. * * This signal is not available on Windows. * * @warning You are not allowed to send any messages inside this method, as @@ -137,11 +137,11 @@ */ - (void)applicationDidReceiveSIGUSR2; #endif @end -/*! +/** * @class OFApplication OFApplication.h ObjFW/OFApplication.h * * @brief A class which represents the application as an object. * * In order to create a new OFApplication, you should create a class conforming @@ -177,87 +177,87 @@ OFArray OF_GENERIC(OFString *) *arguments; @property (class, readonly, nullable, nonatomic) OFDictionary OF_GENERIC(OFString *, OFString *) *environment; #endif -/*! +/** * @brief The name of the program (argv[0]). */ @property (readonly, nonatomic) OFString *programName; -/*! +/** * @brief The arguments passed to the application. */ @property (readonly, nonatomic) OFArray OF_GENERIC(OFString *) *arguments; -/*! +/** * @brief The environment of the application. */ @property (readonly, nonatomic) OFDictionary OF_GENERIC(OFString *, OFString *) *environment; -/*! +/** * @brief The delegate of the application. */ @property OF_NULLABLE_PROPERTY (assign, nonatomic) id delegate; #ifdef OF_HAVE_SANDBOX -/*! +/** * @brief The sandbox currently active for this application. */ @property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFSandbox *activeSandbox; -/*! +/** * @brief The sandbox currently active for child processes of this application. */ @property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFSandbox *activeSandboxForChildProcesses; #endif -/*! +/** * @brief Returns the only OFApplication instance in the application. * * @return The only OFApplication instance in the application */ + (nullable OFApplication *)sharedApplication; -/*! +/** * @brief Returns the name of the program (argv[0]). * * @return The name of the program (argv[0]) */ + (nullable OFString *)programName; -/*! +/** * @brief Returns the arguments passed to the application. * * @return The arguments passed to the application */ + (nullable OFArray OF_GENERIC(OFString *) *)arguments; -/*! +/** * @brief Returns the environment of the application. * * @return The environment of the application */ + (nullable OFDictionary OF_GENERIC(OFString *, OFString *) *)environment; -/*! +/** * @brief Terminates the application with the EXIT_SUCCESS status. */ + (void)terminate OF_NO_RETURN; -/*! +/** * @brief Terminates the application with the specified status. * * @param status The status with which the application will terminate */ + (void)terminateWithStatus: (int)status OF_NO_RETURN; #ifdef OF_HAVE_SANDBOX -/*! +/** * @brief Activates the specified sandbox for the application. * * This is only available if `OF_HAVE_SANDBOX` is defined. * * @warning If you allow `exec()`, but do not call @@ -269,11 +269,11 @@ * * @param sandbox The sandbox to activate */ + (void)activateSandbox: (OFSandbox *)sandbox; -/*! +/** * @brief Activates the specified sandbox for child processes of the * application. * * This is only available if `OF_HAVE_SANDBOX` is defined. * @@ -288,33 +288,33 @@ + (void)activateSandboxForChildProcesses: (OFSandbox *)sandbox; #endif - (instancetype)init OF_UNAVAILABLE; -/*! +/** * @brief Gets argc and argv. * * @param argc A pointer where a pointer to argc should be stored * @param argv A pointer where a pointer to argv should be stored */ - (void)getArgumentCount: (int *_Nonnull *_Nonnull)argc andArgumentValues: (char *_Nullable *_Nonnull *_Nonnull[_Nonnull])argv; -/*! +/** * @brief Terminates the application. */ - (void)terminate OF_NO_RETURN; -/*! +/** * @brief Terminates the application with the specified status. * * @param status The status with which the application will terminate */ - (void)terminateWithStatus: (int)status OF_NO_RETURN; #ifdef OF_HAVE_SANDBOX -/*! +/** * @brief Activates the specified sandbox for the application. * * This is only available if `OF_HAVE_SANDBOX` is defined. * * @warning If you allow `exec()`, but do not call @@ -326,11 +326,11 @@ * * @param sandbox The sandbox to activate */ - (void)activateSandbox: (OFSandbox *)sandbox; -/*! +/** * @brief Activates the specified sandbox for child processes of the * application. * * This is only available if `OF_HAVE_SANDBOX` is defined. *