Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -fsyntax-only -verify |
Chris Lattner | 6562fda | 2008-07-21 06:44:27 +0000 | [diff] [blame] | 2 | // rdar://5967199 |
| 3 | |
| 4 | typedef signed char BOOL; |
| 5 | @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator; |
| 6 | |
| 7 | @protocol NSObject |
| 8 | - (BOOL) isEqual:(id) object; |
| 9 | @end |
| 10 | |
| 11 | @protocol NSCoding |
| 12 | - (void) encodeWithCoder:(NSCoder *) aCoder; |
| 13 | @end |
| 14 | |
| 15 | @interface NSObject < NSObject > {} |
| 16 | @end |
| 17 | |
| 18 | typedef float CGFloat; |
| 19 | typedef struct _NSPoint {} NSSize; |
| 20 | typedef struct _NSRect {} NSRect; |
| 21 | typedef enum { NSMinXEdge = 0, NSMinYEdge = 1, NSMaxXEdge = 2, NSMaxYEdge = 3} NSRectEdge; |
| 22 | extern void NSDivideRect(NSRect inRect, NSRect * slice, NSRect * rem, CGFloat amount, NSRectEdge edge); |
| 23 | |
| 24 | @interface NSResponder:NSObject < NSCoding > {} |
| 25 | @end |
| 26 | |
| 27 | @protocol NSAnimatablePropertyContainer |
| 28 | - (id) animator; |
| 29 | @end |
| 30 | |
| 31 | extern NSString *NSAnimationTriggerOrderIn; |
| 32 | |
| 33 | @interface NSView:NSResponder < NSAnimatablePropertyContainer > {} |
| 34 | -(NSRect) bounds; |
| 35 | @end |
| 36 | |
| 37 | enum { |
| 38 | NSBackgroundStyleLight = 0, NSBackgroundStyleDark, NSBackgroundStyleRaised, NSBackgroundStyleLowered |
| 39 | }; |
| 40 | |
| 41 | @interface NSTabView:NSView {} |
| 42 | @end |
| 43 | |
| 44 | @ class OrganizerTabHeader; |
| 45 | |
| 46 | @interface OrganizerTabView:NSTabView {} |
| 47 | @property(assign) |
| 48 | NSSize minimumSize; |
| 49 | @end |
| 50 | |
| 51 | @interface OrganizerTabView() |
| 52 | @property(readonly) OrganizerTabHeader *tabHeaderView; |
| 53 | @property(readonly) NSRect headerRect; |
| 54 | @end |
| 55 | |
| 56 | @implementation OrganizerTabView |
| 57 | @dynamic tabHeaderView, headerRect, minimumSize; |
Mike Stump | d1969d8 | 2009-07-22 00:43:08 +0000 | [diff] [blame] | 58 | -(CGFloat) tabAreaThickness { return 0; } |
Chris Lattner | 6562fda | 2008-07-21 06:44:27 +0000 | [diff] [blame] | 59 | -(NSRectEdge) rectEdgeForTabs { |
| 60 | NSRect dummy, result = {}; |
| 61 | NSDivideRect(self.bounds, &result, &dummy, self.tabAreaThickness, self.rectEdgeForTabs); |
Mike Stump | d1969d8 | 2009-07-22 00:43:08 +0000 | [diff] [blame] | 62 | return 0; |
Chris Lattner | 6562fda | 2008-07-21 06:44:27 +0000 | [diff] [blame] | 63 | } |
Fariborz Jahanian | 8cf0bb3 | 2008-11-26 20:01:34 +0000 | [diff] [blame] | 64 | @end |
Chris Lattner | 6562fda | 2008-07-21 06:44:27 +0000 | [diff] [blame] | 65 | |
Steve Naroff | f178728 | 2009-03-11 15:15:01 +0000 | [diff] [blame] | 66 | @class NSImage; |
| 67 | |
| 68 | @interface XCImageArchiveEntry : NSObject |
| 69 | { |
| 70 | NSImage *_cachedImage; |
| 71 | } |
| 72 | |
| 73 | @end |
| 74 | |
| 75 | @implementation XCImageArchiveEntry |
| 76 | |
| 77 | - (NSImage *)image |
| 78 | { |
| 79 | return _cachedImage; |
| 80 | } |
| 81 | |
| 82 | @end |
| 83 | |
| 84 | @interface XCImageArchive : NSObject |
| 85 | @end |
| 86 | |
| 87 | @implementation XCImageArchive |
| 88 | |
| 89 | - (NSImage *)imageNamed:(NSString *)name |
| 90 | { |
| 91 | XCImageArchiveEntry * entry; |
| 92 | return entry ? entry.image : ((void *)0); |
| 93 | } |
| 94 | |
| 95 | @end |