ObjFW  Diff

Differences From Artifact [5756d4c723]:

  • File src/OFApplication.h — part of check-in [d526d938d7] at 2015-11-21 18:35:39 on branch trunk — Remove OF_NULLABLE / OF_NONNULL

    Now that Clang switched to use _Nullable and _Nonnull instead of
    __nullable / __nonnull, there is no longer a conflict with glibc, which
    means we can just define _Nullable / _Nonnull to nothing if they are not
    understood by the compiler (which did not work with __nullable /
    __nonnull due to this conflict).

    This also defines _Null_unspecified to nothing if unavailable. (user: js, size: 7049) [annotate] [blame] [check-ins using]

To Artifact [91ca5aaec7]:

  • File src/OFApplication.h — part of check-in [48980f2297] at 2015-11-29 11:43:05 on branch trunk — Make properties a requirement and clean up code

    This increases the required GCC version from 4.0 to 4.6 (exception:
    Apple GCC, which already supports this with >= 4.0 starting with OS X
    10.5). Since even GCC 4.6 is really old by now, there is no point in
    still supporting something even older and making the code ugly because
    of that. While some hardware and OS support was dropped from GCC 4.6
    compared to GCC 4.0, there is nothing in there that would be an
    interesting target with the exception of BeOS maybe - but a port to BeOS
    can also be achieved using the Haiku support. The other dropped OSes are
    mostly old versions of OSes while newer ones are still being supported
    (and those newer versions of those OSes still support the same
    hardware). (user: js, size: 6581) [annotate] [blame] [check-ins using]


126
127
128
129
130
131
132
133



134




135




136
137
138
139
140
141
142
143
144
145
146
#ifndef OF_WINDOWS
	void (*_SIGHUPHandler)(id, SEL);
	void (*_SIGUSR1Handler)(id, SEL);
	void (*_SIGUSR2Handler)(id, SEL);
#endif
}

#ifdef OF_HAVE_PROPERTIES



@property (readonly, copy, nonatomic) OFString *programName;




@property (readonly, copy, nonatomic) OFArray OF_GENERIC(OFString*) *arguments;




@property (readonly, copy, nonatomic)
    OFDictionary OF_GENERIC(OFString*, OFString*) *environment;
@property OF_NULLABLE_PROPERTY (assign) id <OFApplicationDelegate> delegate;
#endif

/*!
 * @brief Returns the only OFApplication instance in the application.
 *
 * @return The only OFApplication instance in the application
 */
+ (OFApplication*)sharedApplication;







<
>
>
>
|
>
>
>
>
|
>
>
>
>
|

<
<







126
127
128
129
130
131
132

133
134
135
136
137
138
139
140
141
142
143
144
145
146
147


148
149
150
151
152
153
154
#ifndef OF_WINDOWS
	void (*_SIGHUPHandler)(id, SEL);
	void (*_SIGUSR1Handler)(id, SEL);
	void (*_SIGUSR2Handler)(id, SEL);
#endif
}


/*!
 * The name of the program (argv[0]).
 */
@property (readonly, assign) OFString *programName;

/*!
 * The arguments passed to the application.
 */
@property (readonly, assign) OFArray OF_GENERIC(OFString*) *arguments;

/*!
 * The environment of the application.
 */
@property (readonly, assign)
    OFDictionary OF_GENERIC(OFString*, OFString*) *environment;



/*!
 * @brief Returns the only OFApplication instance in the application.
 *
 * @return The only OFApplication instance in the application
 */
+ (OFApplication*)sharedApplication;
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
 *
 * @param argc A pointer where a pointer to argc should be stored
 * @param argv A pointer where a pointer to argv should be stored
 */
- (void)getArgumentCount: (int *_Nonnull *_Nonnull)argc
       andArgumentValues: (char *_Nonnull *_Nonnull *_Nonnull[])argv;

/*!
 * @brief Returns the name of the program (argv[0]).
 *
 * @return The name of the program (argv[0])
 */
- (OFString*)programName;

/*!
 * @brief Returns the arguments passed to the application.
 *
 * @return The arguments passed to the application
 */
- (OFArray OF_GENERIC(OFString*)*)arguments;

/*!
 * @brief Returns the environment of the application.
 *
 * @return The environment of the application
 */
- (OFDictionary OF_GENERIC(OFString*, OFString*)*)environment;

/*!
 * @brief Returns the delegate of the application.
 *
 * @return The delegate of the application
 */
- (nullable id <OFApplicationDelegate>)delegate;








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







191
192
193
194
195
196
197





















198
199
200
201
202
203
204
 *
 * @param argc A pointer where a pointer to argc should be stored
 * @param argv A pointer where a pointer to argv should be stored
 */
- (void)getArgumentCount: (int *_Nonnull *_Nonnull)argc
       andArgumentValues: (char *_Nonnull *_Nonnull *_Nonnull[])argv;






















/*!
 * @brief Returns the delegate of the application.
 *
 * @return The delegate of the application
 */
- (nullable id <OFApplicationDelegate>)delegate;