21 OF_ASSUME_NONNULL_BEGIN
25 @class OFArray OF_GENERIC(ObjectType);
67 #define OF_APPLICATION_DELEGATE(class_) \ 69 main(int argc, char *argv[]) \ 71 return OFApplicationMain(&argc, &argv, \ 72 (class_ *)[[class_ alloc] init]); \ 76 # define OF_HAVE_SANDBOX 94 - (void)applicationDidFinishLaunching: (
OFNotification *)notification;
113 - (void)applicationDidReceiveSIGINT;
126 - (void)applicationDidReceiveSIGHUP;
140 - (void)applicationDidReceiveSIGUSR1;
154 - (void)applicationDidReceiveSIGUSR2;
171 OF_SUBCLASSING_RESTRICTED
179 id <OFApplicationDelegate> _Nullable _delegate;
180 void (*_Nullable _SIGINTHandler)(id,
SEL);
182 void (*_Nullable _SIGHUPHandler)(id,
SEL);
183 void (*_Nullable _SIGUSR1Handler)(id,
SEL);
184 void (*_Nullable _SIGUSR2Handler)(id,
SEL);
186 #ifdef OF_HAVE_SANDBOX 187 OFSandbox *_Nullable _activeSandbox;
188 OFSandbox *_Nullable _activeSandboxForChildProcesses;
192 #ifdef OF_HAVE_CLASS_PROPERTIES 193 @property (
class, readonly, nullable, nonatomic)
195 @property (
class, readonly, nullable, nonatomic)
OFString *programName;
196 @property (
class, readonly, nullable, nonatomic)
198 @property (
class, readonly, nullable, nonatomic)
205 @property (readonly, nonatomic)
OFString *programName;
215 @property (readonly, nonatomic)
221 @property OF_NULLABLE_PROPERTY (assign, nonatomic)
224 #ifdef OF_HAVE_SANDBOX 225 @property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFSandbox *activeSandbox;
226 @property OF_NULLABLE_PROPERTY (readonly, nonatomic)
227 OFSandbox *activeSandboxForChildProcesses;
261 + (void)terminate OF_NO_RETURN;
268 + (void)terminateWithStatus: (
int)status OF_NO_RETURN;
270 #ifdef OF_HAVE_SANDBOX 271 + (void)of_activateSandbox: (OFSandbox *)sandbox;
272 + (void)of_activateSandboxForChildProcesses: (OFSandbox *)sandbox;
275 - (instancetype)init OF_UNAVAILABLE;
283 - (void)getArgumentCount: (
int *_Nonnull *_Nonnull)argc
284 andArgumentValues: (
char *_Nullable *_Nonnull *_Nonnull[_Nonnull])argv;
289 - (void)terminate OF_NO_RETURN;
296 - (void)terminateWithStatus: (
int)status OF_NO_RETURN;
298 #ifdef OF_HAVE_SANDBOX 299 - (void)of_activateSandbox: (OFSandbox *)sandbox;
300 - (void)of_activateSandboxForChildProcesses: (OFSandbox *)sandbox;
307 extern int OFApplicationMain(
int *_Nonnull,
char *_Nullable *_Nonnull[_Nonnull],
308 id <OFApplicationDelegate>);
313 OF_ASSUME_NONNULL_END
const struct objc_selector * SEL
A selector.
Definition: ObjFWRT.h:98
An abstract class for storing objects in an array.
Definition: OFArray.h:103
A class to represent a notification for or from OFNotificationCenter.
Definition: OFNotification.h:36
A class for storing constant strings using the @"" literal.
Definition: OFConstantString.h:37
The root class for all other classes inside ObjFW.
Definition: OFObject.h:686
An abstract class for storing, adding and removing objects in an array.
Definition: OFMutableArray.h:43
const OFNotificationName OFApplicationWillTerminateNotification
A notification that will be sent when the application will terminate.
Definition: OFApplication.m:92
const OFNotificationName OFApplicationDidFinishLaunchingNotification
A notification that will be sent when the application did finish launching.
Definition: OFApplication.m:90
A class for handling strings.
Definition: OFString.h:134
An abstract class for storing objects in a dictionary.
Definition: OFDictionary.h:78
OFDictionary * environment
The environment of the application.
Definition: OFApplication.h:216
An abstract class for storing and changing objects in a dictionary.
Definition: OFMutableDictionary.h:42
A protocol for delegates of OFApplication.
A class which represents the application as an object.
Definition: OFApplication.h:172
OFArray * arguments
The arguments passed to the application.
Definition: OFApplication.h:210