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__
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AppKit/AppKit.h>
|
||||
#import <QTKit/QTKit.h>
|
||||
#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.
|
||||
*/
|
||||
|
||||
#include <zxing/CGImageLuminanceSource.h>
|
||||
#import <ZXing/ZXCGImageLuminanceSource.h>
|
||||
#include <zxing/common/IllegalArgumentException.h>
|
||||
|
||||
namespace zxing {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
#import <zxing/Binarizer.h>
|
||||
#import <zxing/ZXLuminanceSource.h>
|
||||
#import <ZXing/ZXLuminanceSource.h>
|
||||
|
||||
@interface ZXBinarizer : NSObject {
|
||||
zxing::Ref<zxing::Binarizer> native;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#import <zxing/ZXBinarizer.h>
|
||||
#import <ZXing/ZXBinarizer.h>
|
||||
|
||||
#if TARGET_OS_EMBEDDED || TARGET_IPHONE_SIMULATOR
|
||||
#define ZXBlack [[UIColor blackColor] CGColor]
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#import <zxing/ZXBinaryBitmap.h>
|
||||
#import <zxing/ZXBinarizer.h>
|
||||
#import <ZXing/ZXBinaryBitmap.h>
|
||||
#import <ZXing/ZXBinarizer.h>
|
||||
|
||||
@implementation ZXBinaryBitmap
|
||||
|
||||
|
|
|
@ -15,8 +15,75 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#import <zxing/ZXLuminanceSource.h>
|
||||
#import <zxing/CGImageLuminanceSource.h>
|
||||
#import <ZXing/ZXLuminanceSource.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;
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#import <zxing/ZXCGImageLuminanceSource.h>
|
||||
#import <zxing/ZXImage.h>
|
||||
#import <ZXing/ZXCGImageLuminanceSource.h>
|
||||
#import <ZXing/ZXImage.h>
|
||||
|
||||
@implementation ZXCGImageLuminanceSource
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#define ZXCaptureDeviceInput AVCaptureDeviceInput
|
||||
#define ZXCaptureVideoOutput AVCaptureVideoDataOutput
|
||||
#else
|
||||
#import <QTKit/QTKit.h>
|
||||
#define ZX(x) x
|
||||
#define ZXAV(x)
|
||||
#define ZXAVC(x)
|
||||
|
|
|
@ -15,17 +15,17 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <zxing/ZXCapture.h>
|
||||
#include <ZXing/ZXCapture.h>
|
||||
|
||||
#if !TARGET_IPHONE_SIMULATOR
|
||||
#include <zxing/ZXCGImageLuminanceSource.h>
|
||||
#include <zxing/ZXHybridBinarizer.h>
|
||||
#include <zxing/ZXBinaryBitmap.h>
|
||||
#include <zxing/ZXQRCodeReader.h>
|
||||
#include <zxing/ZXDecodeHints.h>
|
||||
#include <zxing/ZXResult.h>
|
||||
#include <zxing/ZXReaderException.h>
|
||||
#include <zxing/ZXIllegalArgumentException.h>
|
||||
#include <ZXing/ZXCGImageLuminanceSource.h>
|
||||
#include <ZXing/ZXHybridBinarizer.h>
|
||||
#include <ZXing/ZXBinaryBitmap.h>
|
||||
#include <ZXing/ZXQRCodeReader.h>
|
||||
#include <ZXing/ZXDecodeHints.h>
|
||||
#include <ZXing/ZXResult.h>
|
||||
#include <ZXing/ZXReaderException.h>
|
||||
#include <ZXing/ZXIllegalArgumentException.h>
|
||||
|
||||
#if TARGET_OS_EMBEDDED || TARGET_IPHONE_SIMULATOR
|
||||
#define ZXCaptureDevice AVCaptureDevice
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <zxing/ZXView.h>
|
||||
#include <ZXing/ZXView.h>
|
||||
|
||||
@interface ZXCaptureView : ZXView {
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <zxing/ZXCaptureView.h>
|
||||
#include <ZXing/ZXCaptureView.h>
|
||||
|
||||
@implementation ZXCaptureView {
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#import <zxing/ZXDecodeHints.h>
|
||||
#import <ZXing/ZXDecodeHints.h>
|
||||
|
||||
@implementation ZXDecodeHints
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#import <zxing/ZXBinarizer.h>
|
||||
#import <ZXing/ZXBinarizer.h>
|
||||
#import <zxing/common/HybridBinarizer.h>
|
||||
|
||||
@interface ZXHybridBinarizer : ZXBinarizer {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#import <zxing/ZXHybridBinarizer.h>
|
||||
#import <ZXing/ZXHybridBinarizer.h>
|
||||
|
||||
@implementation ZXHybridBinarizer
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#import <zxing/ZXIllegalArgumentException.h>
|
||||
#import <ZXing/ZXIllegalArgumentException.h>
|
||||
|
||||
@implementation ZXIllegalArgumentException {
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#import <zxing/ZXImage.h>
|
||||
#import <ZXing/ZXImage.h>
|
||||
|
||||
@implementation ZXImage
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#import <zxing/ZXLuminanceSource.h>
|
||||
#import <ZXing/ZXLuminanceSource.h>
|
||||
|
||||
@implementation ZXLuminanceSource
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#import <zxing/ZXReader.h>
|
||||
#import <ZXing/ZXReader.h>
|
||||
|
||||
@interface ZXMultiFormatReader : ZXReader {
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
#import <zxing/MultiFormatReader.h>
|
||||
#import <zxing/ZXMultiFormatReader.h>
|
||||
#import <ZXing/ZXMultiFormatReader.h>
|
||||
|
||||
@implementation ZXMultiFormatReader
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#import <zxing/ZXReader.h>
|
||||
#import <ZXing/ZXReader.h>
|
||||
|
||||
@interface ZXQRCodeReader : ZXReader {
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
#import <zxing/qrcode/QRCodeReader.h>
|
||||
#import <zxing/ZXQRCodeReader.h>
|
||||
#import <ZXing/ZXQRCodeReader.h>
|
||||
|
||||
@implementation ZXQRCodeReader
|
||||
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#import <zxing/ZXReader.h>
|
||||
#import <zxing/ZXResult.h>
|
||||
#import <zxing/ZXBinaryBitmap.h>
|
||||
#import <zxing/ZXDecodeHints.h>
|
||||
#import <ZXing/ZXReader.h>
|
||||
#import <ZXing/ZXResult.h>
|
||||
#import <ZXing/ZXBinaryBitmap.h>
|
||||
#import <ZXing/ZXDecodeHints.h>
|
||||
#import <zxing/ReaderException.h>
|
||||
#import <zxing/ZXReaderException.h>
|
||||
#import <ZXing/ZXReaderException.h>
|
||||
#import <zxing/common/IllegalArgumentException.h>
|
||||
#import <zxing/ZXIllegalArgumentException.h>
|
||||
#import <ZXing/ZXIllegalArgumentException.h>
|
||||
|
||||
@implementation ZXReader
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#import <zxing/ZXReaderException.h>
|
||||
#import <ZXing/ZXReaderException.h>
|
||||
|
||||
@implementation ZXReaderException {
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#import <zxing/ZXResult.h>
|
||||
#import <ZXing/ZXResult.h>
|
||||
|
||||
@implementation ZXResult
|
||||
|
||||
|
|
Loading…
Reference in a new issue