29 OF_ASSUME_NONNULL_BEGIN
33 @class OFArray OF_GENERIC(ObjectType);
82 # define OF_APPLICATION_DELEGATE(class_) \ 84 main(int argc, char *argv[]) \ 86 return OFApplicationMain(&argc, &argv, \ 87 (class_ *)[[class_ alloc] init]); \ 90 # define OF_APPLICATION_DELEGATE(class_) \ 92 main(int argc, char *argv[]) \ 94 return OFApplicationMain(&argc, &argv, \ 95 (class_ *)[[class_ alloc] init]); \ 99 WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, \ 100 LPSTR lpCmdLine, int nShowCmd) \ 102 int argc = 0, si = 0; \ 103 char **argv = NULL, **envp = NULL; \ 105 __getmainargs(&argc, &argv, &envp, _CRT_glob, &si); \ 107 return OFApplicationMain(&argc, &argv, \ 108 (class_ *)[[class_ alloc] init]); \ 113 extern void __getmainargs(
int *_Nonnull,
char *_Nonnull *_Nullable *_Nullable,
114 char *_Nonnull *_Nullable *_Nullable,
int,
int *_Nonnull);
115 extern int _CRT_glob;
121 #ifdef OF_HAVE_PLEDGE 122 # define OF_HAVE_SANDBOX 140 - (void)applicationDidFinishLaunching: (
OFNotification *)notification;
162 - (void)applicationDidReceiveSIGINT;
177 - (void)applicationDidReceiveSIGHUP;
193 - (void)applicationDidReceiveSIGUSR1;
209 - (void)applicationDidReceiveSIGUSR2;
227 OF_SUBCLASSING_RESTRICTED
236 id <OFApplicationDelegate> _Nullable _delegate;
237 void (*_Nullable _SIGINTHandler)(id,
SEL);
239 void (*_Nullable _SIGHUPHandler)(id,
SEL);
240 void (*_Nullable _SIGUSR1Handler)(id,
SEL);
241 void (*_Nullable _SIGUSR2Handler)(id,
SEL);
243 #ifdef OF_HAVE_SANDBOX 244 OFSandbox *_Nullable _activeSandbox;
245 OFSandbox *_Nullable _activeSandboxForChildProcesses;
249 #ifdef OF_HAVE_CLASS_PROPERTIES 250 @property (
class, readonly, nullable, nonatomic)
252 @property (
class, readonly, nullable, nonatomic)
OFString *programName;
253 @property (
class, readonly, nullable, nonatomic)
255 @property (
class, readonly, nullable, nonatomic)
257 @property (
class, readonly, nonatomic)
long processID;
263 @property (readonly, nonatomic)
OFString *programName;
273 @property (readonly, nonatomic)
279 @property (readonly, nonatomic)
long processID;
284 @property OF_NULLABLE_PROPERTY (assign, nonatomic)
287 #ifdef OF_HAVE_SANDBOX 288 @property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFSandbox *activeSandbox;
289 @property OF_NULLABLE_PROPERTY (readonly, nonatomic)
290 OFSandbox *activeSandboxForChildProcesses;
331 + (void)terminate OF_NO_RETURN;
338 + (void)terminateWithStatus: (
int)status OF_NO_RETURN;
340 #ifdef OF_HAVE_SANDBOX 341 + (void)of_activateSandbox: (OFSandbox *)sandbox;
342 + (void)of_activateSandboxForChildProcesses: (OFSandbox *)sandbox;
345 - (instancetype)init OF_UNAVAILABLE;
353 - (void)getArgumentCount: (
int *_Nonnull *_Nonnull)argc
354 andArgumentValues: (
char *_Nullable *_Nonnull *_Nonnull[_Nonnull])argv;
359 - (void)terminate OF_NO_RETURN;
366 - (void)terminateWithStatus: (
int)status OF_NO_RETURN;
368 #ifdef OF_HAVE_SANDBOX 369 - (void)of_activateSandbox: (OFSandbox *)sandbox;
370 - (void)of_activateSandboxForChildProcesses: (OFSandbox *)sandbox;
377 extern int OFApplicationMain(
int *_Nonnull,
char *_Nullable *_Nonnull[_Nonnull],
378 id <OFApplicationDelegate>);
383 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:108
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:954
An abstract class for storing, adding and removing objects in an array.
Definition: OFMutableArray.h:49
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:228