@@ -11,45 +11,44 @@ * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ -#import "OFRectangleValue.h" +#import "OFRectValue.h" #import "OFMethodSignature.h" #import "OFString.h" #import "OFOutOfRangeException.h" -@implementation OFRectangleValue -@synthesize rectangleValue = _rectangle; +@implementation OFRectValue +@synthesize rectValue = _rect; -- (instancetype)initWithRectangle: (of_rectangle_t)rectangle +- (instancetype)initWithRect: (OFRect)rect { self = [super init]; - _rectangle = rectangle; + _rect = rect; return self; } - (const char *)objCType { - return @encode(of_rectangle_t); + return @encode(OFRect); } -- (void)getValue: (void *)value - size: (size_t)size +- (void)getValue: (void *)value size: (size_t)size { - if (size != sizeof(_rectangle)) + if (size != sizeof(_rect)) @throw [OFOutOfRangeException exception]; - memcpy(value, &_rectangle, sizeof(_rectangle)); + memcpy(value, &_rect, sizeof(_rect)); } - (OFString *)description { return [OFString stringWithFormat: - @"", - _rectangle.origin.x, _rectangle.origin.y, - _rectangle.size.width, _rectangle.size.height]; + @"", + _rect.origin.x, _rect.origin.y, + _rect.size.width, _rect.size.height]; } @end