20 OF_ASSUME_NONNULL_BEGIN
24 @class OFArray OF_GENERIC(ObjectType);
55 #define OF_APPLICATION_DELEGATE(class_) \
57 main(int argc, char *argv[]) \
59 return of_application_main(&argc, &argv, \
60 (class_ *)[[class_ alloc] init]); \
64 # define OF_HAVE_SANDBOX
149 OF_SUBCLASSING_RESTRICTED
158 void (*_Nullable _SIGINTHandler)(
id,
SEL);
160 void (*_Nullable _SIGHUPHandler)(
id,
SEL);
161 void (*_Nullable _SIGUSR1Handler)(
id,
SEL);
162 void (*_Nullable _SIGUSR2Handler)(
id,
SEL);
164 #ifdef OF_HAVE_SANDBOX
166 OFSandbox *_Nullable _activeSandboxForChildProcesses;
170 #ifdef OF_HAVE_CLASS_PROPERTIES
171 @property (
class, readonly, nullable, nonatomic)
173 @property (
class, readonly, nullable, nonatomic)
OFString *programName;
174 @property (
class, readonly, nullable, nonatomic)
176 @property (
class, readonly, nullable, nonatomic)
183 @property (readonly, nonatomic)
OFString *programName;
193 @property (readonly, nonatomic)
199 @property OF_NULLABLE_PROPERTY (assign, nonatomic)
202 #ifdef OF_HAVE_SANDBOX
211 @property OF_NULLABLE_PROPERTY (readonly, nonatomic)
246 + (void)terminate OF_NO_RETURN;
253 + (void)terminateWithStatus: (
int)status OF_NO_RETURN;
255 #ifdef OF_HAVE_SANDBOX
270 + (void)activateSandbox: (
OFSandbox *)sandbox;
286 + (void)activateSandboxForChildProcesses: (
OFSandbox *)sandbox;
289 - (instancetype)init OF_UNAVAILABLE;
297 - (void)getArgumentCount: (
int *_Nonnull *_Nonnull)argc
298 andArgumentValues: (
char *_Nullable *_Nonnull *_Nonnull[_Nonnull])argv;
303 - (void)terminate OF_NO_RETURN;
310 - (void)terminateWithStatus: (
int)status OF_NO_RETURN;
312 #ifdef OF_HAVE_SANDBOX
327 - (void)activateSandbox: (
OFSandbox *)sandbox;
343 - (void)activateSandboxForChildProcesses: (
OFSandbox *)sandbox;
350 extern int of_application_main(
int *_Nonnull,
356 OF_ASSUME_NONNULL_END
struct objc_object * id
A pointer to any object.
Definition: ObjFWRT.h:90
const struct objc_selector * SEL
A selector.
Definition: ObjFWRT.h:98
A class which represents the application as an object.
Definition: OFApplication.h:151
OFSandbox * activeSandbox
The sandbox currently active for this application.
Definition: OFApplication.h:206
OFDictionary * environment
The environment of the application.
Definition: OFApplication.h:194
OFArray * arguments
The arguments passed to the application.
Definition: OFApplication.h:188
An abstract class for storing objects in an array.
Definition: OFArray.h:92
An abstract class for storing objects in a dictionary.
Definition: OFDictionary.h:58
An abstract class for storing, adding and removing objects in an array.
Definition: OFMutableArray.h:44
An abstract class for storing and changing objects in a dictionary.
Definition: OFMutableDictionary.h:44
The root class for all other classes inside ObjFW.
Definition: OFObject.h:520
A class which describes a sandbox for the application.
Definition: OFSandbox.h:39
A class for handling strings.
Definition: OFString.h:132
A protocol for delegates of OFApplication.
Definition: OFApplication.h:74
void applicationWillTerminate()
A method which is called when the application will terminate.
void applicationDidFinishLaunching()
A method which is called when the application was initialized and is running now.
void applicationDidReceiveSIGINT()
A method which is called when the application received a SIGINT.
void applicationDidReceiveSIGUSR1()
A method which is called when the application received a SIGUSR1.
void applicationDidReceiveSIGUSR2()
A method which is called when the application received a SIGUSR2.
void applicationDidReceiveSIGHUP()
A method which is called when the application received a SIGHUP.