mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
change directory name case to match objc convention; add missing includes so that pch aren't needed
git-svn-id: https://zxing.googlecode.com/svn/trunk@1783 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
872a41d3d1
commit
f0594882d0
|
@ -1,5 +1,4 @@
|
||||||
#ifdef __OBJC__
|
#ifdef __OBJC__
|
||||||
#import <Foundation/Foundation.h>
|
#import <Foundation/Foundation.h>
|
||||||
#import <AppKit/AppKit.h>
|
#import <AppKit/AppKit.h>
|
||||||
#import <QTKit/QTKit.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,93 +0,0 @@
|
||||||
// -*- mode:c++; c-basic-offset:2; indent-tabs-mode:nil -*-
|
|
||||||
#ifndef __CGIIMAGE_LUMINANCE_SOURCE__
|
|
||||||
#define __CGIIMAGE_LUMINANCE_SOURCE__
|
|
||||||
/*
|
|
||||||
* Copyright 2011 ZXing authors All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if TARGET_OS_EMBEDDED || TARGET_IPHONE_SIMULATOR
|
|
||||||
#include <CoreVideo/CoreVideo.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <zxing/LuminanceSource.h>
|
|
||||||
|
|
||||||
namespace zxing {
|
|
||||||
|
|
||||||
class CGImageLuminanceSource : public LuminanceSource {
|
|
||||||
|
|
||||||
private:
|
|
||||||
CGImageRef image_;
|
|
||||||
CFDataRef data_;
|
|
||||||
int left_;
|
|
||||||
int top_;
|
|
||||||
int width_;
|
|
||||||
int height_;
|
|
||||||
int dataWidth_;
|
|
||||||
int dataHeight_;
|
|
||||||
int bytesPerRow_;
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
static CGImageRef createImageFromBuffer(CVImageBufferRef);
|
|
||||||
static CGImageRef createImageFromBuffer(CVImageBufferRef,
|
|
||||||
int left,
|
|
||||||
int top,
|
|
||||||
int width,
|
|
||||||
int height);
|
|
||||||
|
|
||||||
CGImageLuminanceSource(CVPixelBufferRef buffer,
|
|
||||||
int left,
|
|
||||||
int top,
|
|
||||||
int width,
|
|
||||||
int height);
|
|
||||||
CGImageLuminanceSource(CVPixelBufferRef buffer);
|
|
||||||
|
|
||||||
CGImageLuminanceSource(CGImageRef image,
|
|
||||||
int left,
|
|
||||||
int top,
|
|
||||||
int width,
|
|
||||||
int height);
|
|
||||||
CGImageLuminanceSource(CGImageRef image);
|
|
||||||
~CGImageLuminanceSource();
|
|
||||||
|
|
||||||
CGImageRef image() { return image_; }
|
|
||||||
CGImageRef image(size_t width, size_t height);
|
|
||||||
|
|
||||||
unsigned char* getRow(int y, unsigned char* row);
|
|
||||||
unsigned char* getMatrix();
|
|
||||||
|
|
||||||
bool isRotateSupported() const {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
int getWidth() const {
|
|
||||||
return width_;
|
|
||||||
}
|
|
||||||
|
|
||||||
int getHeight() const {
|
|
||||||
return height_;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ref<LuminanceSource> rotateCounterClockwise();
|
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
void init(CGImageRef image);
|
|
||||||
void init(CGImageRef image, int left, int top, int width, int height);
|
|
||||||
};
|
|
||||||
|
|
||||||
} /* namespace */
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <zxing/CGImageLuminanceSource.h>
|
#import <ZXing/ZXCGImageLuminanceSource.h>
|
||||||
#include <zxing/common/IllegalArgumentException.h>
|
#include <zxing/common/IllegalArgumentException.h>
|
||||||
|
|
||||||
namespace zxing {
|
namespace zxing {
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/Binarizer.h>
|
#import <zxing/Binarizer.h>
|
||||||
#import <zxing/ZXLuminanceSource.h>
|
#import <ZXing/ZXLuminanceSource.h>
|
||||||
|
|
||||||
@interface ZXBinarizer : NSObject {
|
@interface ZXBinarizer : NSObject {
|
||||||
zxing::Ref<zxing::Binarizer> native;
|
zxing::Ref<zxing::Binarizer> native;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/ZXBinarizer.h>
|
#import <ZXing/ZXBinarizer.h>
|
||||||
|
|
||||||
#if TARGET_OS_EMBEDDED || TARGET_IPHONE_SIMULATOR
|
#if TARGET_OS_EMBEDDED || TARGET_IPHONE_SIMULATOR
|
||||||
#define ZXBlack [[UIColor blackColor] CGColor]
|
#define ZXBlack [[UIColor blackColor] CGColor]
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/ZXBinaryBitmap.h>
|
#import <ZXing/ZXBinaryBitmap.h>
|
||||||
#import <zxing/ZXBinarizer.h>
|
#import <ZXing/ZXBinarizer.h>
|
||||||
|
|
||||||
@implementation ZXBinaryBitmap
|
@implementation ZXBinaryBitmap
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,75 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/ZXLuminanceSource.h>
|
#import <ZXing/ZXLuminanceSource.h>
|
||||||
#import <zxing/CGImageLuminanceSource.h>
|
#import <CoreVideo/CoreVideo.h>
|
||||||
|
|
||||||
|
namespace zxing {
|
||||||
|
|
||||||
|
class CGImageLuminanceSource : public LuminanceSource {
|
||||||
|
|
||||||
|
private:
|
||||||
|
CGImageRef image_;
|
||||||
|
CFDataRef data_;
|
||||||
|
int left_;
|
||||||
|
int top_;
|
||||||
|
int width_;
|
||||||
|
int height_;
|
||||||
|
int dataWidth_;
|
||||||
|
int dataHeight_;
|
||||||
|
int bytesPerRow_;
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
static CGImageRef createImageFromBuffer(CVImageBufferRef);
|
||||||
|
static CGImageRef createImageFromBuffer(CVImageBufferRef,
|
||||||
|
int left,
|
||||||
|
int top,
|
||||||
|
int width,
|
||||||
|
int height);
|
||||||
|
|
||||||
|
CGImageLuminanceSource(CVPixelBufferRef buffer,
|
||||||
|
int left,
|
||||||
|
int top,
|
||||||
|
int width,
|
||||||
|
int height);
|
||||||
|
CGImageLuminanceSource(CVPixelBufferRef buffer);
|
||||||
|
|
||||||
|
CGImageLuminanceSource(CGImageRef image,
|
||||||
|
int left,
|
||||||
|
int top,
|
||||||
|
int width,
|
||||||
|
int height);
|
||||||
|
CGImageLuminanceSource(CGImageRef image);
|
||||||
|
~CGImageLuminanceSource();
|
||||||
|
|
||||||
|
CGImageRef image() { return image_; }
|
||||||
|
CGImageRef image(size_t width, size_t height);
|
||||||
|
|
||||||
|
unsigned char* getRow(int y, unsigned char* row);
|
||||||
|
unsigned char* getMatrix();
|
||||||
|
|
||||||
|
bool isRotateSupported() const {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
int getWidth() const {
|
||||||
|
return width_;
|
||||||
|
}
|
||||||
|
|
||||||
|
int getHeight() const {
|
||||||
|
return height_;
|
||||||
|
}
|
||||||
|
|
||||||
|
Ref<LuminanceSource> rotateCounterClockwise();
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
void init(CGImageRef image);
|
||||||
|
void init(CGImageRef image, int left, int top, int width, int height);
|
||||||
|
};
|
||||||
|
|
||||||
|
} /* namespace */
|
||||||
|
|
||||||
@class ZXImage;
|
@class ZXImage;
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/ZXCGImageLuminanceSource.h>
|
#import <ZXing/ZXCGImageLuminanceSource.h>
|
||||||
#import <zxing/ZXImage.h>
|
#import <ZXing/ZXImage.h>
|
||||||
|
|
||||||
@implementation ZXCGImageLuminanceSource
|
@implementation ZXCGImageLuminanceSource
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#define ZXCaptureDeviceInput AVCaptureDeviceInput
|
#define ZXCaptureDeviceInput AVCaptureDeviceInput
|
||||||
#define ZXCaptureVideoOutput AVCaptureVideoDataOutput
|
#define ZXCaptureVideoOutput AVCaptureVideoDataOutput
|
||||||
#else
|
#else
|
||||||
|
#import <QTKit/QTKit.h>
|
||||||
#define ZX(x) x
|
#define ZX(x) x
|
||||||
#define ZXAV(x)
|
#define ZXAV(x)
|
||||||
#define ZXAVC(x)
|
#define ZXAVC(x)
|
||||||
|
|
|
@ -15,17 +15,17 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <zxing/ZXCapture.h>
|
#include <ZXing/ZXCapture.h>
|
||||||
|
|
||||||
#if !TARGET_IPHONE_SIMULATOR
|
#if !TARGET_IPHONE_SIMULATOR
|
||||||
#include <zxing/ZXCGImageLuminanceSource.h>
|
#include <ZXing/ZXCGImageLuminanceSource.h>
|
||||||
#include <zxing/ZXHybridBinarizer.h>
|
#include <ZXing/ZXHybridBinarizer.h>
|
||||||
#include <zxing/ZXBinaryBitmap.h>
|
#include <ZXing/ZXBinaryBitmap.h>
|
||||||
#include <zxing/ZXQRCodeReader.h>
|
#include <ZXing/ZXQRCodeReader.h>
|
||||||
#include <zxing/ZXDecodeHints.h>
|
#include <ZXing/ZXDecodeHints.h>
|
||||||
#include <zxing/ZXResult.h>
|
#include <ZXing/ZXResult.h>
|
||||||
#include <zxing/ZXReaderException.h>
|
#include <ZXing/ZXReaderException.h>
|
||||||
#include <zxing/ZXIllegalArgumentException.h>
|
#include <ZXing/ZXIllegalArgumentException.h>
|
||||||
|
|
||||||
#if TARGET_OS_EMBEDDED || TARGET_IPHONE_SIMULATOR
|
#if TARGET_OS_EMBEDDED || TARGET_IPHONE_SIMULATOR
|
||||||
#define ZXCaptureDevice AVCaptureDevice
|
#define ZXCaptureDevice AVCaptureDevice
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <zxing/ZXView.h>
|
#include <ZXing/ZXView.h>
|
||||||
|
|
||||||
@interface ZXCaptureView : ZXView {
|
@interface ZXCaptureView : ZXView {
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <zxing/ZXCaptureView.h>
|
#include <ZXing/ZXCaptureView.h>
|
||||||
|
|
||||||
@implementation ZXCaptureView {
|
@implementation ZXCaptureView {
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/ZXDecodeHints.h>
|
#import <ZXing/ZXDecodeHints.h>
|
||||||
|
|
||||||
@implementation ZXDecodeHints
|
@implementation ZXDecodeHints
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/ZXBinarizer.h>
|
#import <ZXing/ZXBinarizer.h>
|
||||||
#import <zxing/common/HybridBinarizer.h>
|
#import <zxing/common/HybridBinarizer.h>
|
||||||
|
|
||||||
@interface ZXHybridBinarizer : ZXBinarizer {
|
@interface ZXHybridBinarizer : ZXBinarizer {
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/ZXHybridBinarizer.h>
|
#import <ZXing/ZXHybridBinarizer.h>
|
||||||
|
|
||||||
@implementation ZXHybridBinarizer
|
@implementation ZXHybridBinarizer
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/ZXIllegalArgumentException.h>
|
#import <ZXing/ZXIllegalArgumentException.h>
|
||||||
|
|
||||||
@implementation ZXIllegalArgumentException {
|
@implementation ZXIllegalArgumentException {
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/ZXImage.h>
|
#import <ZXing/ZXImage.h>
|
||||||
|
|
||||||
@implementation ZXImage
|
@implementation ZXImage
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/ZXLuminanceSource.h>
|
#import <ZXing/ZXLuminanceSource.h>
|
||||||
|
|
||||||
@implementation ZXLuminanceSource
|
@implementation ZXLuminanceSource
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/ZXReader.h>
|
#import <ZXing/ZXReader.h>
|
||||||
|
|
||||||
@interface ZXMultiFormatReader : ZXReader {
|
@interface ZXMultiFormatReader : ZXReader {
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/MultiFormatReader.h>
|
#import <zxing/MultiFormatReader.h>
|
||||||
#import <zxing/ZXMultiFormatReader.h>
|
#import <ZXing/ZXMultiFormatReader.h>
|
||||||
|
|
||||||
@implementation ZXMultiFormatReader
|
@implementation ZXMultiFormatReader
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/ZXReader.h>
|
#import <ZXing/ZXReader.h>
|
||||||
|
|
||||||
@interface ZXQRCodeReader : ZXReader {
|
@interface ZXQRCodeReader : ZXReader {
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/qrcode/QRCodeReader.h>
|
#import <zxing/qrcode/QRCodeReader.h>
|
||||||
#import <zxing/ZXQRCodeReader.h>
|
#import <ZXing/ZXQRCodeReader.h>
|
||||||
|
|
||||||
@implementation ZXQRCodeReader
|
@implementation ZXQRCodeReader
|
||||||
|
|
||||||
|
|
|
@ -15,14 +15,14 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/ZXReader.h>
|
#import <ZXing/ZXReader.h>
|
||||||
#import <zxing/ZXResult.h>
|
#import <ZXing/ZXResult.h>
|
||||||
#import <zxing/ZXBinaryBitmap.h>
|
#import <ZXing/ZXBinaryBitmap.h>
|
||||||
#import <zxing/ZXDecodeHints.h>
|
#import <ZXing/ZXDecodeHints.h>
|
||||||
#import <zxing/ReaderException.h>
|
#import <zxing/ReaderException.h>
|
||||||
#import <zxing/ZXReaderException.h>
|
#import <ZXing/ZXReaderException.h>
|
||||||
#import <zxing/common/IllegalArgumentException.h>
|
#import <zxing/common/IllegalArgumentException.h>
|
||||||
#import <zxing/ZXIllegalArgumentException.h>
|
#import <ZXing/ZXIllegalArgumentException.h>
|
||||||
|
|
||||||
@implementation ZXReader
|
@implementation ZXReader
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/ZXReaderException.h>
|
#import <ZXing/ZXReaderException.h>
|
||||||
|
|
||||||
@implementation ZXReaderException {
|
@implementation ZXReaderException {
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <zxing/ZXResult.h>
|
#import <ZXing/ZXResult.h>
|
||||||
|
|
||||||
@implementation ZXResult
|
@implementation ZXResult
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue