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