Home | History | Annotate | Download | only in SemaObjC
      1 // RUN: %clang_cc1 %s -fsyntax-only -verify
      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;
     58 -(CGFloat) tabAreaThickness { return 0; }
     59 -(NSRectEdge) rectEdgeForTabs { 
     60   NSRect dummy, result = {};
     61   NSDivideRect(self.bounds, &result, &dummy, self.tabAreaThickness, self.rectEdgeForTabs);
     62   return 0;
     63 }
     64 @end
     65 
     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
     96