29 OF_ASSUME_NONNULL_BEGIN
33 @class OFArray OF_GENERIC(ObjectType);
76 # define OF_APPLICATION_DELEGATE(class_) \ 78 main(int argc, char *argv[]) \ 80 return OFApplicationMain(&argc, &argv, \ 81 (class_ *)[[class_ alloc] init]); \ 84 # define OF_APPLICATION_DELEGATE(class_) \ 86 main(int argc, char *argv[]) \ 88 return OFApplicationMain(&argc, &argv, \ 89 (class_ *)[[class_ alloc] init]); \ 93 WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, \ 94 LPSTR lpCmdLine, int nShowCmd) \ 96 extern void __getmainargs(int *, char ***, char ***, \ 98 extern int _CRT_glob; \ 99 int argc = 0, si = 0; \ 100 char **argv = NULL, **envp = NULL; \ 102 __getmainargs(&argc, &argv, &envp, _CRT_glob, &si); \ 104 return OFApplicationMain(&argc, &argv, \ 105 (class_ *)[[class_ alloc] init]); \ 109 #ifdef OF_HAVE_PLEDGE 110 # define OF_HAVE_SANDBOX 128 - (void)applicationDidFinishLaunching: (
OFNotification *)notification;
147 - (void)applicationDidReceiveSIGINT;
160 - (void)applicationDidReceiveSIGHUP;
174 - (void)applicationDidReceiveSIGUSR1;
188 - (void)applicationDidReceiveSIGUSR2;
205 OF_SUBCLASSING_RESTRICTED
213 id <OFApplicationDelegate> _Nullable _delegate;
214 void (*_Nullable _SIGINTHandler)(id,
SEL);
216 void (*_Nullable _SIGHUPHandler)(id,
SEL);
217 void (*_Nullable _SIGUSR1Handler)(id,
SEL);
218 void (*_Nullable _SIGUSR2Handler)(id,
SEL);
220 #ifdef OF_HAVE_SANDBOX 221 OFSandbox *_Nullable _activeSandbox;
222 OFSandbox *_Nullable _activeSandboxForChildProcesses;
226 #ifdef OF_HAVE_CLASS_PROPERTIES 227 @property (
class, readonly, nullable, nonatomic)
229 @property (
class, readonly, nullable, nonatomic)
OFString *programName;
230 @property (
class, readonly, nullable, nonatomic)
232 @property (
class, readonly, nullable, nonatomic)
239 @property (readonly, nonatomic)
OFString *programName;
249 @property (readonly, nonatomic)
255 @property OF_NULLABLE_PROPERTY (assign, nonatomic)
258 #ifdef OF_HAVE_SANDBOX 259 @property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFSandbox *activeSandbox;
260 @property OF_NULLABLE_PROPERTY (readonly, nonatomic)
261 OFSandbox *activeSandboxForChildProcesses;
295 + (void)terminate OF_NO_RETURN;
302 + (void)terminateWithStatus: (
int)status OF_NO_RETURN;
304 #ifdef OF_HAVE_SANDBOX 305 + (void)of_activateSandbox: (OFSandbox *)sandbox;
306 + (void)of_activateSandboxForChildProcesses: (OFSandbox *)sandbox;
309 - (instancetype)init OF_UNAVAILABLE;
317 - (void)getArgumentCount: (
int *_Nonnull *_Nonnull)argc
318 andArgumentValues: (
char *_Nullable *_Nonnull *_Nonnull[_Nonnull])argv;
323 - (void)terminate OF_NO_RETURN;
330 - (void)terminateWithStatus: (
int)status OF_NO_RETURN;
332 #ifdef OF_HAVE_SANDBOX 333 - (void)of_activateSandbox: (OFSandbox *)sandbox;
334 - (void)of_activateSandboxForChildProcesses: (OFSandbox *)sandbox;
341 extern int OFApplicationMain(
int *_Nonnull,
char *_Nullable *_Nonnull[_Nonnull],
342 id <OFApplicationDelegate>);
347 OF_ASSUME_NONNULL_END
const struct objc_selector * SEL
A selector.
Definition: ObjFWRT.h:102
An abstract class for storing objects in an array.
Definition: OFArray.h:107
A class to represent a notification for or from OFNotificationCenter.
Definition: OFNotification.h:40
A class for storing constant strings using the @"" literal.
Definition: OFConstantString.h:41
The root class for all other classes inside ObjFW.
Definition: OFObject.h:690
An abstract class for storing, adding and removing objects in an array.
Definition: OFMutableArray.h:47
const OFNotificationName OFApplicationWillTerminateNotification
A notification that will be sent when the application will terminate.
Definition: OFApplication.m:98
const OFNotificationName OFApplicationDidFinishLaunchingNotification
A notification that will be sent when the application did finish launching.
Definition: OFApplication.m:96
A class for handling strings.
Definition: OFString.h:142
An abstract class for storing objects in a dictionary.
Definition: OFDictionary.h:82
An abstract class for storing and changing objects in a dictionary.
Definition: OFMutableDictionary.h:46
A protocol for delegates of OFApplication.
A class which represents the application as an object.
Definition: OFApplication.h:206