21 OF_ASSUME_NONNULL_BEGIN
23 @class OFArray OF_GENERIC(ObjectType);
30 #define OF_APPLICATION_DELEGATE(cls) \ 32 main(int argc, char *argv[]) \ 34 return of_application_main(&argc, &argv, [cls class]); \ 38 # define OF_HAVE_SANDBOX 51 - (void)applicationDidFinishLaunching;
57 - (void)applicationWillTerminate;
67 - (void)applicationDidReceiveSIGINT;
80 - (void)applicationDidReceiveSIGHUP;
94 - (void)applicationDidReceiveSIGUSR1;
108 - (void)applicationDidReceiveSIGUSR2;
131 id <OFApplicationDelegate> _Nullable _delegate;
132 void (*_Nullable _SIGINTHandler)(id, SEL);
134 void (*_Nullable _SIGHUPHandler)(id, SEL);
135 void (*_Nullable _SIGUSR1Handler)(id, SEL);
136 void (*_Nullable _SIGUSR2Handler)(id, SEL);
153 @property (readonly, nonatomic)
194 + (void)terminateWithStatus: (
int)status OF_NO_RETURN;
196 #ifdef OF_HAVE_SANDBOX 204 + (void)activateSandbox: (
OFSandbox *)sandbox;
207 -
init OF_UNAVAILABLE;
215 - (void)getArgumentCount: (
int *_Nonnull *_Nonnull)argc
216 andArgumentValues: (
char *_Nonnull *_Nonnull *_Nonnull[_Nonnull])argv;
242 - (void)terminateWithStatus: (
int)status OF_NO_RETURN;
244 #ifdef OF_HAVE_SANDBOX 252 - (void)activateSandbox: (
OFSandbox *)sandbox;
259 extern int of_application_main(
int *_Nonnull,
260 char *_Nonnull *_Nonnull[_Nonnull], Class);
265 OF_ASSUME_NONNULL_END
nullable id< OFApplicationDelegate > delegate()
Returns the delegate of the application.
Definition: OFApplication.m:499
OFDictionary * environment
Definition: OFApplication.h:154
nullable OFDictionary * environment()
Returns the environment of the application.
A class which describes a sandbox for the application.
Definition: OFSandbox.h:28
A protocol for delegates of OFApplication.
A class for handling strings.
Definition: OFString.h:114
void terminate()
Terminates the application with the EXIT_SUCCESS status.
Definition: OFApplication.m:183
nullable OFApplication * sharedApplication()
Returns the only OFApplication instance in the application.
Definition: OFApplication.m:163
id init()
Initializes an already allocated object.
Definition: OFObject.m:488
nullable OFArray * arguments()
Returns the arguments passed to the application.
An abstract class for storing and changing objects in a dictionary.
Definition: OFMutableDictionary.h:39
OFArray * arguments
Definition: OFApplication.h:148
An abstract class for storing objects in a dictionary.
Definition: OFDictionary.h:54
The root class for all other classes inside ObjFW.
Definition: OFObject.h:379
An abstract class for storing objects in an array.
Definition: OFArray.h:89
nullable OFString * programName()
Returns the name of the program (argv[0]).
A class which represents the application as an object.
Definition: OFApplication.h:123
An abstract class for storing, adding and removing objects in an array.
Definition: OFMutableArray.h:40