64 lines · c
1#ifndef NSVALUE_BOXED_EXPRESSIONS_SUPPORT_H2#define NSVALUE_BOXED_EXPRESSIONS_SUPPORT_H3 4#define BOXABLE __attribute__((objc_boxable))5 6typedef unsigned long NSUInteger;7typedef double CGFloat;8 9typedef struct BOXABLE _NSRange {10 NSUInteger location;11 NSUInteger length;12} NSRange;13 14typedef struct BOXABLE _NSPoint {15 CGFloat x;16 CGFloat y;17} NSPoint;18 19typedef struct BOXABLE _NSSize {20 CGFloat width;21 CGFloat height;22} NSSize;23 24typedef struct BOXABLE _NSRect {25 NSPoint origin;26 NSSize size;27} NSRect;28 29struct CGPoint {30 CGFloat x;31 CGFloat y;32};33typedef struct BOXABLE CGPoint CGPoint;34 35struct CGSize {36 CGFloat width;37 CGFloat height;38};39typedef struct BOXABLE CGSize CGSize;40 41struct CGRect {42 CGPoint origin;43 CGSize size;44};45typedef struct BOXABLE CGRect CGRect;46 47struct NSEdgeInsets {48 CGFloat top;49 CGFloat left;50 CGFloat bottom;51 CGFloat right;52};53typedef struct BOXABLE NSEdgeInsets NSEdgeInsets;54 55@interface NSValue56 57+ (NSValue *)valueWithBytes:(const void *)value objCType:(const char *)type;58 59@end60 61NSRange getRange(void);62 63#endif // NSVALUE_BOXED_EXPRESSIONS_SUPPORT_H64