Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Andy Gibbs | 8e8fb3b | 2012-10-19 12:44:48 +0000 | [diff] [blame] | 2 | // expected-no-diagnostics |
Steve Naroff | b79c01e | 2008-12-08 20:57:28 +0000 | [diff] [blame] | 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 |
| 9 | typedef float CGFloat; |
| 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; |
| 33 | @end |
| 34 | @class NSPasteboard; |
| 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) |
Mike Stump | d1969d8 | 2009-07-22 00:43:08 +0000 | [diff] [blame] | 39 | -(NSString *)inspectorClassName { return 0; } |
Steve Naroff | b79c01e | 2008-12-08 20:57:28 +0000 | [diff] [blame] | 40 | -(IBInset)ibShadowInset { |
| 41 | if ([self boxType] == NSBoxSeparator) { |
| 42 | return [super ibShadowInset]; |
| 43 | } |
Mike Stump | d1969d8 | 2009-07-22 00:43:08 +0000 | [diff] [blame] | 44 | while (1) {} |
Steve Naroff | b79c01e | 2008-12-08 20:57:28 +0000 | [diff] [blame] | 45 | } |
| 46 | -(NSSize)minimumFrameSizeFromKnobPosition:(IBKnobPosition)knobPosition { |
| 47 | if ([self boxType] != NSBoxSeparator) |
| 48 | return [super minimumFrameSizeFromKnobPosition:knobPosition]; |
Mike Stump | d1969d8 | 2009-07-22 00:43:08 +0000 | [diff] [blame] | 49 | while (1) {} |
Steve Naroff | b79c01e | 2008-12-08 20:57:28 +0000 | [diff] [blame] | 50 | } |
| 51 | @end |