40#define NS_BLOCK_ASSERTIONS 1
46#import <Foundation/Foundation.h>
49 #define OOLITE_GNUSTEP 1
51 #if (GNUSTEP_BASE_MAJOR_VERSION == 1 && GNUSTEP_BASE_MINOR_VERSION >= 20) || (GNUSTEP_BASE_MAJOR_VERSION > 1)
52 #define OOLITE_GNUSTEP_1_20 1
54 #error Oolite for non-Mac targets requires GNUstep 1.20.
59 #define NSIntegerMax INTPTR_MAX
60 #define NSIntegerMin INTPTR_MIN
61 #define NSUIntegerMax UINTPTR_MAX
65 #import <AppKit/AppKit.h>
67 #define OOLITE_MAC_OS_X 1
68 #define OOLITE_SPEECH_SYNTH 1
71 #define OOLITE_64_BIT 1
77 #define DESTROY(x) do { id x_ = x; x = nil; [x_ release]; } while (0)
80 #if defined MAC_OS_X_VERSION_10_7 && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7
81 #define OOLITE_MAC_OS_X_10_7 1
84 #if defined MAC_OS_X_VERSION_10_8 && MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8
85 #define OOLITE_MAC_OS_X_10_8 1
88 #ifndef MAC_OS_X_VERSION_10_12
94#ifndef OOLITE_MAC_OS_X_10_7
95 #define OOLITE_MAC_OS_X_10_7 0
98#ifndef OOLITE_MAC_OS_X_10_8
99 #define OOLITE_MAC_OS_X_10_8 0
104#define OOLITE_HAVE_CLANG 1
106#define OOLITE_HAVE_CLANG 0
110#if defined(__GNUC__) && !OOLITE_HAVE_CLANG
112#define OOLITE_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
124 #define OOLITE_WINDOWS 1
126 #define OOLITE_64_BIT 1
131#define OOLITE_LINUX 1
139 #define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a > __b ? __a : __b; })
143 #define MIN(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __a : __b; })
147 #define OOLITE_SPEECH_SYNTH 1
148 #define OOLITE_ESPEAK 1
157#import "Comparison.h"
161 NSUpArrowFunctionKey = 0xF700,
162 NSDownArrowFunctionKey = 0xF701,
163 NSLeftArrowFunctionKey = 0xF702,
164 NSRightArrowFunctionKey = 0xF703,
165 NSF1FunctionKey = 0xF704,
166 NSF2FunctionKey = 0xF705,
167 NSF3FunctionKey = 0xF706,
168 NSF4FunctionKey = 0xF707,
169 NSF5FunctionKey = 0xF708,
170 NSF6FunctionKey = 0xF709,
171 NSF7FunctionKey = 0xF70A,
172 NSF8FunctionKey = 0xF70B,
173 NSF9FunctionKey = 0xF70C,
174 NSF10FunctionKey = 0xF70D,
175 NSF11FunctionKey = 0xF70E,
176 NSF12FunctionKey = 0xF70F,
177 NSF13FunctionKey = 0xF710,
178 NSF14FunctionKey = 0xF711,
179 NSF15FunctionKey = 0xF712,
180 NSF16FunctionKey = 0xF713,
181 NSF17FunctionKey = 0xF714,
182 NSF18FunctionKey = 0xF715,
183 NSF19FunctionKey = 0xF716,
184 NSF20FunctionKey = 0xF717,
185 NSF21FunctionKey = 0xF718,
186 NSF22FunctionKey = 0xF719,
187 NSF23FunctionKey = 0xF71A,
188 NSF24FunctionKey = 0xF71B,
189 NSF25FunctionKey = 0xF71C,
190 NSF26FunctionKey = 0xF71D,
191 NSF27FunctionKey = 0xF71E,
192 NSF28FunctionKey = 0xF71F,
193 NSF29FunctionKey = 0xF720,
194 NSF30FunctionKey = 0xF721,
195 NSF31FunctionKey = 0xF722,
196 NSF32FunctionKey = 0xF723,
197 NSF33FunctionKey = 0xF724,
198 NSF34FunctionKey = 0xF725,
199 NSF35FunctionKey = 0xF726,
200 NSInsertFunctionKey = 0xF727,
201 NSDeleteFunctionKey = 0xF728,
202 NSHomeFunctionKey = 0xF729,
203 NSBeginFunctionKey = 0xF72A,
204 NSEndFunctionKey = 0xF72B,
205 NSPageUpFunctionKey = 0xF72C,
206 NSPageDownFunctionKey = 0xF72D,
207 NSPrintScreenFunctionKey = 0xF72E,
208 NSScrollLockFunctionKey = 0xF72F,
209 NSPauseFunctionKey = 0xF730,
210 NSSysReqFunctionKey = 0xF731,
211 NSBreakFunctionKey = 0xF732,
212 NSResetFunctionKey = 0xF733,
213 NSStopFunctionKey = 0xF734,
214 NSMenuFunctionKey = 0xF735,
215 NSUserFunctionKey = 0xF736,
216 NSSystemFunctionKey = 0xF737,
217 NSPrintFunctionKey = 0xF738,
218 NSClearLineFunctionKey = 0xF739,
219 NSClearDisplayFunctionKey = 0xF73A,
220 NSInsertLineFunctionKey = 0xF73B,
221 NSDeleteLineFunctionKey = 0xF73C,
222 NSInsertCharFunctionKey = 0xF73D,
223 NSDeleteCharFunctionKey = 0xF73E,
224 NSPrevFunctionKey = 0xF73F,
225 NSNextFunctionKey = 0xF740,
226 NSSelectFunctionKey = 0xF741,
227 NSExecuteFunctionKey = 0xF742,
228 NSUndoFunctionKey = 0xF743,
229 NSRedoFunctionKey = 0xF744,
230 NSFindFunctionKey = 0xF745,
231 NSHelpFunctionKey = 0xF746,
232 NSModeSwitchFunctionKey = 0xF747
238#ifndef OOLITE_GNUSTEP
239#define OOLITE_GNUSTEP 0
242#ifndef OOLITE_MAC_OS_X
243#define OOLITE_MAC_OS_X 0
246#ifndef OOLITE_WINDOWS
247#define OOLITE_WINDOWS 0
251#define OOLITE_LINUX 0
258#ifndef OOLITE_SPEECH_SYNTH
259#define OOLITE_SPEECH_SYNTH 0
263#define OOLITE_ESPEAK 0
267 #define OOLITE_64_BIT 0
271#define OOLITE_PROPERTY_SYNTAX (OOLITE_MAC_OS_X || OOLITE_HAVE_CLANG)
277@interface NSObject (OODescriptionComponents)
304 #define OOLITE_RELEASE_PLIST_ERROR_STRINGS 1
306 #define OOLITE_RELEASE_PLIST_ERROR_STRINGS 0
336 #define OOLITE_FAST_ENUMERATION 1
339 #define OOLITE_FAST_ENUMERATION 1
340 #elif defined (OOLITE_GNUSTEP)
341 #define OOLITE_FAST_ENUMERATION (OOLITE_GCC_VERSION >= 40600)
345#ifndef OOLITE_FAST_ENUMERATION
346#define OOLITE_FAST_ENUMERATION 0
364#if OOLITE_FAST_ENUMERATION
365#define foreach(VAR, COLLECTION) for(VAR in COLLECTION)
366#define foreachkey(VAR, DICT) for(VAR in DICT)
368#define foreach(VAR, COLLECTION) for (NSEnumerator *ooForEachEnum = [(COLLECTION) objectEnumerator]; ((VAR) = [ooForEachEnum nextObject]); )
369#define foreachkey(VAR, DICT) for (NSEnumerator *ooForEachEnum = [(DICT) keyEnumerator]; ((VAR) = [ooForEachEnum nextObject]); )
377@interface NSEnumerator (OOForEachSupport)
378- (NSEnumerator *) objectEnumerator;
390#ifndef OOLITE_HAVE_PROTOCOL_OPTIONAL
391#define OOLITE_HAVE_PROTOCOL_OPTIONAL (OOLITE_MAC_OS_X || OOLITE_HAVE_CLANG || OOLITE_GCC_VERSION >= 40700)
394#if OOLITE_HAVE_PROTOCOL_OPTIONAL
395#define OOLITE_OPTIONAL(protocolName) @optional
397#define OOLITE_OPTIONAL(protocolName) @end @interface NSObject (protocolName ## Optional)
433#if __OBJC__ && !__has_feature(objc_instancetype)
434typedef id instancetype;
NSUInteger NSWindowStyleMask
NSInteger OOComparisonResult
NSString * descriptionComponents()
NSString * shortDescriptionComponents()
NSString * shortDescription()