fix objc init signatures

git-svn-id: https://zxing.googlecode.com/svn/trunk@1953 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
smparkes@smparkes.net 2011-10-09 18:55:44 +00:00
parent f395cd4a48
commit 7762515c59
8 changed files with 48 additions and 48 deletions

View file

@ -27,7 +27,7 @@
@implementation ZXBinarizer @implementation ZXBinarizer
- (ZXBinarizer*)initWithNative:(zxing::Binarizer*)binarizer { - (id)initWithNative:(zxing::Binarizer*)binarizer {
if ((self = [super init])) { if ((self = [super init])) {
native = binarizer; native = binarizer;
} }

View file

@ -97,29 +97,29 @@ class CGImageLuminanceSource : public LuminanceSource {
width:(size_t)width width:(size_t)width
height:(size_t)height; height:(size_t)height;
- (ZXCGImageLuminanceSource*)initWithZXImage:(ZXImage*)image - (id)initWithZXImage:(ZXImage*)image
left:(size_t)left left:(size_t)left
top:(size_t)top top:(size_t)top
width:(size_t)width width:(size_t)width
height:(size_t)height; height:(size_t)height;
- (ZXCGImageLuminanceSource*)initWithZXImage:(ZXImage*)image; - (id)initWithZXImage:(ZXImage*)image;
- (ZXCGImageLuminanceSource*)initWithCGImage:(CGImageRef)image - (id)initWithCGImage:(CGImageRef)image
left:(size_t)left left:(size_t)left
top:(size_t)top top:(size_t)top
width:(size_t)width width:(size_t)width
height:(size_t)height; height:(size_t)height;
- (ZXCGImageLuminanceSource*)initWithCGImage:(CGImageRef)image; - (id)initWithCGImage:(CGImageRef)image;
- (ZXCGImageLuminanceSource*)initWithBuffer:(CVPixelBufferRef)buffer - (id)initWithBuffer:(CVPixelBufferRef)buffer
left:(size_t)left left:(size_t)left
top:(size_t)top top:(size_t)top
width:(size_t)width width:(size_t)width
height:(size_t)height; height:(size_t)height;
- (ZXCGImageLuminanceSource*)initWithBuffer:(CVPixelBufferRef)buffer; - (id)initWithBuffer:(CVPixelBufferRef)buffer;
- (CGImageRef)image; - (CGImageRef)image;

View file

@ -33,45 +33,45 @@
(buffer, left, top, width, height); (buffer, left, top, width, height);
} }
- (ZXCGImageLuminanceSource*)initWithZXImage:(ZXImage*)image - (id)initWithZXImage:(ZXImage*)image
left:(size_t)left left:(size_t)left
top:(size_t)top top:(size_t)top
width:(size_t)width width:(size_t)width
height:(size_t)height { height:(size_t)height {
[super initWithNative:new zxing::CGImageLuminanceSource(image.cgimage, left, top, width, height)]; self = [super initWithNative:new zxing::CGImageLuminanceSource(image.cgimage, left, top, width, height)];
return self; return self;
} }
- (ZXCGImageLuminanceSource*)initWithZXImage:(ZXImage*)image { - (id)initWithZXImage:(ZXImage*)image {
[super initWithNative:new zxing::CGImageLuminanceSource(image.cgimage)]; self = [super initWithNative:new zxing::CGImageLuminanceSource(image.cgimage)];
return self; return self;
} }
- (ZXCGImageLuminanceSource*)initWithCGImage:(CGImageRef)image - (id)initWithCGImage:(CGImageRef)image
left:(size_t)left left:(size_t)left
top:(size_t)top top:(size_t)top
width:(size_t)width width:(size_t)width
height:(size_t)height { height:(size_t)height {
[super initWithNative:new zxing::CGImageLuminanceSource(image, left, top, width, height)]; self = [super initWithNative:new zxing::CGImageLuminanceSource(image, left, top, width, height)];
return self; return self;
} }
- (ZXCGImageLuminanceSource*)initWithCGImage:(CGImageRef)image { - (id)initWithCGImage:(CGImageRef)image {
[super initWithNative:new zxing::CGImageLuminanceSource(image)]; self = [super initWithNative:new zxing::CGImageLuminanceSource(image)];
return self; return self;
} }
- (ZXCGImageLuminanceSource*)initWithBuffer:(CVPixelBufferRef)buffer - (id)initWithBuffer:(CVPixelBufferRef)buffer
left:(size_t)left left:(size_t)left
top:(size_t)top top:(size_t)top
width:(size_t)width width:(size_t)width
height:(size_t)height { height:(size_t)height {
[super initWithNative:new zxing::CGImageLuminanceSource(buffer, left, top, width, height)]; self = [super initWithNative:new zxing::CGImageLuminanceSource(buffer, left, top, width, height)];
return self; return self;
} }
- (ZXCGImageLuminanceSource*)initWithBuffer:(CVPixelBufferRef)buffer { - (id)initWithBuffer:(CVPixelBufferRef)buffer {
[super initWithNative:new zxing::CGImageLuminanceSource(buffer)]; self = [super initWithNative:new zxing::CGImageLuminanceSource(buffer)];
return self; return self;
} }

View file

@ -21,7 +21,7 @@
zxing::Ref<zxing::LuminanceSource> native; zxing::Ref<zxing::LuminanceSource> native;
} }
- (ZXLuminanceSource*)initWithNative:(zxing::LuminanceSource*)native; - (id)initWithNative:(zxing::LuminanceSource*)native;
- (zxing::LuminanceSource*)native; - (zxing::LuminanceSource*)native;
@end @end

View file

@ -19,7 +19,7 @@
@implementation ZXLuminanceSource @implementation ZXLuminanceSource
- (ZXLuminanceSource*)initWithNative:(zxing::LuminanceSource*)_native { - (id)initWithNative:(zxing::LuminanceSource*)_native {
native = _native; native = _native;
return self; return self;
} }

View file

@ -20,6 +20,6 @@
@interface ZXQRCodeReader : ZXReader { @interface ZXQRCodeReader : ZXReader {
} }
- (ZXQRCodeReader*)init; - (id)init;
@end @end

View file

@ -20,9 +20,9 @@
@implementation ZXQRCodeReader @implementation ZXQRCodeReader
- (ZXQRCodeReader*)init { - (id)init {
zxing::qrcode::QRCodeReader* multi = new zxing::qrcode::QRCodeReader(); zxing::qrcode::QRCodeReader* multi = new zxing::qrcode::QRCodeReader();
[super initWithReader:multi]; self = [super initWithReader:multi];
return self; return self;
} }

View file

@ -25,7 +25,7 @@
zxing::Ref<zxing::Reader> reader; zxing::Ref<zxing::Reader> reader;
} }
- (ZXReader*)initWithReader:(zxing::Reader*)reader; - (id)initWithReader:(zxing::Reader*)reader;
- (ZXResult*)decode:(ZXBinaryBitmap*)bitmap hints:(ZXDecodeHints*)hints; - (ZXResult*)decode:(ZXBinaryBitmap*)bitmap hints:(ZXDecodeHints*)hints;
@end @end