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