46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
#ifdef OF_HAVE_OPTIONAL_PROTOCOLS
@optional
#endif
/**
* \brief A method which is called when the application will terminate.
*/
- (void)applicationWillTerminate;
@end
/**
* \brief Represents the application as an object.
*/
@interface OFApplication: OFObject
{
OFString *programName;
OFMutableArray *arguments;
OFMutableDictionary *environment;
id <OFApplicationDelegate> delegate;
int *argc;
char ***argv;
}
#ifdef OF_HAVE_PROPERTIES
@property (readonly, assign) OFString *programName;
@property (readonly, assign) OFArray *arguments;
@property (readonly, assign) OFDictionary *environment;
@property (assign) id <OFApplicationDelegate> delegate;
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
<
>
>
>
>
>
>
|
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
#ifdef OF_HAVE_OPTIONAL_PROTOCOLS
@optional
#endif
/**
* \brief A method which is called when the application will terminate.
*/
- (void)applicationWillTerminate;
/**
* \brief A method which is called when the application received a SIGINT.
*
* \warning You are not allowed to send any messages inside this method, as
* message dispatching is not signal-safe! You are only allowed to do
* signal-safe operations like setting a variable or calling a
* signal-safe function!
*/
- (void)applicationDidReceiveSIGINT;
/**
* \brief A method which is called when the application received a SIGHUP.
*
* \warning You are not allowed to send any messages inside this method, as
* message dispatching is not signal-safe! You are only allowed to do
* signal-safe operations like setting a variable or calling a
* signal-safe function!
*/
- (void)applicationDidReceiveSIGHUP;
/**
* \brief A method which is called when the application received a SIGUSR1.
*
* \warning You are not allowed to send any messages inside this method, as
* message dispatching is not signal-safe! You are only allowed to do
* signal-safe operations like setting a variable or calling a
* signal-safe function!
*/
- (void)applicationDidReceiveSIGUSR1;
/**
* \brief A method which is called when the application received a SIGUSR2.
*
* \warning You are not allowed to send any messages inside this method, as
* message dispatching is not signal-safe! You are only allowed to do
* signal-safe operations like setting a variable or calling a
* signal-safe function!
*/
- (void)applicationDidReceiveSIGUSR2;
@end
/**
* \brief Represents the application as an object.
*/
@interface OFApplication: OFObject
{
OFString *programName;
OFMutableArray *arguments;
OFMutableDictionary *environment;
int *argc;
char ***argv;
@public
id <OFApplicationDelegate> delegate;
void (*SIGINTHandler)(id, SEL);
void (*SIGHUPHandler)(id, SEL);
void (*SIGUSR1Handler)(id, SEL);
void (*SIGUSR2Handler)(id, SEL);
}
#ifdef OF_HAVE_PROPERTIES
@property (readonly, assign) OFString *programName;
@property (readonly, assign) OFArray *arguments;
@property (readonly, assign) OFDictionary *environment;
@property (assign) id <OFApplicationDelegate> delegate;
|