blob: fd9399499ec7a554b56a497bbbe1967e36d3caec [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Steve Naroffb79c01e2008-12-08 20:57:28 +00003typedef signed char BOOL;
4typedef 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
9typedef float CGFloat;
10typedef struct _NSSize {} NSSize;
11typedef struct _NSRect {} NSRect;
12@interface NSResponder : NSObject <NSCoding> {} @end
13@protocol NSAnimatablePropertyContainer - (id)animator; @end
14extern NSString *NSAnimationTriggerOrderIn ;
15@interface NSView : NSResponder <NSAnimatablePropertyContainer> {} @end
16@class NSAttributedString, NSEvent, NSFont, NSFormatter, NSImage, NSMenu, NSText, NSView;
17enum { NSBoxPrimary = 0, NSBoxSecondary = 1, NSBoxSeparator = 2, NSBoxOldStyle = 3, NSBoxCustom = 4};
18typedef NSUInteger NSBoxType;
19@interface NSBox : NSView {} - (NSBoxType)boxType; @end
20@class NSArray, NSError, NSImage, NSView, NSNotificationCenter, NSURL;
21@interface NSProBox:NSBox {} @end
22enum IBKnobPosition { IBNoKnobPosition = -1, IBBottomLeftKnobPosition = 0,
23 IBMiddleLeftKnobPosition, IBTopLeftKnobPosition,
24 IBTopMiddleKnobPosition, IBTopRightKnobPosition,
25 IBMiddleRightKnobPosition, IBBottomRightKnobPosition,
26 IBBottomMiddleKnobPosition };
27typedef enum IBKnobPosition IBKnobPosition;
28typedef struct _IBInset {} IBInset;
29@protocol IBObjectProtocol -(NSString *)inspectorClassName; @end
30@protocol IBViewProtocol
31 -(NSSize)minimumFrameSizeFromKnobPosition:(IBKnobPosition)position;
32 -(IBInset)ibShadowInset;
33@end
34@class NSPasteboard;
35@interface NSObject (NSObject_IBObjectProtocol) <IBObjectProtocol> @end
36@interface NSView (NSView_IBViewProtocol) <IBViewProtocol> - (NSRect)layoutRect; @end
37typedef enum { NSProTextFieldSquareBezel = 0, NSProTextFieldRoundedBezel = 1, NSProTextFieldDisplayBezel = 2 } MKModuleReusePolicy;
38@implementation NSProBox(IBAdditions)
Mike Stumpd1969d82009-07-22 00:43:08 +000039-(NSString *)inspectorClassName { return 0; }
Steve Naroffb79c01e2008-12-08 20:57:28 +000040-(IBInset)ibShadowInset {
41 if ([self boxType] == NSBoxSeparator) {
42 return [super ibShadowInset];
43 }
Mike Stumpd1969d82009-07-22 00:43:08 +000044 while (1) {}
Steve Naroffb79c01e2008-12-08 20:57:28 +000045}
46-(NSSize)minimumFrameSizeFromKnobPosition:(IBKnobPosition)knobPosition {
47 if ([self boxType] != NSBoxSeparator)
48 return [super minimumFrameSizeFromKnobPosition:knobPosition];
Mike Stumpd1969d82009-07-22 00:43:08 +000049 while (1) {}
Steve Naroffb79c01e2008-12-08 20:57:28 +000050}
51@end