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;
217 OF_SUBCLASSING_RESTRICTED
225 id <OFApplicationDelegate> _Nullable _delegate;
226 void (*_Nullable _SIGINTHandler)(id,
SEL);
228 void (*_Nullable _SIGHUPHandler)(id,
SEL);
229 void (*_Nullable _SIGUSR1Handler)(id,
SEL);
230 void (*_Nullable _SIGUSR2Handler)(id,
SEL);
232 #ifdef OF_HAVE_SANDBOX
233 OFSandbox *_Nullable _activeSandbox;
234 OFSandbox *_Nullable _activeSandboxForChildProcesses;
238 #ifdef OF_HAVE_CLASS_PROPERTIES
239 @property (
class, readonly, nullable, nonatomic)
241 @property (
class, readonly, nullable, nonatomic)
OFString *programName;
242 @property (
class, readonly, nullable, nonatomic)
244 @property (
class, readonly, nullable, nonatomic)
251 @property (readonly, nonatomic)
OFString *programName;
261 @property (readonly, nonatomic)
267 @property OF_NULLABLE_PROPERTY (assign, nonatomic)
270 #ifdef OF_HAVE_SANDBOX
271 @property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFSandbox *activeSandbox;
272 @property OF_NULLABLE_PROPERTY (readonly, nonatomic)
273 OFSandbox *activeSandboxForChildProcesses;
307 + (void)terminate OF_NO_RETURN;
314 + (void)terminateWithStatus: (
int)status OF_NO_RETURN;
316 #ifdef OF_HAVE_SANDBOX
317 + (void)of_activateSandbox: (OFSandbox *)sandbox;
318 + (void)of_activateSandboxForChildProcesses: (OFSandbox *)sandbox;
321 - (instancetype)init OF_UNAVAILABLE;
329 - (void)getArgumentCount: (
int *_Nonnull *_Nonnull)argc
330 andArgumentValues: (
char *_Nullable *_Nonnull *_Nonnull[_Nonnull])argv;
335 - (void)terminate OF_NO_RETURN;
342 - (void)terminateWithStatus: (
int)status OF_NO_RETURN;
344 #ifdef OF_HAVE_SANDBOX
345 - (void)of_activateSandbox: (OFSandbox *)sandbox;
346 - (void)of_activateSandboxForChildProcesses: (OFSandbox *)sandbox;
353 extern int OFApplicationMain(
int *_Nonnull,
char *_Nullable *_Nonnull[_Nonnull],
354 id <OFApplicationDelegate>);
359 OF_ASSUME_NONNULL_END
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
const struct objc_selector * SEL
A selector.
Definition: ObjFWRT.h:102
A class which represents the application as an object.
Definition: OFApplication.h:219
An abstract class for storing objects in an array.
Definition: OFArray.h:109
A class for storing constant strings using the @"" literal.
Definition: OFConstantString.h:42
An abstract class for storing objects in a dictionary.
Definition: OFDictionary.h:84
An abstract class for storing, adding and removing objects in an array.
Definition: OFMutableArray.h:48
An abstract class for storing and changing objects in a dictionary.
Definition: OFMutableDictionary.h:48
A class to represent a notification for or from OFNotificationCenter.
Definition: OFNotification.h:42
The root class for all other classes inside ObjFW.
Definition: OFObject.h:692
A class for handling strings.
Definition: OFString.h:143
A protocol for delegates of OFApplication.
Definition: OFApplication.h:132
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.