1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 typedef signed char BOOL;
3 typedef unsigned int NSUInteger;
4 @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator;
5 @protocol NSObject - (BOOL)isEqual:(id)object; @end
6 @protocol NSCoding - (void)encodeWithCoder:(NSCoder *)aCoder; @end
7 @interface NSObject <NSObject> {} @end
9 typedef struct _NSSize {} NSSize;
10 typedef struct _NSRect {} NSRect;
11 @interface NSResponder : NSObject <NSCoding> {} @end
12 @protocol NSAnimatablePropertyContainer - (id)animator; @end
13 extern NSString *NSAnimationTriggerOrderIn ;
14 @interface NSView : NSResponder <NSAnimatablePropertyContainer> {} @end
15 @class NSAttributedString, NSEvent, NSFont, NSFormatter, NSImage, NSMenu, NSText, NSView;
16 enum { NSBoxPrimary = 0, NSBoxSecondary = 1, NSBoxSeparator = 2, NSBoxOldStyle = 3, NSBoxCustom = 4};
17 typedef NSUInteger NSBoxType;
18 @interface NSBox : NSView {} - (NSBoxType)boxType; @end
19 @class NSArray, NSError, NSImage, NSView, NSNotificationCenter, NSURL;
20 @interface NSProBox:NSBox {} @end
21 enum IBKnobPosition { IBNoKnobPosition = -1, IBBottomLeftKnobPosition = 0,
22 IBMiddleLeftKnobPosition, IBTopLeftKnobPosition,
23 IBTopMiddleKnobPosition, IBTopRightKnobPosition,
24 IBMiddleRightKnobPosition, IBBottomRightKnobPosition,
25 IBBottomMiddleKnobPosition };
26 typedef enum IBKnobPosition IBKnobPosition;
27 typedef struct _IBInset {} IBInset;
28 @protocol IBObjectProtocol -(NSString *)inspectorClassName; @end
29 @protocol IBViewProtocol
30 -(NSSize)minimumFrameSizeFromKnobPosition:(IBKnobPosition)position;
31 -(IBInset)ibShadowInset;
34 @interface NSObject (NSObject_IBObjectProtocol) <IBObjectProtocol> @end
35 @interface NSView (NSView_IBViewProtocol) <IBViewProtocol> - (NSRect)layoutRect; @end
36 typedef enum { NSProTextFieldSquareBezel = 0, NSProTextFieldRoundedBezel = 1, NSProTextFieldDisplayBezel = 2 } MKModuleReusePolicy;
37 @implementation NSProBox(IBAdditions)
38 -(NSString *)inspectorClassName { return 0; }
39 -(IBInset)ibShadowInset {
40 if ([self boxType] == NSBoxSeparator) {
41 return [super ibShadowInset];
45 -(NSSize)minimumFrameSizeFromKnobPosition:(IBKnobPosition)knobPosition {
46 if ([self boxType] != NSBoxSeparator)
47 return [super minimumFrameSizeFromKnobPosition:knobPosition];