mirror of
https://github.com/zxing/zxing.git
synced 2024-11-10 04:54:04 -08:00
new project files for cpp and objc, new sample apps for objc
git-svn-id: https://zxing.googlecode.com/svn/trunk@2313 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
bc4f114985
commit
57b62766c6
|
@ -41,16 +41,18 @@ void ReedSolomonDecoder::decode(ArrayRef<int> received, int twoS) {
|
|||
Ref<GenericGFPoly> poly(new GenericGFPoly(field, received));
|
||||
|
||||
|
||||
/*
|
||||
#ifdef DEBUG
|
||||
cout << "decoding with poly " << *poly << "\n";
|
||||
cout << "decoding with poly " << *poly << endl;
|
||||
#endif
|
||||
*/
|
||||
|
||||
ArrayRef<int> syndromeCoefficients(new Array<int> (twoS));
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
cout << "syndromeCoefficients array = " <<
|
||||
syndromeCoefficients.array_ << "\n";
|
||||
syndromeCoefficients.array_ << endl;
|
||||
#endif
|
||||
|
||||
bool dataMatrix = (field.object_ == GenericGF::DATA_MATRIX_FIELD_256.object_);
|
||||
|
@ -139,12 +141,14 @@ vector<Ref<GenericGFPoly> > ReedSolomonDecoder::runEuclideanAlgorithm(Ref<Generi
|
|||
Ref<GenericGFPoly> omega(r->multiply(inverse));
|
||||
|
||||
|
||||
/*
|
||||
#ifdef DEBUG
|
||||
cout << "t = " << *t << "\n";
|
||||
cout << "t = " << *t << endl;
|
||||
cout << "r = " << *r << "\n";
|
||||
cout << "sigma = " << *sigma << "\n";
|
||||
cout << "omega = " << *omega << "\n";
|
||||
cout << "sigma = " << *sigma << endl;
|
||||
cout << "omega = " << *omega << endl;
|
||||
#endif
|
||||
*/
|
||||
|
||||
vector<Ref<GenericGFPoly> > result(2);
|
||||
result[0] = sigma;
|
||||
|
@ -163,7 +167,7 @@ ArrayRef<int> ReedSolomonDecoder::findErrorLocations(Ref<GenericGFPoly> errorLoc
|
|||
ArrayRef<int> result(new Array<int>(numErrors));
|
||||
int e = 0;
|
||||
for (int i = 1; i < field->getSize() && e < numErrors; i++) {
|
||||
// cout << "errorLocator(" << i << ") == " << errorLocator->evaluateAt(i) << "\n";
|
||||
// cout << "errorLocator(" << i << ") == " << errorLocator->evaluateAt(i) << endl;
|
||||
if (errorLocator->evaluateAt(i) == 0) {
|
||||
result[e] = field->inverse(i);
|
||||
e++;
|
||||
|
|
1101
cpp/zxing-cpp.xcodeproj/project.pbxproj
Normal file
1101
cpp/zxing-cpp.xcodeproj/project.pbxproj
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,4 @@
|
|||
No docs at this point but there's an example macruby app at
|
||||
https://github.com/smparkes/zxing.app and a cocoa example (moderately
|
||||
modified) at https://github.com/smparkes/zxing-objc-demo-app.
|
||||
No docs at this point.
|
||||
|
||||
There are examples in examples directory and also a macruby example at
|
||||
https://github.com/smparkes/zxing.app.
|
||||
|
|
411
objc/examples/ios/bare/bare.xcodeproj/project.pbxproj
Normal file
411
objc/examples/ios/bare/bare.xcodeproj/project.pbxproj
Normal file
|
@ -0,0 +1,411 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
3B1C7FA3159168AF0074F246 /* libzxing-objc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BA9968315913CE50056A230 /* libzxing-objc.a */; };
|
||||
3BA99657159122210056A230 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BA99656159122210056A230 /* UIKit.framework */; };
|
||||
3BA99659159122210056A230 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BA99658159122210056A230 /* Foundation.framework */; };
|
||||
3BA9965B159122210056A230 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BA9965A159122210056A230 /* CoreGraphics.framework */; };
|
||||
3BA99661159122210056A230 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3BA9965F159122210056A230 /* InfoPlist.strings */; };
|
||||
3BA99667159122210056A230 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BA99666159122210056A230 /* AppDelegate.m */; };
|
||||
3BA9966A159122210056A230 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BA99669159122210056A230 /* ViewController.m */; };
|
||||
3BA9966D159122210056A230 /* ViewController_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3BA9966B159122210056A230 /* ViewController_iPhone.xib */; };
|
||||
3BA99670159122210056A230 /* ViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3BA9966E159122210056A230 /* ViewController_iPad.xib */; };
|
||||
3BA9968C15913D0D0056A230 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BA9968B15913D0D0056A230 /* AVFoundation.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
3BA9968E15913D4A0056A230 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BA9968D15913D4A0056A230 /* CoreVideo.framework */; };
|
||||
3BA9969015913D730056A230 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BA9968F15913D730056A230 /* QuartzCore.framework */; };
|
||||
3BA9969415913DCE0056A230 /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BA9969315913DCE0056A230 /* libiconv.dylib */; };
|
||||
3BA9969615913DFB0056A230 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BA9969515913DFB0056A230 /* CoreMedia.framework */; };
|
||||
3BA996C5159165330056A230 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3BA996C4159165330056A230 /* main.mm */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
3BA9968215913CE50056A230 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 3BA9967615913CE40056A230 /* zxing-objc.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 3B83EB25158E6C5100A3B31F;
|
||||
remoteInfo = "zxing-objc";
|
||||
};
|
||||
3BA9968415913CE50056A230 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 3BA9967615913CE40056A230 /* zxing-objc.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 3B83EB90158E71AD00A3B31F;
|
||||
remoteInfo = "zxing-objc-framework";
|
||||
};
|
||||
3BA9968815913CEB0056A230 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 3BA9967615913CE40056A230 /* zxing-objc.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 3B83EB24158E6C5100A3B31F;
|
||||
remoteInfo = "zxing-objc";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
3BA99652159122210056A230 /* bare.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = bare.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3BA99656159122210056A230 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
3BA99658159122210056A230 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
3BA9965A159122210056A230 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
3BA9965E159122210056A230 /* bare-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "bare-Info.plist"; sourceTree = "<group>"; };
|
||||
3BA99660159122210056A230 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
3BA99664159122210056A230 /* bare-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "bare-Prefix.pch"; sourceTree = "<group>"; };
|
||||
3BA99665159122210056A230 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
3BA99666159122210056A230 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||
3BA99668159122210056A230 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
|
||||
3BA99669159122210056A230 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
|
||||
3BA9966C159122210056A230 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController_iPhone.xib; sourceTree = "<group>"; };
|
||||
3BA9966F159122210056A230 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController_iPad.xib; sourceTree = "<group>"; };
|
||||
3BA9967615913CE40056A230 /* zxing-objc.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "zxing-objc.xcodeproj"; path = "../../../zxing-objc.xcodeproj"; sourceTree = "<group>"; };
|
||||
3BA9968B15913D0D0056A230 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
|
||||
3BA9968D15913D4A0056A230 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
|
||||
3BA9968F15913D730056A230 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
3BA9969315913DCE0056A230 /* libiconv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libiconv.dylib; path = usr/lib/libiconv.dylib; sourceTree = SDKROOT; };
|
||||
3BA9969515913DFB0056A230 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
|
||||
3BA996C4159165330056A230 /* main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
3BA9964F159122210056A230 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3B1C7FA3159168AF0074F246 /* libzxing-objc.a in Frameworks */,
|
||||
3BA9969615913DFB0056A230 /* CoreMedia.framework in Frameworks */,
|
||||
3BA9969415913DCE0056A230 /* libiconv.dylib in Frameworks */,
|
||||
3BA9969015913D730056A230 /* QuartzCore.framework in Frameworks */,
|
||||
3BA9968E15913D4A0056A230 /* CoreVideo.framework in Frameworks */,
|
||||
3BA9968C15913D0D0056A230 /* AVFoundation.framework in Frameworks */,
|
||||
3BA99657159122210056A230 /* UIKit.framework in Frameworks */,
|
||||
3BA99659159122210056A230 /* Foundation.framework in Frameworks */,
|
||||
3BA9965B159122210056A230 /* CoreGraphics.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
3BA99647159122210056A230 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3BA9967615913CE40056A230 /* zxing-objc.xcodeproj */,
|
||||
3BA9965C159122210056A230 /* bare */,
|
||||
3BA99655159122210056A230 /* Frameworks */,
|
||||
3BA99653159122210056A230 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3BA99653159122210056A230 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3BA99652159122210056A230 /* bare.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3BA99655159122210056A230 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3BA9969515913DFB0056A230 /* CoreMedia.framework */,
|
||||
3BA9969315913DCE0056A230 /* libiconv.dylib */,
|
||||
3BA9968F15913D730056A230 /* QuartzCore.framework */,
|
||||
3BA9968D15913D4A0056A230 /* CoreVideo.framework */,
|
||||
3BA9968B15913D0D0056A230 /* AVFoundation.framework */,
|
||||
3BA99656159122210056A230 /* UIKit.framework */,
|
||||
3BA99658159122210056A230 /* Foundation.framework */,
|
||||
3BA9965A159122210056A230 /* CoreGraphics.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3BA9965C159122210056A230 /* bare */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3BA99665159122210056A230 /* AppDelegate.h */,
|
||||
3BA99666159122210056A230 /* AppDelegate.m */,
|
||||
3BA99668159122210056A230 /* ViewController.h */,
|
||||
3BA99669159122210056A230 /* ViewController.m */,
|
||||
3BA9966B159122210056A230 /* ViewController_iPhone.xib */,
|
||||
3BA9966E159122210056A230 /* ViewController_iPad.xib */,
|
||||
3BA9965D159122210056A230 /* Supporting Files */,
|
||||
);
|
||||
path = bare;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3BA9965D159122210056A230 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3BA9965E159122210056A230 /* bare-Info.plist */,
|
||||
3BA9965F159122210056A230 /* InfoPlist.strings */,
|
||||
3BA996C4159165330056A230 /* main.mm */,
|
||||
3BA99664159122210056A230 /* bare-Prefix.pch */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3BA9967715913CE40056A230 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3BA9968315913CE50056A230 /* libzxing-objc.a */,
|
||||
3BA9968515913CE50056A230 /* zxing-objc-framework.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
3BA99651159122210056A230 /* bare */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3BA99673159122210056A230 /* Build configuration list for PBXNativeTarget "bare" */;
|
||||
buildPhases = (
|
||||
3BA9964E159122210056A230 /* Sources */,
|
||||
3BA9964F159122210056A230 /* Frameworks */,
|
||||
3BA99650159122210056A230 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
3BA9968915913CEB0056A230 /* PBXTargetDependency */,
|
||||
);
|
||||
name = bare;
|
||||
productName = bare;
|
||||
productReference = 3BA99652159122210056A230 /* bare.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
3BA99649159122210056A230 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0430;
|
||||
};
|
||||
buildConfigurationList = 3BA9964C159122210056A230 /* Build configuration list for PBXProject "bare" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 3BA99647159122210056A230;
|
||||
productRefGroup = 3BA99653159122210056A230 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
{
|
||||
ProductGroup = 3BA9967715913CE40056A230 /* Products */;
|
||||
ProjectRef = 3BA9967615913CE40056A230 /* zxing-objc.xcodeproj */;
|
||||
},
|
||||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
3BA99651159122210056A230 /* bare */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXReferenceProxy section */
|
||||
3BA9968315913CE50056A230 /* libzxing-objc.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libzxing-objc.a";
|
||||
remoteRef = 3BA9968215913CE50056A230 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
3BA9968515913CE50056A230 /* zxing-objc-framework.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = "zxing-objc-framework.framework";
|
||||
remoteRef = 3BA9968415913CE50056A230 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
3BA99650159122210056A230 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3BA99661159122210056A230 /* InfoPlist.strings in Resources */,
|
||||
3BA9966D159122210056A230 /* ViewController_iPhone.xib in Resources */,
|
||||
3BA99670159122210056A230 /* ViewController_iPad.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
3BA9964E159122210056A230 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3BA99667159122210056A230 /* AppDelegate.m in Sources */,
|
||||
3BA9966A159122210056A230 /* ViewController.m in Sources */,
|
||||
3BA996C5159165330056A230 /* main.mm in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
3BA9968915913CEB0056A230 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = "zxing-objc";
|
||||
targetProxy = 3BA9968815913CEB0056A230 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
3BA9965F159122210056A230 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
3BA99660159122210056A230 /* en */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3BA9966B159122210056A230 /* ViewController_iPhone.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
3BA9966C159122210056A230 /* en */,
|
||||
);
|
||||
name = ViewController_iPhone.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3BA9966E159122210056A230 /* ViewController_iPad.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
3BA9966F159122210056A230 /* en */,
|
||||
);
|
||||
name = ViewController_iPad.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
3BA99671159122210056A230 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = (
|
||||
armv7,
|
||||
armv6,
|
||||
);
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 4.2;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
WARNING_CFLAGS = "-Wall";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3BA99672159122210056A230 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = (
|
||||
armv7,
|
||||
armv6,
|
||||
);
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 4.2;
|
||||
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
WARNING_CFLAGS = "-Wall";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3BA99674159122210056A230 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "bare/bare-Prefix.pch";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
objc/cpp/core/src,
|
||||
objc/src,
|
||||
);
|
||||
INFOPLIST_FILE = "bare/bare-Info.plist";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/../../../../../../Library/Developer/Xcode/DerivedData/bare-ceenmvkaxbzcsubayrtaunypjmgx/Build/Products/Debug-iphoneos\"",
|
||||
);
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3BA99675159122210056A230 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "bare/bare-Prefix.pch";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
objc/cpp/core/src,
|
||||
objc/src,
|
||||
);
|
||||
INFOPLIST_FILE = "bare/bare-Info.plist";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SRCROOT)/../../../../../../Library/Developer/Xcode/DerivedData/bare-ceenmvkaxbzcsubayrtaunypjmgx/Build/Products/Debug-iphoneos\"",
|
||||
);
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
3BA9964C159122210056A230 /* Build configuration list for PBXProject "bare" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3BA99671159122210056A230 /* Debug */,
|
||||
3BA99672159122210056A230 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
3BA99673159122210056A230 /* Build configuration list for PBXNativeTarget "bare" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3BA99674159122210056A230 /* Debug */,
|
||||
3BA99675159122210056A230 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 3BA99649159122210056A230 /* Project object */;
|
||||
}
|
19
objc/examples/ios/bare/bare/AppDelegate.h
Normal file
19
objc/examples/ios/bare/bare/AppDelegate.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// AppDelegate.h
|
||||
// bare
|
||||
//
|
||||
// Created by Steven Parkes on 6/19/12.
|
||||
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@class ViewController;
|
||||
|
||||
@interface AppDelegate : UIResponder <UIApplicationDelegate>
|
||||
|
||||
@property (strong, nonatomic) UIWindow *window;
|
||||
|
||||
@property (strong, nonatomic) ViewController *viewController;
|
||||
|
||||
@end
|
62
objc/examples/ios/bare/bare/AppDelegate.m
Normal file
62
objc/examples/ios/bare/bare/AppDelegate.m
Normal file
|
@ -0,0 +1,62 @@
|
|||
//
|
||||
// AppDelegate.m
|
||||
// bare
|
||||
//
|
||||
// Created by Steven Parkes on 6/19/12.
|
||||
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
#import "ViewController.h"
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
@synthesize window = _window;
|
||||
@synthesize viewController = _viewController;
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[_window release];
|
||||
[_viewController release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
|
||||
// Override point for customization after application launch.
|
||||
self.viewController = [[[ViewController alloc] init] autorelease];
|
||||
self.window.rootViewController = self.viewController;
|
||||
[self.window makeKeyAndVisible];
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)applicationWillResignActive:(UIApplication *)application
|
||||
{
|
||||
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
|
||||
}
|
||||
|
||||
- (void)applicationDidEnterBackground:(UIApplication *)application
|
||||
{
|
||||
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application
|
||||
{
|
||||
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
|
||||
}
|
||||
|
||||
- (void)applicationDidBecomeActive:(UIApplication *)application
|
||||
{
|
||||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application
|
||||
{
|
||||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
||||
}
|
||||
|
||||
@end
|
27
objc/examples/ios/bare/bare/ViewController.h
Normal file
27
objc/examples/ios/bare/bare/ViewController.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
|
||||
/*
|
||||
* Copyright 2011 ZXing authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <ZXing/ZXCaptureDelegate.h>
|
||||
|
||||
@class ZXCapture;
|
||||
|
||||
@interface ViewController : UIViewController <ZXCaptureDelegate> {
|
||||
ZXCapture* capture;
|
||||
UIButton* swap;
|
||||
}
|
||||
@end
|
145
objc/examples/ios/bare/bare/ViewController.m
Normal file
145
objc/examples/ios/bare/bare/ViewController.m
Normal file
|
@ -0,0 +1,145 @@
|
|||
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
|
||||
/*
|
||||
* Copyright 2011 ZXing authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#import "ViewController.h"
|
||||
#import <QuartzCore/QuartzCore.h> // seems not included by default in the sim
|
||||
#import <ZXing/ZXCapture.h>
|
||||
#import <ZXing/ZXResult.h>
|
||||
|
||||
@interface View : UIView @end
|
||||
@implementation View
|
||||
- (CALayer*)capture_layer {
|
||||
return [[self.layer sublayers] objectAtIndex:0];
|
||||
}
|
||||
- (UIView*)swap_view {
|
||||
if ([[self subviews] count]) {
|
||||
return [[self subviews] objectAtIndex:0];
|
||||
} else {
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
- (void)layoutSubviews {
|
||||
[super layoutSubviews];
|
||||
CGRect bounds = self.bounds;
|
||||
self.capture_layer.frame = bounds;
|
||||
CGRect frame = self.swap_view.bounds;
|
||||
frame.origin.x = bounds.size.width - frame.size.width - 10;
|
||||
frame.origin.y = 10;
|
||||
self.swap_view.frame = frame;
|
||||
}
|
||||
@end
|
||||
|
||||
@interface ViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation ViewController
|
||||
|
||||
- (void)dealloc {
|
||||
[swap release];
|
||||
[capture release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (ZXCapture*)capture {
|
||||
if (!capture) {
|
||||
capture = [[ZXCapture alloc] init];
|
||||
capture.delegate = self;
|
||||
}
|
||||
return capture;
|
||||
}
|
||||
|
||||
- (void)loadView {
|
||||
self.view = [[[View alloc] init] autorelease];
|
||||
[self.view.layer addSublayer:self.capture.layer];
|
||||
if (!swap && self.capture.hasFront && self.capture.hasBack) {
|
||||
swap = [UIButton buttonWithType:UIButtonTypeRoundedRect];
|
||||
[swap setTitle:@"swap" forState:UIControlStateNormal];
|
||||
[swap sizeToFit];
|
||||
[swap addTarget:self action:@selector(swap) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
// NSLog(@"%@", swap);
|
||||
[self.view addSubview:swap];
|
||||
[self.capture start];
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
|
||||
CGAffineTransform t = CGAffineTransformIdentity;
|
||||
CGSize size = self.capture.layer.bounds.size;
|
||||
(void)size;
|
||||
switch(toInterfaceOrientation) {
|
||||
case UIInterfaceOrientationPortraitUpsideDown:
|
||||
t = CGAffineTransformMakeRotation(M_PI);
|
||||
break;
|
||||
|
||||
case UIInterfaceOrientationLandscapeLeft:
|
||||
t = CGAffineTransformMakeRotation(M_PI/2);
|
||||
break;
|
||||
|
||||
case UIInterfaceOrientationLandscapeRight:
|
||||
t = CGAffineTransformMakeRotation(-M_PI/2);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (self.capture.camera == self.capture.front) {
|
||||
t.a = -t.a;
|
||||
}
|
||||
self.capture.layer.affineTransform = t;
|
||||
[self.view setNeedsLayout];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
if (swap && !swap.window) {
|
||||
[swap release];
|
||||
swap = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)swap {
|
||||
self.capture.camera =
|
||||
self.capture.camera == self.capture.front ?
|
||||
self.capture.back : self.capture.front;
|
||||
}
|
||||
|
||||
- (void)captureResult:(ZXCapture*)capture result:(ZXResult*)result {
|
||||
// NSLog(@"%@", result.text);
|
||||
UILabel* label = [[[UILabel alloc] init] autorelease];
|
||||
label.font = [UIFont systemFontOfSize:36];
|
||||
label.text = result.text;
|
||||
label.textColor = [UIColor yellowColor];
|
||||
label.backgroundColor =
|
||||
[[UIColor blackColor] colorWithAlphaComponent:0.5];
|
||||
[label sizeToFit];
|
||||
label.center = CGPointMake(self.view.bounds.size.width/2,
|
||||
self.view.bounds.size.height/2);
|
||||
[self.view addSubview:label];
|
||||
[UIView beginAnimations:nil context:NULL];
|
||||
[UIView setAnimationDuration:1.0];
|
||||
[UIView setAnimationDelegate:label];
|
||||
[UIView setAnimationDidStopSelector:@selector(removeFromSuperview)];
|
||||
label.alpha = 0;
|
||||
[UIView commitAnimations];
|
||||
}
|
||||
|
||||
@end
|
43
objc/examples/ios/bare/bare/bare-Info.plist
Normal file
43
objc/examples/ios/bare/bare/bare-Info.plist
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>zxing.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array/>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
14
objc/examples/ios/bare/bare/bare-Prefix.pch
Normal file
14
objc/examples/ios/bare/bare/bare-Prefix.pch
Normal file
|
@ -0,0 +1,14 @@
|
|||
//
|
||||
// Prefix header for all source files of the 'bare' target in the 'bare' project
|
||||
//
|
||||
|
||||
#import <Availability.h>
|
||||
|
||||
#ifndef __IPHONE_4_0
|
||||
#warning "This project uses features only available in iOS SDK 4.0 and later."
|
||||
#endif
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
2
objc/examples/ios/bare/bare/en.lproj/InfoPlist.strings
Normal file
2
objc/examples/ios/bare/bare/en.lproj/InfoPlist.strings
Normal file
|
@ -0,0 +1,2 @@
|
|||
/* Localized versions of Info.plist keys */
|
||||
|
120
objc/examples/ios/bare/bare/en.lproj/ViewController_iPad.xib
Normal file
120
objc/examples/ios/bare/bare/en.lproj/ViewController_iPad.xib
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1280</int>
|
||||
<string key="IBDocument.SystemVersion">11C25</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">1919</string>
|
||||
<string key="IBDocument.AppKitVersion">1138.11</string>
|
||||
<string key="IBDocument.HIToolboxVersion">566.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">916</string>
|
||||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>IBProxyObject</string>
|
||||
<string>IBUIView</string>
|
||||
</array>
|
||||
<array key="IBDocument.PluginDependencies">
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</array>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<object class="IBProxyObject" id="841351856">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="606714003">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
</object>
|
||||
<object class="IBUIView" id="766721923">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{0, 20}, {768, 1004}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
<object class="NSColorSpace" key="NSCustomColorSpace">
|
||||
<int key="NSID">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
|
||||
<int key="IBUIStatusBarStyle">2</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<array class="NSMutableArray" key="connectionRecords">
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">view</string>
|
||||
<reference key="source" ref="841351856"/>
|
||||
<reference key="destination" ref="766721923"/>
|
||||
</object>
|
||||
<int key="connectionID">3</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<array key="object" id="0"/>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="841351856"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="606714003"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">2</int>
|
||||
<reference key="object" ref="766721923"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">ViewController</string>
|
||||
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="-2.CustomClassName">UIResponder</string>
|
||||
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">3</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">ViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/ViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<string key="IBCocoaTouchPluginVersion">916</string>
|
||||
</data>
|
||||
</archive>
|
119
objc/examples/ios/bare/bare/en.lproj/ViewController_iPhone.xib
Normal file
119
objc/examples/ios/bare/bare/en.lproj/ViewController_iPhone.xib
Normal file
|
@ -0,0 +1,119 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1280</int>
|
||||
<string key="IBDocument.SystemVersion">11C25</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">1919</string>
|
||||
<string key="IBDocument.AppKitVersion">1138.11</string>
|
||||
<string key="IBDocument.HIToolboxVersion">566.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">916</string>
|
||||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>IBProxyObject</string>
|
||||
<string>IBUIView</string>
|
||||
</array>
|
||||
<array key="IBDocument.PluginDependencies">
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</array>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<object class="IBProxyObject" id="372490531">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="843779117">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIView" id="774585933">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC43NQA</bytes>
|
||||
<object class="NSColorSpace" key="NSCustomColorSpace">
|
||||
<int key="NSID">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<array class="NSMutableArray" key="connectionRecords">
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">view</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="774585933"/>
|
||||
</object>
|
||||
<int key="connectionID">7</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<array key="object" id="0"/>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="372490531"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="843779117"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">6</int>
|
||||
<reference key="object" ref="774585933"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">ViewController</string>
|
||||
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="-2.CustomClassName">UIResponder</string>
|
||||
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">7</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">ViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/ViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<string key="IBCocoaTouchPluginVersion">916</string>
|
||||
</data>
|
||||
</archive>
|
27
objc/examples/ios/bare/bare/main.mm
Normal file
27
objc/examples/ios/bare/bare/main.mm
Normal file
|
@ -0,0 +1,27 @@
|
|||
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
|
||||
/*
|
||||
* Copyright 2011 ZXing authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
|
||||
}
|
||||
}
|
1
objc/examples/ios/bare/objc
Symbolic link
1
objc/examples/ios/bare/objc
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../../objc
|
354
objc/examples/osx/bare/bare.xcodeproj/project.pbxproj
Normal file
354
objc/examples/osx/bare/bare.xcodeproj/project.pbxproj
Normal file
|
@ -0,0 +1,354 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
3B5D0F191590F12B00C33931 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B5D0F181590F12B00C33931 /* Cocoa.framework */; };
|
||||
3B5D0F251590F12B00C33931 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B5D0F241590F12B00C33931 /* main.mm */; };
|
||||
3B5D0F2C1590F12C00C33931 /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B5D0F2B1590F12C00C33931 /* AppDelegate.mm */; };
|
||||
3B5D0F541590F31A00C33931 /* zxing-objc-framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B5D0F3E1590F2C400C33931 /* zxing-objc-framework.framework */; };
|
||||
3B5D0F641590FF2E00C33931 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B5D0F631590FF2E00C33931 /* QuartzCore.framework */; };
|
||||
3B5D0F66159100A700C33931 /* zxing-objc-framework.framework in Copy Files */ = {isa = PBXBuildFile; fileRef = 3B5D0F3E1590F2C400C33931 /* zxing-objc-framework.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
3B5D0F3B1590F2C400C33931 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 3B5D0F351590F2C400C33931 /* zxing-objc.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 3B83EB25158E6C5100A3B31F;
|
||||
remoteInfo = "zxing-objc";
|
||||
};
|
||||
3B5D0F3D1590F2C400C33931 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 3B5D0F351590F2C400C33931 /* zxing-objc.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 3B83EB90158E71AD00A3B31F;
|
||||
remoteInfo = "zxing-objc-framework";
|
||||
};
|
||||
3B5D0F521590F2F900C33931 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 3B5D0F351590F2C400C33931 /* zxing-objc.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 3B83EB8F158E71AD00A3B31F;
|
||||
remoteInfo = "zxing-objc-framework";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
3B5D0F651591006000C33931 /* Copy Files */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
3B5D0F66159100A700C33931 /* zxing-objc-framework.framework in Copy Files */,
|
||||
);
|
||||
name = "Copy Files";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
3B5D0F141590F12B00C33931 /* bare.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = bare.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3B5D0F181590F12B00C33931 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
3B5D0F1B1590F12B00C33931 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
|
||||
3B5D0F1D1590F12B00C33931 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
3B5D0F201590F12B00C33931 /* bare-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "bare-Info.plist"; sourceTree = "<group>"; };
|
||||
3B5D0F241590F12B00C33931 /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
|
||||
3B5D0F261590F12B00C33931 /* bare-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "bare-Prefix.pch"; sourceTree = "<group>"; };
|
||||
3B5D0F2A1590F12B00C33931 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
3B5D0F2B1590F12C00C33931 /* AppDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AppDelegate.mm; sourceTree = "<group>"; };
|
||||
3B5D0F351590F2C400C33931 /* zxing-objc.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "zxing-objc.xcodeproj"; path = "../../../zxing-objc.xcodeproj"; sourceTree = "<group>"; };
|
||||
3B5D0F631590FF2E00C33931 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
3B5D0F111590F12B00C33931 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3B5D0F641590FF2E00C33931 /* QuartzCore.framework in Frameworks */,
|
||||
3B5D0F541590F31A00C33931 /* zxing-objc-framework.framework in Frameworks */,
|
||||
3B5D0F191590F12B00C33931 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
3B5D0F091590F12B00C33931 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B5D0F351590F2C400C33931 /* zxing-objc.xcodeproj */,
|
||||
3B5D0F1E1590F12B00C33931 /* bare */,
|
||||
3B5D0F171590F12B00C33931 /* Frameworks */,
|
||||
3B5D0F151590F12B00C33931 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0F151590F12B00C33931 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B5D0F141590F12B00C33931 /* bare.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0F171590F12B00C33931 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B5D0F631590FF2E00C33931 /* QuartzCore.framework */,
|
||||
3B5D0F181590F12B00C33931 /* Cocoa.framework */,
|
||||
3B5D0F1A1590F12B00C33931 /* Other Frameworks */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0F1A1590F12B00C33931 /* Other Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B5D0F1B1590F12B00C33931 /* AppKit.framework */,
|
||||
3B5D0F1D1590F12B00C33931 /* Foundation.framework */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0F1E1590F12B00C33931 /* bare */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B5D0F2A1590F12B00C33931 /* AppDelegate.h */,
|
||||
3B5D0F2B1590F12C00C33931 /* AppDelegate.mm */,
|
||||
3B5D0F1F1590F12B00C33931 /* Supporting Files */,
|
||||
);
|
||||
path = bare;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0F1F1590F12B00C33931 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B5D0F201590F12B00C33931 /* bare-Info.plist */,
|
||||
3B5D0F241590F12B00C33931 /* main.mm */,
|
||||
3B5D0F261590F12B00C33931 /* bare-Prefix.pch */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0F361590F2C400C33931 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B5D0F3C1590F2C400C33931 /* libzxing-objc.a */,
|
||||
3B5D0F3E1590F2C400C33931 /* zxing-objc-framework.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
3B5D0F131590F12B00C33931 /* bare */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3B5D0F321590F12C00C33931 /* Build configuration list for PBXNativeTarget "bare" */;
|
||||
buildPhases = (
|
||||
3B5D0F101590F12B00C33931 /* Sources */,
|
||||
3B5D0F111590F12B00C33931 /* Frameworks */,
|
||||
3B5D0F121590F12B00C33931 /* Resources */,
|
||||
3B5D0F651591006000C33931 /* Copy Files */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
3B5D0F531590F2F900C33931 /* PBXTargetDependency */,
|
||||
);
|
||||
name = bare;
|
||||
productName = bare;
|
||||
productReference = 3B5D0F141590F12B00C33931 /* bare.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
3B5D0F0B1590F12B00C33931 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0430;
|
||||
};
|
||||
buildConfigurationList = 3B5D0F0E1590F12B00C33931 /* Build configuration list for PBXProject "bare" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 3B5D0F091590F12B00C33931;
|
||||
productRefGroup = 3B5D0F151590F12B00C33931 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
{
|
||||
ProductGroup = 3B5D0F361590F2C400C33931 /* Products */;
|
||||
ProjectRef = 3B5D0F351590F2C400C33931 /* zxing-objc.xcodeproj */;
|
||||
},
|
||||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
3B5D0F131590F12B00C33931 /* bare */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXReferenceProxy section */
|
||||
3B5D0F3C1590F2C400C33931 /* libzxing-objc.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libzxing-objc.a";
|
||||
remoteRef = 3B5D0F3B1590F2C400C33931 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
3B5D0F3E1590F2C400C33931 /* zxing-objc-framework.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = "zxing-objc-framework.framework";
|
||||
remoteRef = 3B5D0F3D1590F2C400C33931 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
3B5D0F121590F12B00C33931 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
3B5D0F101590F12B00C33931 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3B5D0F251590F12B00C33931 /* main.mm in Sources */,
|
||||
3B5D0F2C1590F12C00C33931 /* AppDelegate.mm in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
3B5D0F531590F2F900C33931 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = "zxing-objc-framework";
|
||||
targetProxy = 3B5D0F521590F2F900C33931 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
3B5D0F301590F12C00C33931 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3B5D0F311590F12C00C33931 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3B5D0F331590F12C00C33931 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "bare/bare-Prefix.pch";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
objc/src,
|
||||
objc/cpp/src,
|
||||
);
|
||||
INFOPLIST_FILE = "bare/bare-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
USER_HEADER_SEARCH_PATHS = "objc/src objc/cpp/core/src";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3B5D0F341590F12C00C33931 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "bare/bare-Prefix.pch";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
objc/src,
|
||||
objc/cpp/src,
|
||||
);
|
||||
INFOPLIST_FILE = "bare/bare-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
USER_HEADER_SEARCH_PATHS = "objc/src objc/cpp/core/src";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
3B5D0F0E1590F12B00C33931 /* Build configuration list for PBXProject "bare" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3B5D0F301590F12C00C33931 /* Debug */,
|
||||
3B5D0F311590F12C00C33931 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
3B5D0F321590F12C00C33931 /* Build configuration list for PBXNativeTarget "bare" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3B5D0F331590F12C00C33931 /* Debug */,
|
||||
3B5D0F341590F12C00C33931 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 3B5D0F0B1590F12B00C33931 /* Project object */;
|
||||
}
|
44
objc/examples/osx/bare/bare/AppDelegate.h
Normal file
44
objc/examples/osx/bare/bare/AppDelegate.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
|
||||
/*
|
||||
* Copyright 2012 ZXing authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#import <ZXing/ZXCaptureDelegate.h>
|
||||
|
||||
@class ZXCapture;
|
||||
|
||||
@interface AppDelegate : NSObject <NSApplicationDelegate,
|
||||
NSWindowDelegate,
|
||||
ZXCaptureDelegate>
|
||||
|
||||
@property (retain) NSWindow* window;
|
||||
@property (retain) NSUserDefaults* prefs;
|
||||
@property (retain) ZXCapture* capture;
|
||||
@property (retain) CALayer* layer;
|
||||
@property (retain) NSTextView* text;
|
||||
@property (assign) CGRect text_frame;
|
||||
@property (assign) double width;
|
||||
@property (assign) double height;
|
||||
@property (readonly) BOOL show_luminance;
|
||||
@property (readonly) BOOL show_binary;
|
||||
|
||||
- (void)cancel;
|
||||
|
||||
- (void)captureResult:(ZXCapture*)capture result:(ZXResult*)result;
|
||||
- (void)captureSize:(ZXCapture*)capture
|
||||
width:(NSNumber*)width
|
||||
height:(NSNumber*)height;
|
||||
|
||||
@end
|
675
objc/examples/osx/bare/bare/AppDelegate.mm
Normal file
675
objc/examples/osx/bare/bare/AppDelegate.mm
Normal file
|
@ -0,0 +1,675 @@
|
|||
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
|
||||
/*
|
||||
* Copyright 2012 ZXing authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#import "AppDelegate.h"
|
||||
#import <ZXing/ZXCapture.h>
|
||||
#import <ZXing/ZXResult.h>
|
||||
|
||||
#if DEBUG
|
||||
#include <iostream>
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
using std::ostream;
|
||||
ostream& operator << (ostream& os, id object) {
|
||||
os << [[NSString stringWithFormat:@"%@", object] UTF8String];
|
||||
return os;
|
||||
}
|
||||
ostream& operator << (ostream& os, CGPoint const& p) {
|
||||
os << '{' << p.x << "," << p.y << '}';
|
||||
return os;
|
||||
}
|
||||
ostream& operator << (ostream& os, CGSize const& s) {
|
||||
os << '{' << s.width << "," << s.height << '}';
|
||||
return os;
|
||||
}
|
||||
ostream& operator << (ostream& os, CGRect const& r) {
|
||||
os << '{' << r.origin << "," << r.size << '}';
|
||||
return os;
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
double height(NSString* string, NSFont* font, double width) {
|
||||
NSTextStorage* ts =
|
||||
[[[NSTextStorage alloc] initWithString:string] autorelease];
|
||||
NSTextContainer* tc =
|
||||
[[[NSTextContainer alloc]
|
||||
initWithContainerSize:CGSizeMake(width, 9999999)] autorelease];
|
||||
NSLayoutManager* lm = [[[NSLayoutManager alloc] init] autorelease];
|
||||
[lm addTextContainer:tc];
|
||||
[ts addLayoutManager:lm];
|
||||
[ts addAttribute:NSFontAttributeName
|
||||
value:font
|
||||
range:NSMakeRange(0, ts.length)];
|
||||
[tc setLineFragmentPadding:0];
|
||||
[lm glyphRangeForTextContainer:tc];
|
||||
return [lm usedRectForTextContainer:tc].size.height;
|
||||
}
|
||||
}
|
||||
|
||||
@interface WindowView : NSView @end
|
||||
@interface Menu : NSMenu
|
||||
- (void)items:(id)items;
|
||||
@end
|
||||
@interface MainMenu : Menu @end
|
||||
@interface Item : NSMenuItem
|
||||
- (id)initWithMenu:(Menu*)parent arg:(id)arg;
|
||||
@end
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
@synthesize window = window_;
|
||||
@synthesize prefs = prefs_;
|
||||
@synthesize capture = capture_;
|
||||
@synthesize layer = layer_;
|
||||
@synthesize text = text_;
|
||||
@synthesize text_frame = text_frame_;
|
||||
@synthesize height = height_;
|
||||
@synthesize width = width_;
|
||||
|
||||
- (void)dealloc {
|
||||
self.window = nil;
|
||||
self.prefs = nil;
|
||||
self.capture = nil;
|
||||
self.layer = nil;
|
||||
self.text = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
-(void)preferences {
|
||||
self.prefs = [NSUserDefaults standardUserDefaults];
|
||||
[self.prefs registerDefaults:
|
||||
[NSDictionary dictionaryWithObjects:
|
||||
[NSArray arrayWithObjects:
|
||||
[NSNumber numberWithBool:NO],
|
||||
[NSNumber numberWithBool:NO],
|
||||
[NSNumber numberWithBool:NO],
|
||||
[NSNumber numberWithBool:YES],
|
||||
nil]
|
||||
forKeys:
|
||||
[NSArray arrayWithObjects:
|
||||
@"show_luminance",
|
||||
@"show_binary",
|
||||
@"fullscreen",
|
||||
@"continuous",
|
||||
nil]]];
|
||||
}
|
||||
|
||||
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (CGSize)resize:(CGSize)size {
|
||||
CGRect frame = CGRectMake(0, 0, size.width, size.height);
|
||||
frame = self.layer.bounds;
|
||||
|
||||
double window_ar = frame.size.width/frame.size.height;
|
||||
double video_ar = 1.0*self.width/self.height;
|
||||
|
||||
if (fabs(video_ar-window_ar) > 0.001) {
|
||||
if (video_ar > window_ar) {
|
||||
frame.origin.y = (frame.size.height-frame.size.width/video_ar)/2;
|
||||
frame.size.height = frame.size.width/video_ar;
|
||||
} else {
|
||||
frame.origin.x = (frame.size.width-frame.size.height*video_ar)/2;
|
||||
frame.size.width = frame.size.height*video_ar;
|
||||
}
|
||||
}
|
||||
|
||||
self.capture.layer.frame = frame;
|
||||
|
||||
frame = CGRectMake(0, 0, size.width, size.height);
|
||||
frame = self.layer.bounds;
|
||||
self.text_frame = self.text.frame = CGRectMake(0.1*frame.size.width,
|
||||
0.05*frame.size.height,
|
||||
0.8*frame.size.width,
|
||||
0.45*frame.size.height);
|
||||
|
||||
if ([self.prefs boolForKey:@"show_luminance"]) {
|
||||
frame = CGRectMake(0, 0, size.width, size.height);
|
||||
frame = [self.window contentRectForFrameRect:frame];
|
||||
frame = self.layer.bounds;
|
||||
double width = frame.size.width;
|
||||
frame.size.height *= 1/3.0;
|
||||
frame.size.width *= 1/3.0;
|
||||
|
||||
double window_ar = frame.size.width/frame.size.height;
|
||||
double video_ar = 1.0*self.width/self.height;
|
||||
|
||||
if (fabs(video_ar-window_ar) > 0.001) {
|
||||
if (video_ar > window_ar) {
|
||||
frame.size.height = frame.size.width/video_ar;
|
||||
} else {
|
||||
frame.size.width = frame.size.height*video_ar;
|
||||
}
|
||||
|
||||
frame.origin.x = width - frame.size.width;
|
||||
|
||||
self.capture.luminance = true;
|
||||
self.capture.luminance.frame = frame;
|
||||
}
|
||||
}
|
||||
|
||||
if ([self.prefs boolForKey:@"show_binary"]) {
|
||||
frame = CGRectMake(0, 0, size.width, size.height);
|
||||
frame = [self.window contentRectForFrameRect:frame];
|
||||
frame = self.layer.bounds;
|
||||
frame.size.height *= 1/3.0;
|
||||
frame.size.width *= 1/3.0;
|
||||
|
||||
window_ar = frame.size.width/frame.size.height;
|
||||
video_ar = 1.0*self.width/self.height;
|
||||
|
||||
if (fabs(video_ar-window_ar) > 0.001) {
|
||||
if (video_ar > window_ar) {
|
||||
frame.size.height = frame.size.width/video_ar;
|
||||
} else {
|
||||
frame.size.width = frame.size.height*video_ar;
|
||||
}
|
||||
}
|
||||
|
||||
self.capture.binary = true;
|
||||
self.capture.binary.frame = frame;
|
||||
}
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
- (void)quit:(id)item {
|
||||
[NSApp terminate:self];
|
||||
}
|
||||
|
||||
- (BOOL)show_luminance {
|
||||
return [self.prefs boolForKey:@"show_luminance"];
|
||||
}
|
||||
|
||||
- (BOOL)show_binary {
|
||||
return [self.prefs boolForKey:@"show_binary"];
|
||||
}
|
||||
|
||||
- (void)cancel {
|
||||
[self.prefs setBool:NO forKey:@"fullscreen"];
|
||||
[self.window.contentView exitFullScreenModeWithOptions:nil];
|
||||
}
|
||||
|
||||
- (void)luminance:(id)item {
|
||||
[self.prefs setBool:![self.prefs boolForKey:@"show_luminance"]
|
||||
forKey:@"show_luminance"];
|
||||
[item setState:[self.prefs boolForKey:@"show_luminance"]];
|
||||
if ([self.prefs boolForKey:@"show_luminance"]) {
|
||||
self.capture.luminance = true;
|
||||
[self.layer addSublayer:self.capture.luminance];
|
||||
[self resize:self.window.frame.size];
|
||||
} else {
|
||||
[self.capture.luminance removeFromSuperlayer];
|
||||
self.capture.luminance = false;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)binary:(id)item {
|
||||
[self.prefs setBool:![self.prefs boolForKey:@"show_binary"]
|
||||
forKey:@"show_binary"];
|
||||
[item setState:[self.prefs boolForKey:@"show_binary"]];
|
||||
if ([self.prefs boolForKey:@"show_binary"]) {
|
||||
self.capture.binary = true;
|
||||
[self.layer addSublayer:self.capture.binary];
|
||||
[self resize:self.window.frame.size];
|
||||
} else {
|
||||
[self.capture.binary removeFromSuperlayer];
|
||||
self.capture.binary = false;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)capture:(id)item {
|
||||
NSDate* date = [NSDate date];
|
||||
time_t time = [date timeIntervalSince1970];
|
||||
struct tm timeStruct;
|
||||
localtime_r(&time, &timeStruct);
|
||||
char buffer[80];
|
||||
strftime(buffer, 80, "%Y-%m-%d at %I.%M.%S %p", &timeStruct);
|
||||
NSString* now =
|
||||
[NSString stringWithCString:buffer encoding:NSASCIIStringEncoding];
|
||||
self.capture.captureToFilename =
|
||||
[NSString stringWithFormat:@"%s/Desktop/ZXing capture %@.png",
|
||||
getenv("HOME"), now];
|
||||
}
|
||||
|
||||
- (void)fullscreen:(id)item {
|
||||
[self.prefs setBool:![self.prefs boolForKey:@"fullscreen"]
|
||||
forKey:@"fullscreen"];
|
||||
if ([self.prefs boolForKey:@"fullscreen"]) {
|
||||
NSDictionary* options =
|
||||
[NSDictionary dictionaryWithObject:[NSNumber numberWithBool:NO]
|
||||
forKey:NSFullScreenModeAllScreens];
|
||||
[self.window.contentView
|
||||
enterFullScreenMode:self.window.screen
|
||||
withOptions:options];
|
||||
} else {
|
||||
[self.window.contentView exitFullScreenModeWithOptions:nil];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)resizeNotification:(NSNotification*)notification {
|
||||
WindowView* wv = (WindowView*)notification.object;
|
||||
[self resize:[self.window frameRectForContentRect:wv.bounds].size];
|
||||
}
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
|
||||
[self preferences];
|
||||
NSUInteger mask =
|
||||
NSTitledWindowMask|
|
||||
NSClosableWindowMask|
|
||||
NSMiniaturizableWindowMask|
|
||||
NSResizableWindowMask;
|
||||
CGRect frame =
|
||||
[NSWindow frameRectForContentRect:CGRectMake(0, 0, 640, 480)
|
||||
styleMask:mask];
|
||||
self.window =
|
||||
[[[NSWindow alloc]
|
||||
initWithContentRect:frame
|
||||
styleMask:mask
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:NO] autorelease];
|
||||
|
||||
[self.window center];
|
||||
|
||||
[self.window setFrameAutosaveName:@"SomeWindow"];
|
||||
[self.window setFrameUsingName:@"SomeWindow"];
|
||||
|
||||
[NSApp setMainMenu:[[[Menu alloc] init] autorelease]];
|
||||
|
||||
self.capture = [[[ZXCapture alloc] init] autorelease];
|
||||
|
||||
self.window.title = @"ZXing";
|
||||
self.window.level = NSNormalWindowLevel;
|
||||
self.window.delegate = self;
|
||||
|
||||
self.window.contentView = [[[WindowView alloc] init] autorelease];
|
||||
|
||||
[NSNotificationCenter.defaultCenter
|
||||
addObserver:self
|
||||
selector:@selector(resizeNotification:)
|
||||
name:NSViewFrameDidChangeNotification
|
||||
object:self.window.contentView];
|
||||
|
||||
self.layer = CALayer.layer;
|
||||
self.layer.frame = [self.window contentRectForFrameRect:self.window.frame];
|
||||
self.layer.backgroundColor = CGColorGetConstantColor(kCGColorBlack);
|
||||
|
||||
[self.layer addSublayer:self.capture.layer];
|
||||
|
||||
if ([self.prefs boolForKey:@"show_luminance"]) {
|
||||
self.capture.luminance = true;
|
||||
[self.layer addSublayer:self.capture.luminance];
|
||||
}
|
||||
|
||||
if ([self.prefs boolForKey:@"show_binary"]) {
|
||||
self.capture.binary = true;
|
||||
[self.layer addSublayer:self.capture.binary];
|
||||
}
|
||||
|
||||
[self.window.contentView setLayer:self.layer];
|
||||
[self.window.contentView setWantsLayer:YES];
|
||||
CGRect contents = [self.window contentRectForFrameRect:self.window.frame];
|
||||
|
||||
self.text =
|
||||
[[[NSTextView alloc]
|
||||
initWithFrame:CGRectMake(0.1*contents.size.width,
|
||||
0.05*contents.size.height,
|
||||
0.8*contents.size.width,
|
||||
0.45*contents.size.height)] autorelease];
|
||||
self.text.horizontallyResizable = NO;
|
||||
self.text.verticallyResizable = NO;
|
||||
self.text.textContainerInset = CGSizeMake(10, 10);
|
||||
self.text.textColor = [NSColor yellowColor];
|
||||
self.text.editable = NO;
|
||||
self.text.font = [NSFont systemFontOfSize:36];
|
||||
self.text.alignment = NSCenterTextAlignment;
|
||||
|
||||
[self.window.contentView addSubview:self.text];
|
||||
|
||||
self.text.backgroundColor = NSColor.clearColor;
|
||||
self.text.layer.backgroundColor = CGColorCreateGenericRGB(0, 0, 1, 0.4);
|
||||
self.text.layer.borderColor = CGColorCreateGenericRGB(1, 1, 1, 0.4);
|
||||
self.text.layer.borderWidth = 2;
|
||||
self.text.layer.cornerRadius = 10;
|
||||
|
||||
[self.text setAlphaValue:0];
|
||||
|
||||
self.capture.delegate = self;
|
||||
|
||||
[self.window orderFront:self.window];
|
||||
// [self.window makeKeyAndOrderFront:NSApp];
|
||||
}
|
||||
|
||||
- (void)captureResult:(ZXCapture*)capture_ result:(ZXResult*)result {
|
||||
NSString* value = result.text;
|
||||
if (result.text != self.text.string) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
self.text.string = result.text;
|
||||
self.text.frame = self.text_frame;
|
||||
double h =
|
||||
height(result.text, self.text.font, self.text.frame.size.width);
|
||||
h += 2*self.text.textContainerInset.height;
|
||||
if (h <= [self.text frame].size.height) {
|
||||
CGRect f = self.text.frame;
|
||||
f.size.height = h;
|
||||
self.text.frame = f;
|
||||
}
|
||||
[NSAnimationContext beginGrouping];
|
||||
NSAnimationContext.currentContext.duration = 0.8;
|
||||
[self.text.animator setAlphaValue:0.9];
|
||||
[NSAnimationContext endGrouping];
|
||||
|
||||
dispatch_after(
|
||||
dispatch_time(DISPATCH_TIME_NOW, 5 * NSEC_PER_SEC),
|
||||
dispatch_get_main_queue(),
|
||||
^{
|
||||
if ([self.text.string isEqualToString:value] ||
|
||||
[self.text.string isEqualToString:@""]) {
|
||||
[NSAnimationContext beginGrouping];
|
||||
NSAnimationContext.currentContext.duration = 0.8;
|
||||
[self.text.animator setAlphaValue:0];
|
||||
[NSAnimationContext endGrouping];
|
||||
dispatch_after(
|
||||
dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC),
|
||||
dispatch_get_main_queue(),
|
||||
^{
|
||||
if (self.text.string == value) {
|
||||
self.text.string = @"";
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
NSLog(@"%@", result.text);
|
||||
});
|
||||
if (![self.prefs boolForKey:@"continuous"]) {
|
||||
[self.capture stop];
|
||||
[NSApp
|
||||
performSelectorOnMainThread:@selector(terminate:)
|
||||
withObject:self
|
||||
waitUntilDone:false];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)captureSize:(ZXCapture*)capture_
|
||||
width:(NSNumber*)width
|
||||
height:(NSNumber*)height {
|
||||
self.width = [width doubleValue];
|
||||
self.height = [height doubleValue];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self resize:self.window.frame.size];
|
||||
[self.window orderFrontRegardless];
|
||||
});
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@implementation WindowView
|
||||
- (void)cancelOperation:(id)sender {
|
||||
AppDelegate* d = (AppDelegate*)[NSApp delegate];
|
||||
[d cancel];
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation Menu
|
||||
- (id)init {
|
||||
if ((self = [super initWithTitle:@""])) {
|
||||
NSString* name = NSRunningApplication.currentApplication.localizedName;
|
||||
|
||||
NSMutableArray* items = [NSMutableArray arrayWithCapacity:0];
|
||||
|
||||
{ NSMutableArray* apple = [NSMutableArray arrayWithCapacity:0];
|
||||
|
||||
{ NSMutableDictionary* about = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
{ NSMutableDictionary* contents = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
[contents setObject:[NSString stringWithFormat:@"About %@", name]
|
||||
forKey:@"title"];
|
||||
[about setObject:contents forKey:@"about"]; }
|
||||
[apple addObject:about]; }
|
||||
|
||||
[apple addObject:@"separator"];
|
||||
|
||||
{ NSMutableDictionary* services = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
[apple addObject:services]; }
|
||||
|
||||
[apple addObject:@"separator"];
|
||||
|
||||
{ NSMutableDictionary* hide = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
{ NSMutableDictionary* contents = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
[contents setObject:[NSString stringWithFormat:@"Hide %@", name]
|
||||
forKey:@"title"];
|
||||
[contents setObject:@"cmd:h" forKey:@"key"];
|
||||
[hide setObject:contents forKey:@"hide"]; }
|
||||
[apple addObject:hide]; }
|
||||
|
||||
{ NSMutableDictionary* hide_others = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
{ NSMutableDictionary* contents = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
[contents setObject:@"cmd:opt:h" forKey:@"key"];
|
||||
[hide_others setObject:contents forKey:@"hide_others"]; }
|
||||
[apple addObject:hide_others]; }
|
||||
|
||||
[apple addObject:@"show_all"];
|
||||
|
||||
[apple addObject:@"separator"];
|
||||
|
||||
{ NSMutableDictionary* quit = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
{ NSMutableDictionary* contents = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
[contents setObject:[NSString stringWithFormat:@"Quit %@", name]
|
||||
forKey:@"title"];
|
||||
[contents setObject:@"cmd:q" forKey:@"key"];
|
||||
[quit setObject:contents forKey:@"quit"]; }
|
||||
[apple addObject:quit]; }
|
||||
|
||||
[items addObject:[NSDictionary dictionaryWithObject:apple forKey:@"apple"]]; }
|
||||
|
||||
{ NSMutableDictionary* view = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
|
||||
{ NSMutableDictionary* key = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
[key setObject:@"View" forKey:@"title"];
|
||||
|
||||
NSMutableArray* contents = [NSMutableArray arrayWithCapacity:0];
|
||||
|
||||
{ NSMutableDictionary* fullscreen = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
|
||||
{ NSMutableDictionary* contents = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
[contents setObject:@"cmd:f" forKey:@"key"];
|
||||
[fullscreen setObject:contents forKey:@"fullscreen"]; }
|
||||
|
||||
[contents addObject:fullscreen]; }
|
||||
|
||||
{ NSMutableDictionary* capture = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
|
||||
{ NSMutableDictionary* contents = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
[contents setObject:@"cmd:c" forKey:@"key"];
|
||||
[capture setObject:contents forKey:@"capture"]; }
|
||||
[contents addObject:capture]; }
|
||||
|
||||
AppDelegate* ad = (AppDelegate*)[NSApp delegate];
|
||||
|
||||
{ NSMutableDictionary* luminance = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
{ NSMutableDictionary* contents = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
[contents setObject:@"cmd:l" forKey:@"key"];
|
||||
[contents setObject:[NSNumber numberWithBool:ad.show_luminance]
|
||||
forKey:@"state"];
|
||||
[luminance setObject:contents forKey:@"luminance"]; }
|
||||
[contents addObject:luminance]; }
|
||||
|
||||
{ NSMutableDictionary* binary = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
{ NSMutableDictionary* contents = [NSMutableDictionary dictionaryWithCapacity:0];
|
||||
[contents setObject:@"cmd:b" forKey:@"key"];
|
||||
[contents setObject:[NSNumber numberWithBool:ad.show_binary]
|
||||
forKey:@"state"];
|
||||
[binary setObject:contents forKey:@"binary"]; }
|
||||
[contents addObject:binary]; }
|
||||
|
||||
[view setObject:contents forKey:key]; }
|
||||
|
||||
[items addObject:[NSDictionary dictionaryWithObject:view forKey:@"view"]]; }
|
||||
|
||||
[items addObject:[NSDictionary dictionaryWithObject:[NSArray array] forKey:@"window"]];
|
||||
[items addObject:[NSDictionary dictionaryWithObject:[NSArray array] forKey:@"help"]];
|
||||
|
||||
[self items:items];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)items:(id)args_ {
|
||||
NSArray* args = nil;
|
||||
if ([args_ isKindOfClass:[NSArray class]]) {
|
||||
args = args_;
|
||||
} else {
|
||||
args = [NSArray arrayWithObject:args_];
|
||||
}
|
||||
|
||||
for (id arg in args) {
|
||||
if ([arg isKindOfClass:[NSArray class]]) {
|
||||
[[[Item alloc] initWithMenu:self arg:arg] autorelease];
|
||||
} else if ([arg isKindOfClass:[NSDictionary class]]) {
|
||||
for(id key in arg) {
|
||||
id value = [arg objectForKey:key];
|
||||
[[[Item alloc] initWithMenu:self
|
||||
arg:[NSDictionary dictionaryWithObject:value forKey:key]] autorelease];
|
||||
}
|
||||
}
|
||||
}
|
||||
[self update];
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation Item
|
||||
|
||||
- (void)params:(NSDictionary*)params {
|
||||
for(id key_ in params) {
|
||||
if (![key_ isKindOfClass:[NSString class]]) {
|
||||
throw "don't understand param";
|
||||
}
|
||||
NSString* key = (NSString*)key_;
|
||||
id value = [params objectForKey:key];
|
||||
if ([key isEqualToString:@"title"]) {
|
||||
self.title = value;
|
||||
} else if ([key isEqualToString:@"key"]) {
|
||||
if (![value isKindOfClass:[NSString class]]) {
|
||||
throw "don't understand value";
|
||||
}
|
||||
NSString* string = (NSString*)value;
|
||||
NSString* ke = nil;
|
||||
NSUInteger m = 0;
|
||||
for(id v in [string componentsSeparatedByString: @":"]) {
|
||||
NSString* string = (NSString*)v;
|
||||
if ([string isEqualToString:@"cmd"]) {
|
||||
m |= NSCommandKeyMask;
|
||||
} else if ([string isEqualToString:@"ctl"]) {
|
||||
m |= NSControlKeyMask;
|
||||
} else if ([string isEqualToString:@"shift"]) {
|
||||
m |= NSShiftKeyMask;
|
||||
} else if ([string isEqualToString:@"opt"]) {
|
||||
m |= NSAlternateKeyMask;
|
||||
} else {
|
||||
ke = string;
|
||||
}
|
||||
}
|
||||
self.keyEquivalent = ke;
|
||||
self.keyEquivalentModifierMask = m;
|
||||
} else if ([key isEqualToString:@"state"]) {
|
||||
if (![value isKindOfClass:[NSNumber class]]) {
|
||||
throw "don't understand param #{key}: #{value}";
|
||||
}
|
||||
self.state = [(NSNumber*)value boolValue];
|
||||
} else {
|
||||
throw "don't understand param #{key}: #{value}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (id)initWithMenu:(Menu*)parent arg:(id)arg {
|
||||
if ((self = [super initWithTitle:@"" action:nil keyEquivalent:@""])) {
|
||||
self.target = [NSApp delegate];
|
||||
self.enabled = true;
|
||||
Menu* menu = nil;
|
||||
NSDictionary* dict = nil;
|
||||
if ([arg isKindOfClass:[NSDictionary class]]) {
|
||||
dict = (NSDictionary*)arg;
|
||||
}
|
||||
if (dict) {
|
||||
if ([dict count] != 1) {
|
||||
throw "not sure what #{arg} means 0";
|
||||
}
|
||||
id key = [[dict keyEnumerator] nextObject];
|
||||
id value = [dict objectForKey:key];
|
||||
if ([key isKindOfClass:[NSString class]]) {
|
||||
NSString* s = (NSString*)key;
|
||||
self.action = NSSelectorFromString([NSString stringWithFormat:@"%@:", s]);
|
||||
self.title =
|
||||
[[s stringByReplacingOccurrencesOfString:@"_" withString:@" "] capitalizedString];
|
||||
} else if ([key isKindOfClass:[NSDictionary class]]) {
|
||||
[self params:key];
|
||||
} else {
|
||||
throw "not sure what #{key} means 1";
|
||||
}
|
||||
if ([value isKindOfClass:[NSString class]]) {
|
||||
throw "oops";
|
||||
} else if ([value isKindOfClass:[NSArray class]]) {
|
||||
menu = [[[Menu alloc] initWithTitle:self.title] autorelease];
|
||||
[menu items:value];
|
||||
} else if ([value isKindOfClass:[NSDictionary class]]) {
|
||||
NSDictionary* dict = (NSDictionary*)value;
|
||||
if ([dict count] == 1 &&
|
||||
[[[dict keyEnumerator] nextObject]
|
||||
isKindOfClass:[NSDictionary class]]) {
|
||||
[self params:[[dict keyEnumerator] nextObject]];
|
||||
menu = [[[Menu alloc] initWithTitle:self.title] autorelease];
|
||||
[menu items:[dict objectForKey:[[dict keyEnumerator] nextObject]]];
|
||||
} else {
|
||||
[self params:value];
|
||||
}
|
||||
} else {
|
||||
throw "not sure what #{value} means 2";
|
||||
}
|
||||
} else {
|
||||
throw "implement #{arg.class} item arg #{arg}";
|
||||
}
|
||||
[parent addItem:self];
|
||||
if (dict && menu) {
|
||||
NSString* first = nil;
|
||||
if ([[dict objectForKey:[[dict keyEnumerator] nextObject]]
|
||||
isKindOfClass:[NSString class]]) {
|
||||
first = (NSString*)[dict objectForKey:[[dict keyEnumerator] nextObject]];
|
||||
}
|
||||
if (first) {
|
||||
if ([first isEqualToString:@"apple"]) {
|
||||
// [NSApp setAppleMenu:menu];
|
||||
[NSApp performSelector:@selector(setAppleMenu:) withObject:menu];
|
||||
} else if ([first isEqualToString:@"services"]) {
|
||||
[NSApp setServicesMenu:menu];
|
||||
} else if ([first isEqualToString:@"window"]) {
|
||||
[NSApp setWindowsMenu:menu];
|
||||
}
|
||||
}
|
||||
self.action = nil;
|
||||
self.target = nil;
|
||||
[parent setSubmenu:menu forItem:self];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
32
objc/examples/osx/bare/bare/bare-Info.plist
Normal file
32
objc/examples/osx/bare/bare/bare-Info.plist
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>zxing.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright 2012 ZXing authors. Licensed under Apache Public License 2.0.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
7
objc/examples/osx/bare/bare/bare-Prefix.pch
Normal file
7
objc/examples/osx/bare/bare/bare-Prefix.pch
Normal file
|
@ -0,0 +1,7 @@
|
|||
//
|
||||
// Prefix header for all source files of the 'bare' target in the 'bare' project
|
||||
//
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#endif
|
34
objc/examples/osx/bare/bare/main.mm
Normal file
34
objc/examples/osx/bare/bare/main.mm
Normal file
|
@ -0,0 +1,34 @@
|
|||
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
|
||||
/*
|
||||
* Copyright 2012 ZXing authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// return NSApplicationMain(argc, (const char **)argv);
|
||||
|
||||
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
|
||||
[NSApplication sharedApplication];
|
||||
|
||||
AppDelegate *appDelegate = [[AppDelegate alloc] init];
|
||||
[NSApp setDelegate:appDelegate];
|
||||
[NSApp run];
|
||||
[pool release];
|
||||
return 0;
|
||||
|
||||
}
|
1
objc/examples/osx/bare/objc
Symbolic link
1
objc/examples/osx/bare/objc
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../../objc
|
420
objc/examples/osx/demo/demo.xcodeproj/project.pbxproj
Normal file
420
objc/examples/osx/demo/demo.xcodeproj/project.pbxproj
Normal file
|
@ -0,0 +1,420 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
3B5D0F77159101EE00C33931 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B5D0F76159101EE00C33931 /* Cocoa.framework */; };
|
||||
3B5D0F81159101EE00C33931 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3B5D0F7F159101EE00C33931 /* InfoPlist.strings */; };
|
||||
3B5D0F83159101EE00C33931 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B5D0F82159101EE00C33931 /* main.m */; };
|
||||
3B5D0F87159101EE00C33931 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 3B5D0F85159101EE00C33931 /* Credits.rtf */; };
|
||||
3B5D0F8A159101EE00C33931 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B5D0F89159101EE00C33931 /* AppDelegate.m */; };
|
||||
3B5D0F8D159101EF00C33931 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3B5D0F8B159101EF00C33931 /* MainMenu.xib */; };
|
||||
3B5D0FA61591143900C33931 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B5D0FA51591143900C33931 /* QTKit.framework */; };
|
||||
3B5D0FA71591144700C33931 /* zxing-objc-framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B5D0FA21591090C00C33931 /* zxing-objc-framework.framework */; };
|
||||
3B5D0FC6159117C200C33931 /* applogo.icns in Resources */ = {isa = PBXBuildFile; fileRef = 3B5D0FBE159117C200C33931 /* applogo.icns */; };
|
||||
3B5D0FC7159117C200C33931 /* beepbeep.aif in Resources */ = {isa = PBXBuildFile; fileRef = 3B5D0FC0159117C200C33931 /* beepbeep.aif */; };
|
||||
3B5D0FC8159117C200C33931 /* zxinglogo.png in Resources */ = {isa = PBXBuildFile; fileRef = 3B5D0FC2159117C200C33931 /* zxinglogo.png */; };
|
||||
3B5D0FC9159117C200C33931 /* ZXingType.png in Resources */ = {isa = PBXBuildFile; fileRef = 3B5D0FC4159117C200C33931 /* ZXingType.png */; };
|
||||
3B5D0FE815911BFF00C33931 /* zxing-objc-framework.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3B5D0FA21591090C00C33931 /* zxing-objc-framework.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
3B5D0F9F1591090C00C33931 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 3B5D0F931591090B00C33931 /* zxing-objc.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 3B83EB25158E6C5100A3B31F;
|
||||
remoteInfo = "zxing-objc";
|
||||
};
|
||||
3B5D0FA11591090C00C33931 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 3B5D0F931591090B00C33931 /* zxing-objc.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 3B83EB90158E71AD00A3B31F;
|
||||
remoteInfo = "zxing-objc-framework";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
3B5D0FE715911BF100C33931 /* CopyFiles */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
3B5D0FE815911BFF00C33931 /* zxing-objc-framework.framework in CopyFiles */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
3B5D0F72159101EE00C33931 /* demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3B5D0F76159101EE00C33931 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
|
||||
3B5D0F79159101EE00C33931 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
|
||||
3B5D0F7B159101EE00C33931 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
3B5D0F7E159101EE00C33931 /* demo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "demo-Info.plist"; sourceTree = "<group>"; };
|
||||
3B5D0F80159101EE00C33931 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
3B5D0F82159101EE00C33931 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
3B5D0F84159101EE00C33931 /* demo-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "demo-Prefix.pch"; sourceTree = "<group>"; };
|
||||
3B5D0F86159101EE00C33931 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = "<group>"; };
|
||||
3B5D0F88159101EE00C33931 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
|
||||
3B5D0F89159101EE00C33931 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
|
||||
3B5D0F8C159101EF00C33931 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
3B5D0F931591090B00C33931 /* zxing-objc.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "zxing-objc.xcodeproj"; path = "../../../zxing-objc.xcodeproj"; sourceTree = "<group>"; };
|
||||
3B5D0FA51591143900C33931 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = System/Library/Frameworks/QTKit.framework; sourceTree = SDKROOT; };
|
||||
3B5D0FBF159117C200C33931 /* en */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = en; path = en.lproj/applogo.icns; sourceTree = "<group>"; };
|
||||
3B5D0FC1159117C200C33931 /* en */ = {isa = PBXFileReference; lastKnownFileType = file; name = en; path = en.lproj/beepbeep.aif; sourceTree = "<group>"; };
|
||||
3B5D0FC3159117C200C33931 /* en */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = en; path = en.lproj/zxinglogo.png; sourceTree = "<group>"; };
|
||||
3B5D0FC5159117C200C33931 /* en */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = en; path = en.lproj/ZXingType.png; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
3B5D0F6F159101EE00C33931 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3B5D0FA71591144700C33931 /* zxing-objc-framework.framework in Frameworks */,
|
||||
3B5D0FA61591143900C33931 /* QTKit.framework in Frameworks */,
|
||||
3B5D0F77159101EE00C33931 /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
3B5D0F67159101EE00C33931 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B5D0F931591090B00C33931 /* zxing-objc.xcodeproj */,
|
||||
3B5D0F7C159101EE00C33931 /* demo */,
|
||||
3B5D0F75159101EE00C33931 /* Frameworks */,
|
||||
3B5D0F73159101EE00C33931 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0F73159101EE00C33931 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B5D0F72159101EE00C33931 /* demo.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0F75159101EE00C33931 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B5D0F76159101EE00C33931 /* Cocoa.framework */,
|
||||
3B5D0F78159101EE00C33931 /* Other Frameworks */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0F78159101EE00C33931 /* Other Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B5D0FA51591143900C33931 /* QTKit.framework */,
|
||||
3B5D0F79159101EE00C33931 /* AppKit.framework */,
|
||||
3B5D0F7B159101EE00C33931 /* Foundation.framework */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0F7C159101EE00C33931 /* demo */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B5D0F88159101EE00C33931 /* AppDelegate.h */,
|
||||
3B5D0F89159101EE00C33931 /* AppDelegate.m */,
|
||||
3B5D0F8B159101EF00C33931 /* MainMenu.xib */,
|
||||
3B5D0F7D159101EE00C33931 /* Supporting Files */,
|
||||
);
|
||||
path = demo;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0F7D159101EE00C33931 /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B5D0FBE159117C200C33931 /* applogo.icns */,
|
||||
3B5D0FC0159117C200C33931 /* beepbeep.aif */,
|
||||
3B5D0FC2159117C200C33931 /* zxinglogo.png */,
|
||||
3B5D0FC4159117C200C33931 /* ZXingType.png */,
|
||||
3B5D0F7E159101EE00C33931 /* demo-Info.plist */,
|
||||
3B5D0F7F159101EE00C33931 /* InfoPlist.strings */,
|
||||
3B5D0F82159101EE00C33931 /* main.m */,
|
||||
3B5D0F84159101EE00C33931 /* demo-Prefix.pch */,
|
||||
3B5D0F85159101EE00C33931 /* Credits.rtf */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0F941591090B00C33931 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B5D0FA01591090C00C33931 /* libzxing-objc.a */,
|
||||
3B5D0FA21591090C00C33931 /* zxing-objc-framework.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
3B5D0F71159101EE00C33931 /* demo */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3B5D0F90159101EF00C33931 /* Build configuration list for PBXNativeTarget "demo" */;
|
||||
buildPhases = (
|
||||
3B5D0F6E159101EE00C33931 /* Sources */,
|
||||
3B5D0F6F159101EE00C33931 /* Frameworks */,
|
||||
3B5D0F70159101EE00C33931 /* Resources */,
|
||||
3B5D0FE715911BF100C33931 /* CopyFiles */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = demo;
|
||||
productName = demo;
|
||||
productReference = 3B5D0F72159101EE00C33931 /* demo.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
3B5D0F69159101EE00C33931 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0430;
|
||||
};
|
||||
buildConfigurationList = 3B5D0F6C159101EE00C33931 /* Build configuration list for PBXProject "demo" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 3B5D0F67159101EE00C33931;
|
||||
productRefGroup = 3B5D0F73159101EE00C33931 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
{
|
||||
ProductGroup = 3B5D0F941591090B00C33931 /* Products */;
|
||||
ProjectRef = 3B5D0F931591090B00C33931 /* zxing-objc.xcodeproj */;
|
||||
},
|
||||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
3B5D0F71159101EE00C33931 /* demo */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXReferenceProxy section */
|
||||
3B5D0FA01591090C00C33931 /* libzxing-objc.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libzxing-objc.a";
|
||||
remoteRef = 3B5D0F9F1591090C00C33931 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
3B5D0FA21591090C00C33931 /* zxing-objc-framework.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = "zxing-objc-framework.framework";
|
||||
remoteRef = 3B5D0FA11591090C00C33931 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
3B5D0F70159101EE00C33931 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3B5D0F81159101EE00C33931 /* InfoPlist.strings in Resources */,
|
||||
3B5D0F87159101EE00C33931 /* Credits.rtf in Resources */,
|
||||
3B5D0F8D159101EF00C33931 /* MainMenu.xib in Resources */,
|
||||
3B5D0FC6159117C200C33931 /* applogo.icns in Resources */,
|
||||
3B5D0FC7159117C200C33931 /* beepbeep.aif in Resources */,
|
||||
3B5D0FC8159117C200C33931 /* zxinglogo.png in Resources */,
|
||||
3B5D0FC9159117C200C33931 /* ZXingType.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
3B5D0F6E159101EE00C33931 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3B5D0F83159101EE00C33931 /* main.m in Sources */,
|
||||
3B5D0F8A159101EE00C33931 /* AppDelegate.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
3B5D0F7F159101EE00C33931 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
3B5D0F80159101EE00C33931 /* en */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0F85159101EE00C33931 /* Credits.rtf */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
3B5D0F86159101EE00C33931 /* en */,
|
||||
);
|
||||
name = Credits.rtf;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0F8B159101EF00C33931 /* MainMenu.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
3B5D0F8C159101EF00C33931 /* en */,
|
||||
);
|
||||
name = MainMenu.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0FBE159117C200C33931 /* applogo.icns */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
3B5D0FBF159117C200C33931 /* en */,
|
||||
);
|
||||
name = applogo.icns;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0FC0159117C200C33931 /* beepbeep.aif */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
3B5D0FC1159117C200C33931 /* en */,
|
||||
);
|
||||
name = beepbeep.aif;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0FC2159117C200C33931 /* zxinglogo.png */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
3B5D0FC3159117C200C33931 /* en */,
|
||||
);
|
||||
name = zxinglogo.png;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B5D0FC4159117C200C33931 /* ZXingType.png */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
3B5D0FC5159117C200C33931 /* en */,
|
||||
);
|
||||
name = ZXingType.png;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
3B5D0F8E159101EF00C33931 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
objc/cpp/core/src,
|
||||
objc/src,
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3B5D0F8F159101EF00C33931 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = YES;
|
||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
objc/cpp/core/src,
|
||||
objc/src,
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
SDKROOT = macosx;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3B5D0F91159101EF00C33931 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "demo/demo-Prefix.pch";
|
||||
INFOPLIST_FILE = "demo/demo-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3B5D0F92159101EF00C33931 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "demo/demo-Prefix.pch";
|
||||
INFOPLIST_FILE = "demo/demo-Info.plist";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
WRAPPER_EXTENSION = app;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
3B5D0F6C159101EE00C33931 /* Build configuration list for PBXProject "demo" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3B5D0F8E159101EF00C33931 /* Debug */,
|
||||
3B5D0F8F159101EF00C33931 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
3B5D0F90159101EF00C33931 /* Build configuration list for PBXNativeTarget "demo" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3B5D0F91159101EF00C33931 /* Debug */,
|
||||
3B5D0F92159101EF00C33931 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 3B5D0F69159101EE00C33931 /* Project object */;
|
||||
}
|
124
objc/examples/osx/demo/demo/AppDelegate.h
Normal file
124
objc/examples/osx/demo/demo/AppDelegate.h
Normal file
|
@ -0,0 +1,124 @@
|
|||
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
|
||||
/*
|
||||
* Copyright 2011-2012 ZXing authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#import "Defs.h"
|
||||
#import <ZXing/ZXCapture.h>
|
||||
#import <ZXing/ZXCaptureDelegate.h>
|
||||
//#import <ZXingObjc/ZXOverlay.h>
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@interface AppDelegate : NSObject <NSApplicationDelegate, ZXCaptureDelegate>
|
||||
{
|
||||
@private
|
||||
|
||||
IBOutlet NSWindow* mainWindow;
|
||||
IBOutlet NSView* mainView;
|
||||
IBOutlet NSView* previewView;
|
||||
IBOutlet NSView* binaryView;
|
||||
IBOutlet NSView* luminanceView;
|
||||
IBOutlet NSTextField* resultsText;
|
||||
IBOutlet NSPopUpButton* sourceSelectPopupMenu;
|
||||
IBOutlet NSButton* mirrorVideoCheckbox;
|
||||
IBOutlet NSButton* soundsCheckbox;
|
||||
IBOutlet NSButton* appLogoButton;
|
||||
IBOutlet NSButton* captureButton;
|
||||
IBOutlet NSBox* previewBox;
|
||||
IBOutlet NSBox* binaryBox;
|
||||
IBOutlet NSBox* luminanceBox;
|
||||
|
||||
ZXCapture* zxingEngine;
|
||||
CALayer* captureLayer;
|
||||
//ZXOverlay* resultsLayer;
|
||||
QTCaptureDevice* captureDevice;
|
||||
NSUserDefaults* userdefaults;
|
||||
NSMutableArray* allVideoDevices;
|
||||
CVImageBufferRef currentImageBuffer;
|
||||
NSString* currentVideoSourceName;
|
||||
BOOL mirrorVideoMode;
|
||||
NSSound* resultsSound;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@property (nonatomic, retain) IBOutlet NSWindow* mainWindow;
|
||||
@property (nonatomic, retain) IBOutlet NSTextField* resultsText;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet NSView* mainView;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet NSView* binaryView;
|
||||
@property (nonatomic, retain) IBOutlet NSView* luminanceView;
|
||||
@property (nonatomic, retain) IBOutlet NSView* previewView;
|
||||
|
||||
@property (nonatomic, retain) IBOutlet NSBox* previewBox;
|
||||
@property (nonatomic, retain) IBOutlet NSBox* binaryBox;
|
||||
@property (nonatomic, retain) IBOutlet NSBox* luminanceBox;
|
||||
|
||||
|
||||
@property (nonatomic, retain) IBOutlet NSPopUpButton* sourceSelectPopupMenu;
|
||||
@property (nonatomic, retain) IBOutlet NSButton* mirrorVideoCheckbox;
|
||||
@property (nonatomic, retain) IBOutlet NSButton* soundsCheckbox;
|
||||
@property (nonatomic, retain) IBOutlet NSButton* appLogoButton;
|
||||
@property (nonatomic, retain) IBOutlet NSButton* captureButton;
|
||||
|
||||
@property (nonatomic, retain) NSUserDefaults* userdefaults;
|
||||
@property (nonatomic, retain) ZXCapture* zxingEngine;
|
||||
//@property (nonatomic, retain) ZXOverlay* resultsLayer;
|
||||
|
||||
@property (nonatomic, retain) CALayer* captureLayer;
|
||||
@property (nonatomic, retain) QTCaptureDevice* captureDevice;
|
||||
|
||||
@property (nonatomic, assign) CVImageBufferRef currentImageBuffer;
|
||||
@property (nonatomic, retain) NSArray* allVideoDevices;
|
||||
@property (nonatomic, retain) NSString* currentVideoSourceName;
|
||||
@property (nonatomic, assign) BOOL mirrorVideoMode;
|
||||
@property (nonatomic, retain) NSSound* resultsSound;
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
- (IBAction) windowWillClose:(NSNotification *)notification;
|
||||
- (IBAction) selectedVideoSourceChange:(id) sender;
|
||||
- (IBAction) captureButtonPressed:(id) sender;
|
||||
- (IBAction) mirrorCheckboxPressed:(id) sender;
|
||||
- (IBAction) soundsCheckboxPressed:(id) sender;
|
||||
- (IBAction) zxingImagePressed:(id) sender;
|
||||
- (IBAction) configureForVideoSource:(id) sender;
|
||||
- (void) awakeFromNib;
|
||||
|
||||
- (void) applicationDidFinishLaunching:(NSNotification *)notification;
|
||||
- (void) applicationWillTerminate:(NSNotification *)notification;
|
||||
- (void) setupPreferences:(BOOL) forceReset;
|
||||
- (void) setupSound;
|
||||
|
||||
- (ZXCapture*) createZXcapture;
|
||||
|
||||
- (void) performVideoSourceScan;
|
||||
|
||||
- (CGRect) shrinkContentRect:(NSRect) inRect;
|
||||
- (void) manageOverlay:(ZXResult*) inResult;
|
||||
- (void) presentOverlayForPoints:(CGPoint)point0
|
||||
pt1:(CGPoint)point1
|
||||
pt2:(CGPoint)point2;
|
||||
|
||||
//- (void) setupVideoSourceMenuForName:(NSString*) displayName;
|
||||
|
||||
- (void) exitTheApp;
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
@end
|
736
objc/examples/osx/demo/demo/AppDelegate.m
Normal file
736
objc/examples/osx/demo/demo/AppDelegate.m
Normal file
|
@ -0,0 +1,736 @@
|
|||
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
|
||||
/*
|
||||
* Copyright 2011-2012 ZXing authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
#import "AppDelegate.h"
|
||||
#import <ZXing/ZXResult.h>
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
@synthesize mainWindow;
|
||||
@synthesize mainView;
|
||||
@synthesize binaryView;
|
||||
@synthesize luminanceView;
|
||||
@synthesize previewBox;
|
||||
@synthesize binaryBox;
|
||||
@synthesize luminanceBox;
|
||||
|
||||
@synthesize previewView;
|
||||
@synthesize userdefaults;
|
||||
@synthesize zxingEngine;
|
||||
@synthesize captureLayer;
|
||||
//@synthesize resultsLayer;
|
||||
@synthesize captureDevice;
|
||||
@synthesize mirrorVideoMode;
|
||||
@synthesize resultsText;
|
||||
@synthesize captureButton;
|
||||
|
||||
@synthesize sourceSelectPopupMenu;
|
||||
@synthesize mirrorVideoCheckbox;
|
||||
@synthesize soundsCheckbox;
|
||||
@synthesize appLogoButton;
|
||||
@synthesize currentImageBuffer;
|
||||
@synthesize allVideoDevices;
|
||||
@synthesize currentVideoSourceName;
|
||||
@synthesize resultsSound;
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"AppDelegate::awakeFromNib - ENTER");
|
||||
#endif
|
||||
|
||||
allVideoDevices = [[NSMutableArray alloc] init];
|
||||
[self setUserdefaults:[NSUserDefaults standardUserDefaults]];
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------------------
|
||||
|
||||
- (void)applicationDidFinishLaunching:(NSNotification*) aNotification
|
||||
{
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"AppDelegate::applicationDidFinishLaunching - ENTER");
|
||||
#endif
|
||||
|
||||
BOOL forcePrefsReset = NO;
|
||||
|
||||
[self setupPreferences:forcePrefsReset];
|
||||
[self setupSound];
|
||||
|
||||
zxingEngine = [self createZXcapture];
|
||||
|
||||
NSNotificationCenter* nc = [NSNotificationCenter defaultCenter];
|
||||
if(nil != nc)
|
||||
{
|
||||
[nc addObserver: self
|
||||
selector: @selector(windowWillClose:)
|
||||
name: @"NSWindowWillCloseNotification"
|
||||
object: nil];
|
||||
}
|
||||
|
||||
|
||||
// NSRect NSRectFromCGRect(CGRect cgrect);
|
||||
// CGRect NSRectToCGRect(NSrect nsrect);
|
||||
|
||||
if(nil != zxingEngine)
|
||||
{
|
||||
CALayer* layertemp = nil; // this is used for debugging
|
||||
NSRect nsRect;
|
||||
CGRect cgRect;
|
||||
|
||||
zxingEngine.binary = YES;
|
||||
zxingEngine.luminance = YES;
|
||||
|
||||
// create a layer where the raw video will appear
|
||||
captureLayer = [zxingEngine layer];
|
||||
|
||||
if(nil != captureLayer)
|
||||
{
|
||||
// CALayer CGRect for capturePayer is going to be all ZEROES
|
||||
nsRect = [[previewBox contentView] frame];
|
||||
cgRect = [self shrinkContentRect:nsRect];
|
||||
|
||||
[captureLayer setFrame:cgRect];
|
||||
[captureLayer setBackgroundColor:kBACKGROUNDCOLOR];
|
||||
[previewView setLayer:captureLayer];
|
||||
[previewView setWantsLayer:YES];
|
||||
|
||||
layertemp = zxingEngine.luminance;
|
||||
if((nil != layertemp) && (nil != luminanceView))
|
||||
{
|
||||
nsRect = [[luminanceBox contentView] frame];
|
||||
cgRect = [self shrinkContentRect:nsRect];
|
||||
[layertemp setFrame:cgRect];
|
||||
[luminanceView setLayer:layertemp];
|
||||
}
|
||||
|
||||
layertemp = zxingEngine.binary;
|
||||
if((nil != layertemp) & (nil != binaryView))
|
||||
{
|
||||
nsRect = [[binaryBox contentView] frame];
|
||||
cgRect = [self shrinkContentRect:nsRect];
|
||||
[layertemp setFrame:cgRect];
|
||||
[binaryView setLayer:layertemp];
|
||||
}
|
||||
|
||||
[self performVideoSourceScan];
|
||||
|
||||
[captureButton setTitle:kCANCELTITLE];
|
||||
|
||||
if((nil == captureDevice) && (nil != allVideoDevices) && (0 < [allVideoDevices count]))
|
||||
{
|
||||
[self setCaptureDevice:(QTCaptureDevice*)[allVideoDevices objectAtIndex:0]];
|
||||
}
|
||||
|
||||
|
||||
zxingEngine.captureDevice = captureDevice;
|
||||
zxingEngine.delegate = self;
|
||||
zxingEngine.mirror = mirrorVideoMode;
|
||||
[zxingEngine start];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
|
||||
- (void) applicationWillTerminate:(NSNotification *)notification
|
||||
{
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"AppDelegate::applicationWillTerminate - ENTER");
|
||||
#endif
|
||||
|
||||
// anything needed to be done on the way out?
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
|
||||
- (IBAction) windowWillClose:(NSNotification *)notification
|
||||
{
|
||||
static Boolean beenhere = FALSE;
|
||||
|
||||
NSWindow* theWindow = (NSWindow*)[notification object];
|
||||
|
||||
if(((mainWindow == theWindow) || (nil == notification)) && (beenhere == FALSE))
|
||||
{
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"AppDelegate::windowWillClose - ENTER");
|
||||
#endif
|
||||
|
||||
beenhere = TRUE;
|
||||
[self exitTheApp]; // call this from here?
|
||||
}
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"AppDelegate::dealloc - ENTER");
|
||||
#endif
|
||||
|
||||
[allVideoDevices removeAllObjects];
|
||||
[allVideoDevices release];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------
|
||||
|
||||
- (void) exitTheApp
|
||||
{
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"AppDelegate::exitTheApp - ENTER");
|
||||
#endif
|
||||
|
||||
static Boolean beenhere = FALSE;
|
||||
|
||||
if(FALSE == beenhere)
|
||||
{
|
||||
// shutdown all of the open windows, resources, streams, etc.
|
||||
|
||||
beenhere = TRUE;
|
||||
[NSApp terminate:nil];
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// Find all video input devices for DISPLAY IN POPUP MENU - This does not initialize anything
|
||||
|
||||
- (void) performVideoSourceScan
|
||||
{
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"ZXSourceSelect::performVideoSourceScan - ENTER");
|
||||
#endif
|
||||
|
||||
NSUInteger dex = 0;
|
||||
OSErr err = noErr;
|
||||
NSString* theitemtitle = nil;
|
||||
NSMenuItem* themenuitem = nil;
|
||||
NSArray* theQTarray = nil;
|
||||
|
||||
if(nil != sourceSelectPopupMenu)
|
||||
{
|
||||
NSUInteger count;
|
||||
[sourceSelectPopupMenu removeAllItems]; // wipe popup menu clean
|
||||
|
||||
[sourceSelectPopupMenu addItemWithTitle:kIMAGESOURCESELECTIONPOPUPTITLE]; // always the top item
|
||||
|
||||
[allVideoDevices removeAllObjects]; // wipe array of video devices clean
|
||||
|
||||
// acquire unmuxed devices
|
||||
theQTarray = [NSArray arrayWithArray:[QTCaptureDevice inputDevicesWithMediaType:QTMediaTypeVideo]];
|
||||
if((nil != theQTarray) && (0 < [theQTarray count]))
|
||||
[allVideoDevices addObjectsFromArray:theQTarray];
|
||||
|
||||
// acquire muxed devices
|
||||
theQTarray = [NSArray arrayWithArray:[QTCaptureDevice inputDevicesWithMediaType:QTMediaTypeMuxed]];
|
||||
if((nil != theQTarray) && (0 < [theQTarray count]))
|
||||
[allVideoDevices addObjectsFromArray:theQTarray];
|
||||
|
||||
// did anything show up?
|
||||
count = [allVideoDevices count];
|
||||
if(0 < count)
|
||||
{
|
||||
for(dex = 0; dex < count; dex++)
|
||||
{
|
||||
QTCaptureDevice* aVideoDevice = (QTCaptureDevice*)[allVideoDevices objectAtIndex:dex];
|
||||
if(nil != aVideoDevice)
|
||||
{
|
||||
theitemtitle = [aVideoDevice localizedDisplayName];
|
||||
[sourceSelectPopupMenu addItemWithTitle:theitemtitle]; // NSPopUpButton
|
||||
|
||||
themenuitem = [sourceSelectPopupMenu itemWithTitle:theitemtitle];
|
||||
[themenuitem setTag:(dex+kVIDEOSOURCEOFFSET)];
|
||||
}
|
||||
}
|
||||
}
|
||||
else // reset the menu
|
||||
{
|
||||
err = fnfErr;
|
||||
[sourceSelectPopupMenu removeAllItems];
|
||||
[sourceSelectPopupMenu addItemWithTitle:kIMAGESOURCESELECTIONPOPUPTITLE];
|
||||
[sourceSelectPopupMenu addItemWithTitle:kIMAGESOURCESELECTIONRESCANTITLE];
|
||||
[self setCurrentVideoSourceName:kBLANKSTR];
|
||||
[userdefaults setObject:(id)kBLANKSTR forKey:kVIDEOSOURCETITLE];
|
||||
}
|
||||
|
||||
if(noErr == err)
|
||||
{
|
||||
[sourceSelectPopupMenu addItemWithTitle:kIMAGESOURCESELECTIONRESCANTITLE];
|
||||
[sourceSelectPopupMenu addItemWithTitle:kIMAGESOURCESELECTIONDISCONNECT]; // Disconnect video Source
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// called when user clicks in or selects an item in the popup menu
|
||||
|
||||
- (IBAction) selectedVideoSourceChange:(id)sender
|
||||
{
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"ZXSourceSelect::selectedVideoSourceChange - ENTER");
|
||||
#endif
|
||||
|
||||
[self performSelectorOnMainThread:@selector(configureForVideoSource:) withObject:sender waitUntilDone:NO];
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
|
||||
- (IBAction) configureForVideoSource:(id) sender
|
||||
{
|
||||
NSPopUpButton* videoselections = (id) sender;
|
||||
|
||||
if(nil != videoselections)
|
||||
{
|
||||
NSInteger numberOfItems = [videoselections numberOfItems];
|
||||
if(1 < numberOfItems)
|
||||
{
|
||||
NSMenuItem* selectedItem = [videoselections selectedItem];
|
||||
if(nil != selectedItem)
|
||||
{
|
||||
NSInteger tag = [selectedItem tag];
|
||||
|
||||
// See if it's a source or command that the user has selected
|
||||
|
||||
if(kVIDEOSOURCEOFFSET > tag) // in this case, the user wants to rescan or disable
|
||||
{
|
||||
NSString* selectedItemTitle = [selectedItem title];
|
||||
if(nil != selectedItemTitle)
|
||||
{
|
||||
BOOL isDisableVideoRequest = (NSOrderedSame == [selectedItemTitle compare:kIMAGESOURCESELECTIONDISCONNECT]);
|
||||
if(YES == isDisableVideoRequest)
|
||||
{
|
||||
[sourceSelectPopupMenu removeAllItems];
|
||||
[sourceSelectPopupMenu addItemWithTitle:kIMAGESOURCESELECTIONPOPUPTITLE];
|
||||
[sourceSelectPopupMenu addItemWithTitle:kIMAGESOURCESELECTIONRESCANTITLE];
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOL isRescanRequest = (NSOrderedSame == [selectedItemTitle compare:kIMAGESOURCESELECTIONRESCANTITLE]);
|
||||
if(YES == isRescanRequest)
|
||||
{
|
||||
[self performVideoSourceScan];
|
||||
}
|
||||
else
|
||||
{
|
||||
; // nothing...
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else // changing the selected video to a source that is (or was) known to exist
|
||||
{
|
||||
NSInteger devicecount = [allVideoDevices count];
|
||||
NSInteger tagindex = (tag - kVIDEOSOURCEOFFSET);
|
||||
|
||||
if((0 <= tagindex) && (tagindex < devicecount))
|
||||
{
|
||||
QTCaptureDevice* aCaptureDevice = (QTCaptureDevice*)[allVideoDevices objectAtIndex:tagindex];
|
||||
|
||||
if(nil != aCaptureDevice)
|
||||
{
|
||||
currentVideoSourceName = [aCaptureDevice localizedDisplayName];
|
||||
if(nil != currentVideoSourceName)
|
||||
{
|
||||
if(0 < [currentVideoSourceName length])
|
||||
{
|
||||
[userdefaults setObject:kZXING_VIDEOSOURCENAME forKey:currentVideoSourceName];
|
||||
[userdefaults synchronize];
|
||||
|
||||
[zxingEngine stop];
|
||||
zxingEngine.captureDevice = aCaptureDevice;
|
||||
zxingEngine.delegate = self;
|
||||
zxingEngine.mirror = mirrorVideoMode;
|
||||
[zxingEngine start];
|
||||
}
|
||||
}
|
||||
[self setCaptureDevice:aCaptureDevice]; // releases existing and retains the new device
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"ERROR ZXSourceSelect::presentSourceSelectSheet - tag [%d] for [%@] outside bounds of allVideoDevices count [%d]",
|
||||
(int)tag, [selectedItem title], (int)devicecount);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
|
||||
- (IBAction) captureButtonPressed:(id) sender
|
||||
{
|
||||
#pragma unused(sender)
|
||||
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"AppDelegate::captureButtonPressed - ENTER");
|
||||
#endif
|
||||
|
||||
if(!zxingEngine.running)
|
||||
{
|
||||
// Remove the RESULTS layer if it's there...
|
||||
//if(nil != resultsLayer)
|
||||
// {
|
||||
// [resultsLayer removeFromSuperlayer];
|
||||
// [resultsLayer release];
|
||||
// resultsLayer = nil;
|
||||
// }
|
||||
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"AppDelegate::captureButtonPressed - zxingEngine was not running");
|
||||
#endif
|
||||
|
||||
|
||||
[captureButton setTitle:kCANCELTITLE];
|
||||
[resultsText setStringValue:kBLANKSTR]; // NSTextField
|
||||
|
||||
zxingEngine.captureDevice = captureDevice ;
|
||||
zxingEngine.delegate = self;
|
||||
zxingEngine.mirror = mirrorVideoMode;
|
||||
|
||||
[zxingEngine start];
|
||||
}
|
||||
else // isRunning
|
||||
{
|
||||
[zxingEngine stop];
|
||||
[captureButton setTitle:kCAPTURETITLE];
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
|
||||
- (IBAction) mirrorCheckboxPressed:(id) sender
|
||||
{
|
||||
#pragma unused(sender)
|
||||
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"AppDelegate::mirrorCheckboxPressed - ENTER");
|
||||
#endif
|
||||
|
||||
[self setMirrorVideoMode:[mirrorVideoCheckbox state]];
|
||||
|
||||
[userdefaults setBool:[self mirrorVideoMode] forKey:KZXING_MIRROR_VIDEO];
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
|
||||
- (IBAction) soundsCheckboxPressed:(id) sender
|
||||
{
|
||||
#pragma unused(sender)
|
||||
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"AppDelegate::soundsCheckboxPressed - ENTER");
|
||||
#endif
|
||||
|
||||
[userdefaults setBool:[soundsCheckbox state] forKey:KZXING_SOUND_ON_RESULT];
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
|
||||
- (IBAction) zxingImagePressed:(id) sender
|
||||
{
|
||||
#pragma unused(sender)
|
||||
|
||||
BOOL success = NO;
|
||||
NSURL* zxingweblink = [NSURL URLWithString:kZXINGWEBURL];
|
||||
|
||||
success = [[NSWorkspace sharedWorkspace] openURL:zxingweblink];
|
||||
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
if (YES == success)
|
||||
NSLog(@"AppDelegate::zxingImagePressed - ZXing website access successful.");
|
||||
else
|
||||
NSLog(@"AppDelegate::zxingImagePressed - ZXing website access failed.");
|
||||
#endif
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// The name of the video source saved into prefs is compared to the names in the popup menu
|
||||
// if a match can be made, the menu is set so that item is the selected item and the actual
|
||||
// captureDevice object reference is sent to the ZXCapture object
|
||||
/*
|
||||
- (void) setupVideoSourceMenuForName:(NSString*) inDisplayName
|
||||
{
|
||||
NSString* displayName = inDisplayName;
|
||||
|
||||
if((nil == displayName) && (nil != allVideoDevices))
|
||||
{
|
||||
NSString* savedName = [userdefaults objectForKey:kZXING_VIDEOSOURCENAME];
|
||||
if(nil == savedName)
|
||||
{
|
||||
NSInteger devicecount = [allVideoDevices count];
|
||||
if(0 < devicecount)
|
||||
{
|
||||
QTCaptureDevice* thedevice = [allVideoDevices objectAtIndex:0];
|
||||
if(nil != thedevice)
|
||||
{
|
||||
NSString* thelocalizedDisplayName = [thedevice localizedDisplayName];
|
||||
if(nil != thelocalizedDisplayName)
|
||||
{
|
||||
displayName = thelocalizedDisplayName;
|
||||
[userdefaults setObject:displayName forKey:kZXING_VIDEOSOURCENAME];
|
||||
[userdefaults synchronize];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
displayName = savedName;
|
||||
}
|
||||
}
|
||||
|
||||
if(nil != displayName)
|
||||
{
|
||||
NSInteger menuitemindex = [sourceSelectPopupMenu indexOfItemWithTitle:displayName];
|
||||
|
||||
if(kNO_SUCH_MENU_ITEM != menuitemindex)
|
||||
{
|
||||
if(nil != allVideoDevices)
|
||||
{
|
||||
// there is always a first item = 'Video Source Select' above the actual sources.
|
||||
NSInteger adjustedindex = (menuitemindex - 1);
|
||||
|
||||
if((0 <= adjustedindex) && (adjustedindex < [allVideoDevices count]))
|
||||
{
|
||||
QTCaptureDevice* aCaptureDevice = [allVideoDevices objectAtIndex:adjustedindex];
|
||||
if(nil != aCaptureDevice)
|
||||
{
|
||||
// double check
|
||||
NSString* captureDeviceDisplayName = [aCaptureDevice localizedDisplayName];
|
||||
if(NSOrderedSame == [displayName compare:captureDeviceDisplayName])
|
||||
{
|
||||
NSMenuItem* themenuitem = [sourceSelectPopupMenu itemWithTitle:displayName];
|
||||
[sourceSelectPopupMenu selectItemWithTitle:displayName];
|
||||
|
||||
[userdefaults setObject:displayName forKey:kZXING_VIDEOSOURCENAME];
|
||||
[userdefaults synchronize];
|
||||
[self setCurrentVideoSourceName:displayName];
|
||||
[self setCaptureDevice:aCaptureDevice];
|
||||
if(nil != themenuitem)
|
||||
{
|
||||
[themenuitem setTag:(menuitemindex+kVIDEOSOURCEOFFSET)];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"ERROR ZXSourceSelect::setupVideoSourceMenuForName - Can't match [%@] in allVideoDevices",
|
||||
displayName);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"ERROR ZXSourceSelect::setupVideoSourceMenuForName - 'adjustedindex' [%d] into allvideo Devices array",
|
||||
(int)adjustedindex);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
// ------------------------------------------------------------------------------------------
|
||||
|
||||
- (CGRect) shrinkContentRect:(NSRect) inRect
|
||||
{
|
||||
CGRect result;
|
||||
|
||||
result.origin.x = (inRect.origin.x + kLEFTVIDEOEASE);
|
||||
result.origin.y = (inRect.origin.y + kTOPVIDEOEASE);
|
||||
result.size.width = (inRect.size.width - kWIDTHVIDEOEASE);
|
||||
result.size.height = (inRect.size.height - kHEIGHTVIDEOEASE);
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
|
||||
- (void) setupPreferences:(BOOL) forceReset
|
||||
{
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"AppDelegate::setupPerferences - ENTER - forceReset [%@]", ((YES == forceReset)?@"YES":@"NO"));
|
||||
#endif
|
||||
|
||||
// If there was nothing there, init - else leave previous settings in place
|
||||
NSString* zxinglibsupport = (NSString*)[userdefaults objectForKey:kZXING_LIBSUPPORT];
|
||||
|
||||
if((nil == zxinglibsupport) || (YES == forceReset))
|
||||
{
|
||||
[userdefaults setObject:kZXING_LIBSUPPORT forKey:kZXING_LIBSUPPORT];
|
||||
[userdefaults setBool:NO forKey:KZXING_MIRROR_VIDEO];
|
||||
[userdefaults setBool:YES forKey:KZXING_SOUND_ON_RESULT];
|
||||
|
||||
[userdefaults synchronize];
|
||||
}
|
||||
|
||||
[self setMirrorVideoMode:(BOOL)[userdefaults boolForKey:KZXING_MIRROR_VIDEO]];
|
||||
}
|
||||
|
||||
- (void) setMirrorVideoMode:(BOOL)mirror {
|
||||
mirrorVideoMode = mirror;
|
||||
zxingEngine.mirror = mirror;
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------------------------
|
||||
|
||||
- (ZXCapture*) createZXcapture
|
||||
{
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"AppDelegate::createZXcapture - ENTER");
|
||||
#endif
|
||||
|
||||
ZXCapture* thecaptureobject = [[ZXCapture alloc] init];
|
||||
|
||||
return(thecaptureobject);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------------------
|
||||
|
||||
- (void) setupSound
|
||||
{
|
||||
BOOL playsounds = (BOOL)[userdefaults boolForKey:KZXING_SOUND_ON_RESULT];
|
||||
|
||||
[soundsCheckbox setState:playsounds];
|
||||
|
||||
NSSound* thesound = [NSSound soundNamed:kCAPTURESUCCESSSOUNDFILENAME];
|
||||
if(nil != thesound)
|
||||
{
|
||||
[self setResultsSound:thesound];
|
||||
}
|
||||
}
|
||||
|
||||
// ==========================================================================================
|
||||
//
|
||||
// ZXCaptureDelegate functions:
|
||||
|
||||
- (void)captureResult:(ZXCapture*)zxCapture
|
||||
result:(ZXResult*) inResult
|
||||
{
|
||||
#ifdef __DEBUG_LOGGING_CAPTURE__
|
||||
NSLog(@"AppDelegate::captureResult - ENTER");
|
||||
#endif
|
||||
|
||||
if(nil != inResult)
|
||||
{
|
||||
NSString* resultText = [inResult text];
|
||||
|
||||
if(nil != resultText)
|
||||
{
|
||||
[resultsText setStringValue:resultText];
|
||||
[self manageOverlay:inResult];
|
||||
|
||||
[zxingEngine stop]; // stop and wait for user to want to "Capture" again
|
||||
|
||||
[captureButton setTitle:kCAPTURETITLE];
|
||||
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"AppDelegate::captureResult - inResult text[%@]", resultText);
|
||||
#endif
|
||||
|
||||
BOOL playSound = [soundsCheckbox state];
|
||||
if(YES == playSound)
|
||||
{
|
||||
if(nil != resultsSound)
|
||||
{
|
||||
[resultsSound play];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
|
||||
- (void) presentOverlayForPoints:(CGPoint)point0
|
||||
pt1:(CGPoint)point1
|
||||
pt2:(CGPoint)point2
|
||||
{
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
NSLog(@"AppDelegate::presentOverlayForPoints - ENTER pt0X[%d] pt0Y[%d] pt1X[%d] pt1Y[%d] pt2X[%d] pt2Y[%d]",
|
||||
(int)point0.x, (int)point0.y, (int)point1.x, (int)point1.y, (int)point2.x, (int)point2.y);
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
|
||||
- (void) manageOverlay:(ZXResult*) inResult
|
||||
{
|
||||
#ifdef __DEBUG_LOGGING_CAPTURE__
|
||||
NSLog(@"AppDelegate::manageOverlay - ENTER");
|
||||
#endif
|
||||
/*
|
||||
#ifdef __SHOW_OVERLAY_LAYER__
|
||||
if(nil != resultsLayer)
|
||||
{
|
||||
[resultsLayer removeFromSuperlayer];
|
||||
[resultsLayer release];
|
||||
resultsLayer = nil;
|
||||
}
|
||||
|
||||
resultsLayer = [[ZXOverlay alloc] init];
|
||||
|
||||
// NSRect NSRectFromCGRect(CGRect cgrect); <- handy reference
|
||||
// CGRect NSRectToCGRect(NSrect nsrect);
|
||||
|
||||
NSRect resultsRect = [[previewBox contentView] frame]; // [self shrinkContentRect:
|
||||
[resultsLayer setFrame:NSRectToCGRect(resultsRect)];
|
||||
[resultsLayer plotPointsOnLayer:inResult];
|
||||
[captureLayer addSublayer:resultsLayer];
|
||||
#endif
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// This interface doesn't do anything with this...
|
||||
|
||||
- (void)captureSize:(ZXCapture*) inCapture
|
||||
width:(NSNumber*) inWidth
|
||||
height:(NSNumber*) inHeight
|
||||
{
|
||||
#pragma unused (inCapture, inWidth, inHeight)
|
||||
|
||||
#ifdef __DEBUG_LOGGING__
|
||||
if((0 != [inWidth intValue]) && (0 != [inHeight intValue]))
|
||||
{
|
||||
NSLog(@"AppDelegate::captureSize - ENTER - inWidth [%d] inHeight [%d]",
|
||||
[inWidth intValue], [inHeight intValue]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// finish: ZXCaptureDelegate functions:
|
||||
// ==========================================================================================
|
||||
|
||||
@end
|
35
objc/examples/osx/demo/demo/Defs.h
Normal file
35
objc/examples/osx/demo/demo/Defs.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
#ifndef __DEFS_H__
|
||||
#define __DEFS_H__
|
||||
|
||||
|
||||
#define kZXING_LIBSUPPORT @"dflts_zxing_libsupport"
|
||||
#define KZXING_MIRROR_VIDEO @"dflts_zxing_mirrorvideo"
|
||||
#define KZXING_SOUND_ON_RESULT @"dflts_zxing_soundonresult"
|
||||
#define kZXING_VIDEOSOURCENAME @"dflts_zxing_videosourcename"
|
||||
#define kVIDEOSOURCETITLE @"dflts_videosourcetitle"
|
||||
|
||||
#define kIMAGESOURCESELECTIONPOPUPTITLE @"Select video source"
|
||||
#define kIMAGESOURCESELECTIONRESCANTITLE @"ReScan for video Sources"
|
||||
#define kIMAGESOURCESELECTIONDISCONNECT @"Disconnect video source"
|
||||
|
||||
#define kCAPTURESUCCESSSOUNDFILENAME @"beepbeep.aif"
|
||||
|
||||
|
||||
#define kBACKGROUNDCOLOR CGColorCreateGenericRGB(0.4,0.4,0.4,1.0)
|
||||
#define kWHITEHAZECOLOR CGColorCreateGenericRGB(0.4,0.4,0.4,1.0)
|
||||
|
||||
#define kLEFTVIDEOEASE 8.0
|
||||
#define kTOPVIDEOEASE 8.0
|
||||
#define kWIDTHVIDEOEASE (kLEFTVIDEOEASE*2)
|
||||
#define kHEIGHTVIDEOEASE (kTOPVIDEOEASE*2)
|
||||
|
||||
#define kZXINGWEBURL @"http://code.google.com/p/zxing/"
|
||||
|
||||
#define kCANCELTITLE @"Cancel"
|
||||
#define kCAPTURETITLE @"Capture"
|
||||
|
||||
#define kVIDEOSOURCEOFFSET 1001
|
||||
#define kBLANKSTR @""
|
||||
#define kNO_SUCH_MENU_ITEM -1
|
||||
|
||||
#endif // __DEFS_H__
|
34
objc/examples/osx/demo/demo/demo-Info.plist
Normal file
34
objc/examples/osx/demo/demo/demo-Info.plist
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>applogo.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>zxing.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright 2012 ZXing authors. Licensed under Apache Public License 2.0.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
23
objc/examples/osx/demo/demo/demo-Prefix.pch
Normal file
23
objc/examples/osx/demo/demo/demo-Prefix.pch
Normal file
|
@ -0,0 +1,23 @@
|
|||
//
|
||||
// Prefix header for all source files of the 'demo' target in the 'demo' project
|
||||
//
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#endif
|
||||
|
||||
#ifndef __DEBUG_LOGGING__
|
||||
#define __DEBUG_LOGGING__
|
||||
#endif
|
||||
|
||||
#ifdef __DEBUG_LOGGING_CAPTURE__
|
||||
#undef __DEBUG_LOGGING_CAPTURE__
|
||||
#endif
|
||||
|
||||
#ifdef __SHOW_OVERLAY_LAYER__
|
||||
#undef __SHOW_OVERLAY_LAYER__
|
||||
#endif
|
||||
|
||||
#ifndef __SEE_INTERMEDIATE_LAYERS__
|
||||
#define __SEE_INTERMEDIATE_LAYERS__
|
||||
#endif
|
33
objc/examples/osx/demo/demo/en.lproj/Credits.rtf
Normal file
33
objc/examples/osx/demo/demo/en.lproj/Credits.rtf
Normal file
|
@ -0,0 +1,33 @@
|
|||
{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470
|
||||
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
\vieww9600\viewh8400\viewkind0
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||
|
||||
\f0\b\fs24 \cf0 \
|
||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
|
||||
\cf0 Engineering:
|
||||
\b0 \
|
||||
The ZXing authors - plus Lance Drake\
|
||||
\
|
||||
|
||||
\b Human Interface Design:
|
||||
\b0 \
|
||||
The ZXing authors - plus Lance Drake\
|
||||
\
|
||||
|
||||
\b Testing:\
|
||||
|
||||
\b0 The ZXing authors - plus Lance Drake\
|
||||
\
|
||||
|
||||
\b Documentation:
|
||||
\b0 \
|
||||
visit http://code.google.com/p/zxing/\
|
||||
\
|
||||
|
||||
\b With special thanks to:
|
||||
\b0 \
|
||||
Carl Barks & The Junior Woodchucks\
|
||||
\
|
||||
}
|
2
objc/examples/osx/demo/demo/en.lproj/InfoPlist.strings
Normal file
2
objc/examples/osx/demo/demo/en.lproj/InfoPlist.strings
Normal file
|
@ -0,0 +1,2 @@
|
|||
/* Localized versions of Info.plist keys */
|
||||
|
1996
objc/examples/osx/demo/demo/en.lproj/MainMenu.xib
Normal file
1996
objc/examples/osx/demo/demo/en.lproj/MainMenu.xib
Normal file
File diff suppressed because it is too large
Load diff
BIN
objc/examples/osx/demo/demo/en.lproj/ZXingType.png
Normal file
BIN
objc/examples/osx/demo/demo/en.lproj/ZXingType.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
objc/examples/osx/demo/demo/en.lproj/applogo.icns
Normal file
BIN
objc/examples/osx/demo/demo/en.lproj/applogo.icns
Normal file
Binary file not shown.
BIN
objc/examples/osx/demo/demo/en.lproj/beepbeep.aif
Normal file
BIN
objc/examples/osx/demo/demo/en.lproj/beepbeep.aif
Normal file
Binary file not shown.
BIN
objc/examples/osx/demo/demo/en.lproj/zxinglogo.png
Normal file
BIN
objc/examples/osx/demo/demo/en.lproj/zxinglogo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
23
objc/examples/osx/demo/demo/main.m
Normal file
23
objc/examples/osx/demo/demo/main.m
Normal file
|
@ -0,0 +1,23 @@
|
|||
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
|
||||
/*
|
||||
* Copyright 2012 ZXing authors
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
return NSApplicationMain(argc, (const char **)argv);
|
||||
}
|
1
objc/examples/osx/demo/objc
Symbolic link
1
objc/examples/osx/demo/objc
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../../objc
|
13
objc/src/Prefix.pch
Normal file
13
objc/src/Prefix.pch
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifdef __OBJC__
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#include <TargetConditionals.h>
|
||||
|
||||
#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
|
||||
#import <UIKit/UIKit.h>
|
||||
#else
|
||||
#import <AppKit/AppKit.h>
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,5 +1,4 @@
|
|||
// -*- mode:objc; c-basic-offset:2; indent-tabs-mode:nil -*-
|
||||
|
||||
/*
|
||||
* Copyright 2011 ZXing authors
|
||||
*
|
||||
|
@ -27,6 +26,7 @@
|
|||
#define ZXQT(x)
|
||||
#define ZXCaptureSession AVCaptureSession
|
||||
#define ZXCaptureVideoPreviewLayer AVCaptureVideoPreviewLayer
|
||||
#define ZXCaptureDevice AVCaptureDevice
|
||||
#define ZXCaptureDeviceInput AVCaptureDeviceInput
|
||||
#define ZXCaptureVideoOutput AVCaptureVideoDataOutput
|
||||
#else
|
||||
|
@ -37,6 +37,7 @@
|
|||
#define ZXQT(x) x
|
||||
#define ZXCaptureSession QTCaptureSession
|
||||
#define ZXCaptureVideoPreviewLayer QTCaptureLayer
|
||||
#define ZXCaptureDevice QTCaptureDevice
|
||||
#define ZXCaptureDeviceInput QTCaptureDeviceInput
|
||||
#define ZXCaptureVideoOutput QTCaptureDecompressedVideoOutput
|
||||
#endif
|
||||
|
@ -47,8 +48,9 @@ ZX(<CAAction ZXAVC(AVCaptureVideoDataOutputSampleBufferDelegate)>) {
|
|||
ZX(
|
||||
ZXCaptureSession* session;
|
||||
ZXCaptureVideoPreviewLayer* layer;
|
||||
ZXCaptureVideoOutput* output;
|
||||
ZXCaptureDevice* capture_device;
|
||||
ZXCaptureDeviceInput* input;
|
||||
ZXCaptureVideoOutput* output;
|
||||
id<ZXCaptureDelegate> delegate;
|
||||
)
|
||||
|
||||
|
@ -66,7 +68,8 @@ ZX(<CAAction ZXAVC(AVCaptureVideoDataOutputSampleBufferDelegate)>) {
|
|||
BOOL hard_stop;
|
||||
int camera;
|
||||
BOOL torch;
|
||||
int device;
|
||||
BOOL mirror;
|
||||
int capture_device_index;
|
||||
CGAffineTransform transform;
|
||||
}
|
||||
|
||||
|
@ -75,6 +78,9 @@ ZX(<CAAction ZXAVC(AVCaptureVideoDataOutputSampleBufferDelegate)>) {
|
|||
@property (nonatomic) CGAffineTransform transform;
|
||||
@property (nonatomic, readonly) ZXCaptureVideoOutput* output;
|
||||
@property (nonatomic, readonly) CALayer* layer;
|
||||
@property (nonatomic, retain) ZXCaptureDevice* captureDevice;
|
||||
@property (nonatomic, assign) BOOL mirror;
|
||||
@property (nonatomic, readonly) BOOL running;
|
||||
|
||||
- (id)init;
|
||||
- (CALayer*)luminance;
|
||||
|
@ -129,6 +135,8 @@ ZX(<CAAction ZXAVC(AVCaptureVideoDataOutputSampleBufferDelegate)>) {
|
|||
@property (nonatomic) int camera;
|
||||
@property (nonatomic) BOOL torch;
|
||||
|
||||
@property (nonatomic, assign) BOOL mirror;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -28,14 +28,12 @@
|
|||
#include <ZXing/ZXIllegalArgumentException.h>
|
||||
|
||||
#if TARGET_OS_EMBEDDED || TARGET_IPHONE_SIMULATOR
|
||||
#define ZXCaptureDevice AVCaptureDevice
|
||||
#define ZXCaptureOutput AVCaptureOutput
|
||||
#define ZXMediaTypeVideo AVMediaTypeVideo
|
||||
#define ZXCaptureConnection AVCaptureConnection
|
||||
#else
|
||||
#define ZXCaptureOutput QTCaptureOutput
|
||||
#define ZXCaptureConnection QTCaptureConnection
|
||||
#define ZXCaptureDevice QTCaptureDevice
|
||||
#define ZXMediaTypeVideo QTMediaTypeVideo
|
||||
#endif
|
||||
|
||||
|
@ -57,7 +55,8 @@ static bool isIPad();
|
|||
width = 1920;
|
||||
height = 1080;
|
||||
hard_stop = false;
|
||||
device = -1;
|
||||
capture_device = 0;
|
||||
capture_device_index = -1;
|
||||
order_in_skip = 0;
|
||||
order_out_skip = 0;
|
||||
transform = CGAffineTransformIdentity;
|
||||
|
@ -68,11 +67,31 @@ static bool isIPad();
|
|||
return self;
|
||||
}
|
||||
|
||||
- (BOOL)running {return running;}
|
||||
|
||||
- (BOOL)mirror {
|
||||
return mirror;
|
||||
}
|
||||
|
||||
- (void)setMirror:(BOOL)mirror_ {
|
||||
if (mirror != mirror_) {
|
||||
mirror = mirror_;
|
||||
if (layer) {
|
||||
transform.a = -transform.a;
|
||||
[layer setAffineTransform:transform];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)order_skip {
|
||||
order_out_skip = order_in_skip = 1;
|
||||
}
|
||||
|
||||
- (ZXCaptureDevice*)device {
|
||||
if (capture_device) {
|
||||
return capture_device;
|
||||
}
|
||||
|
||||
ZXCaptureDevice* zxd = nil;
|
||||
|
||||
#if ZXAV(1)+0
|
||||
|
@ -82,7 +101,7 @@ static bool isIPad();
|
|||
ZXQT(inputDevicesWithMediaType:) ZXMediaTypeVideo];
|
||||
|
||||
if ([devices count] > 0) {
|
||||
if (device == -1) {
|
||||
if (capture_device_index == -1) {
|
||||
AVCaptureDevicePosition position = AVCaptureDevicePositionBack;
|
||||
if (camera == self.front) {
|
||||
position = AVCaptureDevicePositionFront;
|
||||
|
@ -91,15 +110,15 @@ static bool isIPad();
|
|||
for(unsigned int i=0; i < [devices count]; ++i) {
|
||||
ZXCaptureDevice* dev = [devices objectAtIndex:i];
|
||||
if (dev.position == position) {
|
||||
device = i;
|
||||
capture_device_index = i;
|
||||
zxd = dev;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!zxd && device != -1) {
|
||||
zxd = [devices objectAtIndex:device];
|
||||
if (!zxd && capture_device_index != -1) {
|
||||
zxd = [devices objectAtIndex:capture_device_index];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -111,9 +130,31 @@ static bool isIPad();
|
|||
ZXQT(defaultInputDeviceWithMediaType:) ZXMediaTypeVideo];
|
||||
}
|
||||
|
||||
capture_device = [zxd retain];
|
||||
|
||||
return zxd;
|
||||
}
|
||||
|
||||
- (ZXCaptureDevice*)captureDevice {
|
||||
return capture_device;
|
||||
}
|
||||
|
||||
- (void)setCaptureDevice:(ZXCaptureDevice*)device {
|
||||
if (device == capture_device) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(capture_device) {
|
||||
ZXQT({
|
||||
if ([capture_device isOpen]) {
|
||||
[capture_device close];
|
||||
}});
|
||||
[capture_device release];
|
||||
}
|
||||
|
||||
capture_device = [device retain];
|
||||
}
|
||||
|
||||
- (void)replaceInput {
|
||||
if (session && input) {
|
||||
[session removeInput:input];
|
||||
|
@ -134,7 +175,8 @@ static bool isIPad();
|
|||
if (input) {
|
||||
ZXAV({
|
||||
NSString* preset = 0;
|
||||
if (NSClassFromString(@"NSOrderedSet") && // Proxy for "is this iOS 5" ...
|
||||
if (!preset &&
|
||||
NSClassFromString(@"NSOrderedSet") && // Proxy for "is this iOS 5" ...
|
||||
[UIScreen mainScreen].scale > 1 &&
|
||||
isIPad() &&
|
||||
[zxd supportsAVCaptureSessionPreset:AVCaptureSessionPresetiFrame960x540]) {
|
||||
|
@ -181,7 +223,7 @@ static bool isIPad();
|
|||
NSMutableDictionary* attributes =
|
||||
[NSMutableDictionary dictionaryWithObject:value forKey:key];
|
||||
key = (NSString*)kCVPixelBufferWidthKey;
|
||||
value = [NSNumber numberWithUnsignedInt:width];
|
||||
value = [NSNumber numberWithUnsignedInt:width];
|
||||
[attributes setObject:value forKey:key];
|
||||
key = (NSString*)kCVPixelBufferHeightKey;
|
||||
value = [NSNumber numberWithUnsignedInt:height];
|
||||
|
@ -402,7 +444,7 @@ ZXAV(didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer)
|
|||
|
||||
ZXAV(CVImageBufferRef videoFrame = CMSampleBufferGetImageBuffer(sampleBuffer));
|
||||
|
||||
// NSLog(@"%d %d", CVPixelBufferGetWidth(videoFrame), CVPixelBufferGetHeight(videoFrame));
|
||||
// NSLog(@"%ld %ld", CVPixelBufferGetWidth(videoFrame), CVPixelBufferGetHeight(videoFrame));
|
||||
// NSLog(@"delegate %@", delegate);
|
||||
|
||||
ZXQT({
|
||||
|
@ -412,12 +454,15 @@ ZXAV(didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer)
|
|||
formatDescriptionAttributes] objectForKey:@"videoEncodedPixelsSize"] sizeValue];
|
||||
width = size.width;
|
||||
height = size.height;
|
||||
// NSLog(@"reported: %f x %f", size.width, size.height);
|
||||
[self performSelectorOnMainThread:@selector(setOutputAttributes) withObject:nil waitUntilDone:NO];
|
||||
reported_width = size.width;
|
||||
reported_height = size.height;
|
||||
[delegate captureSize:self
|
||||
width:[NSNumber numberWithFloat:size.width]
|
||||
height:[NSNumber numberWithFloat:size.height]];
|
||||
if ([delegate respondsTo:@selector(captureSize:width:height:)]) {
|
||||
[delegate captureSize:self
|
||||
width:[NSNumber numberWithFloat:size.width]
|
||||
height:[NSNumber numberWithFloat:size.height]];
|
||||
}
|
||||
}});
|
||||
|
||||
(void)sampleBuffer;
|
||||
|
@ -545,7 +590,9 @@ ZXAV(didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer)
|
|||
- (void)setCamera:(int)camera_ {
|
||||
if (camera != camera_) {
|
||||
camera = camera_;
|
||||
device = -1;
|
||||
capture_device_index = -1;
|
||||
[capture_device release];
|
||||
capture_device = 0;
|
||||
if (running) {
|
||||
[self replaceInput];
|
||||
}
|
||||
|
@ -606,6 +653,7 @@ static bool isIPad() {
|
|||
@synthesize delegate;
|
||||
@synthesize transform;
|
||||
@synthesize captureToFilename;
|
||||
@synthesize mirror;
|
||||
|
||||
- (id)init {
|
||||
if ((self = [super init])) {
|
||||
|
@ -614,6 +662,8 @@ static bool isIPad() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
- (BOOL)running {return NO;}
|
||||
|
||||
- (CALayer*)layer {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
@protocol ZXCaptureDelegate <NSObject>
|
||||
|
||||
- (void)captureResult:(ZXCapture*)capture result:(ZXResult*)result;
|
||||
|
||||
@optional
|
||||
- (void)captureSize:(ZXCapture*)capture
|
||||
width:(NSNumber*)width
|
||||
height:(NSNumber*)height;
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
*/
|
||||
|
||||
#import <ZXing/ZXImage.h>
|
||||
#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
|
||||
#import <ImageIO/CGImageSource.h>
|
||||
#endif
|
||||
|
||||
@implementation ZXImage
|
||||
|
||||
|
|
|
@ -15,13 +15,14 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <zxing/Result.h>
|
||||
@class ZXResultInternal;
|
||||
|
||||
@interface ZXResult : NSObject {
|
||||
zxing::Ref<zxing::Result> native;
|
||||
ZXResultInternal* state_;
|
||||
}
|
||||
|
||||
- (ZXResult*)initWithNative:(zxing::Result*)native;
|
||||
- (NSString*)text;
|
||||
@property (readonly) NSString* text;
|
||||
|
||||
- (ZXResult*)initWithNative:(void*)native;
|
||||
|
||||
@end
|
||||
|
|
|
@ -16,24 +16,44 @@
|
|||
*/
|
||||
|
||||
#import <ZXing/ZXResult.h>
|
||||
#include <zxing/result.h>
|
||||
|
||||
@interface ZXResultInternal : NSObject {
|
||||
zxing::Ref<zxing::Result> native;
|
||||
}
|
||||
- (id)init:(void*)native;
|
||||
- (zxing::Ref<zxing::Result> const&) native;
|
||||
@end
|
||||
@implementation ZXResultInternal
|
||||
- (id)init:(void*)native_ {
|
||||
if ((self = [super init])) {
|
||||
native = (zxing::Result*)native_;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
- (zxing::Ref<zxing::Result> const&)native {
|
||||
return native;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation ZXResult
|
||||
|
||||
- (ZXResult*)initWithNative:(zxing::Result*)result {
|
||||
- (ZXResult*)initWithNative:(void*)native {
|
||||
if ((self = [super init])) {
|
||||
native = result;
|
||||
state_ = [[ZXResultInternal alloc] init:native];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
native = 0;
|
||||
[state_ release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString*)text {
|
||||
return [NSString stringWithCString:native->getText()->getText().c_str()
|
||||
encoding:NSUTF8StringEncoding];
|
||||
return [NSString
|
||||
stringWithCString:[state_ native]->getText()->getText().c_str()
|
||||
encoding:NSUTF8StringEncoding];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
2
objc/zxing-objc-framework/en.lproj/InfoPlist.strings
Normal file
2
objc/zxing-objc-framework/en.lproj/InfoPlist.strings
Normal file
|
@ -0,0 +1,2 @@
|
|||
/* Localized versions of Info.plist keys */
|
||||
|
30
objc/zxing-objc-framework/zxing-objc-framework-Info.plist
Normal file
30
objc/zxing-objc-framework/zxing-objc-framework-Info.plist
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>zxing.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2012 __MyCompanyName__. All rights reserved.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,7 @@
|
|||
//
|
||||
// Prefix header for all source files of the 'zxing-objc-framework' target in the 'zxing-objc-framework' project
|
||||
//
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#endif
|
13
objc/zxing-objc-framework/zxing_objc_framework.h
Normal file
13
objc/zxing-objc-framework/zxing_objc_framework.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
//
|
||||
// zxing_objc_framework.h
|
||||
// zxing-objc-framework
|
||||
//
|
||||
// Created by Steven Parkes on 6/17/12.
|
||||
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface zxing_objc_framework : NSObject
|
||||
|
||||
@end
|
13
objc/zxing-objc-framework/zxing_objc_framework.m
Normal file
13
objc/zxing-objc-framework/zxing_objc_framework.m
Normal file
|
@ -0,0 +1,13 @@
|
|||
//
|
||||
// zxing_objc_framework.m
|
||||
// zxing-objc-framework
|
||||
//
|
||||
// Created by Steven Parkes on 6/17/12.
|
||||
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
|
||||
//
|
||||
|
||||
#import "zxing_objc_framework.h"
|
||||
|
||||
@implementation zxing_objc_framework
|
||||
|
||||
@end
|
686
objc/zxing-objc.xcodeproj/project.pbxproj
Normal file
686
objc/zxing-objc.xcodeproj/project.pbxproj
Normal file
|
@ -0,0 +1,686 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
3B1C7FDE15916B770074F246 /* libzxing-cpp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B5D0F601590F9CF00C33931 /* libzxing-cpp.a */; };
|
||||
3B5D0F621590FB5000C33931 /* libzxing-cpp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B5D0F601590F9CF00C33931 /* libzxing-cpp.a */; };
|
||||
3B83EB5C158E6CAB00A3B31F /* CGImageLuminanceSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB3A158E6CAB00A3B31F /* CGImageLuminanceSource.mm */; };
|
||||
3B83EB5D158E6CAB00A3B31F /* ZXBinarizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B83EB3B158E6CAB00A3B31F /* ZXBinarizer.h */; };
|
||||
3B83EB5E158E6CAB00A3B31F /* ZXBinarizer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB3C158E6CAB00A3B31F /* ZXBinarizer.mm */; };
|
||||
3B83EB5F158E6CAB00A3B31F /* ZXBinaryBitmap.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B83EB3D158E6CAB00A3B31F /* ZXBinaryBitmap.h */; };
|
||||
3B83EB60158E6CAB00A3B31F /* ZXBinaryBitmap.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB3E158E6CAB00A3B31F /* ZXBinaryBitmap.mm */; };
|
||||
3B83EB61158E6CAB00A3B31F /* ZXCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B83EB3F158E6CAB00A3B31F /* ZXCapture.h */; };
|
||||
3B83EB62158E6CAB00A3B31F /* ZXCapture.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB40158E6CAB00A3B31F /* ZXCapture.mm */; };
|
||||
3B83EB63158E6CAB00A3B31F /* ZXCaptureDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B83EB41158E6CAB00A3B31F /* ZXCaptureDelegate.h */; };
|
||||
3B83EB64158E6CAB00A3B31F /* ZXCaptureView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B83EB42158E6CAB00A3B31F /* ZXCaptureView.h */; };
|
||||
3B83EB65158E6CAB00A3B31F /* ZXCaptureView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB43158E6CAB00A3B31F /* ZXCaptureView.mm */; };
|
||||
3B83EB66158E6CAB00A3B31F /* ZXCGImageLuminanceSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B83EB44158E6CAB00A3B31F /* ZXCGImageLuminanceSource.h */; };
|
||||
3B83EB67158E6CAB00A3B31F /* ZXCGImageLuminanceSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB45158E6CAB00A3B31F /* ZXCGImageLuminanceSource.mm */; };
|
||||
3B83EB68158E6CAB00A3B31F /* ZXDecodeHints.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B83EB46158E6CAB00A3B31F /* ZXDecodeHints.h */; };
|
||||
3B83EB69158E6CAB00A3B31F /* ZXDecodeHints.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB47158E6CAB00A3B31F /* ZXDecodeHints.mm */; };
|
||||
3B83EB6A158E6CAB00A3B31F /* ZXHybridBinarizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B83EB48158E6CAB00A3B31F /* ZXHybridBinarizer.h */; };
|
||||
3B83EB6B158E6CAB00A3B31F /* ZXHybridBinarizer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB49158E6CAB00A3B31F /* ZXHybridBinarizer.mm */; };
|
||||
3B83EB6C158E6CAB00A3B31F /* ZXIllegalArgumentException.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B83EB4A158E6CAB00A3B31F /* ZXIllegalArgumentException.h */; };
|
||||
3B83EB6D158E6CAB00A3B31F /* ZXIllegalArgumentException.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB4B158E6CAB00A3B31F /* ZXIllegalArgumentException.mm */; };
|
||||
3B83EB6E158E6CAB00A3B31F /* ZXImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B83EB4C158E6CAB00A3B31F /* ZXImage.h */; };
|
||||
3B83EB6F158E6CAB00A3B31F /* ZXImage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB4D158E6CAB00A3B31F /* ZXImage.mm */; };
|
||||
3B83EB70158E6CAB00A3B31F /* ZXInit.c in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB4E158E6CAB00A3B31F /* ZXInit.c */; };
|
||||
3B83EB71158E6CAB00A3B31F /* ZXLuminanceSource.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B83EB4F158E6CAB00A3B31F /* ZXLuminanceSource.h */; };
|
||||
3B83EB72158E6CAB00A3B31F /* ZXLuminanceSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB50158E6CAB00A3B31F /* ZXLuminanceSource.mm */; };
|
||||
3B83EB73158E6CAB00A3B31F /* ZXMultiFormatReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B83EB51158E6CAB00A3B31F /* ZXMultiFormatReader.h */; };
|
||||
3B83EB74158E6CAB00A3B31F /* ZXMultiFormatReader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB52158E6CAB00A3B31F /* ZXMultiFormatReader.mm */; };
|
||||
3B83EB75158E6CAB00A3B31F /* ZXQRCodeReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B83EB53158E6CAB00A3B31F /* ZXQRCodeReader.h */; };
|
||||
3B83EB76158E6CAB00A3B31F /* ZXQRCodeReader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB54158E6CAB00A3B31F /* ZXQRCodeReader.mm */; };
|
||||
3B83EB77158E6CAB00A3B31F /* ZXReader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B83EB55158E6CAB00A3B31F /* ZXReader.h */; };
|
||||
3B83EB78158E6CAB00A3B31F /* ZXReader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB56158E6CAB00A3B31F /* ZXReader.mm */; };
|
||||
3B83EB79158E6CAB00A3B31F /* ZXReaderException.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B83EB57158E6CAB00A3B31F /* ZXReaderException.h */; };
|
||||
3B83EB7A158E6CAB00A3B31F /* ZXReaderException.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB58158E6CAB00A3B31F /* ZXReaderException.mm */; };
|
||||
3B83EB7B158E6CAB00A3B31F /* ZXResult.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B83EB59158E6CAB00A3B31F /* ZXResult.h */; };
|
||||
3B83EB7C158E6CAB00A3B31F /* ZXResult.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB5A158E6CAB00A3B31F /* ZXResult.mm */; };
|
||||
3B83EB7D158E6CAB00A3B31F /* ZXView.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B83EB5B158E6CAB00A3B31F /* ZXView.h */; };
|
||||
3B83EB92158E71AD00A3B31F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B83EB91158E71AD00A3B31F /* Cocoa.framework */; };
|
||||
3B83EB9C158E71AD00A3B31F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3B83EB9A158E71AD00A3B31F /* InfoPlist.strings */; };
|
||||
3BC3D66E158E83B00037CE30 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BC3D66D158E83B00037CE30 /* ImageIO.framework */; };
|
||||
3BC3D681158E8BE80037CE30 /* CGImageLuminanceSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB3A158E6CAB00A3B31F /* CGImageLuminanceSource.mm */; };
|
||||
3BC3D682158E8BEF0037CE30 /* ZXBinarizer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB3C158E6CAB00A3B31F /* ZXBinarizer.mm */; };
|
||||
3BC3D683158E8C030037CE30 /* ZXBinaryBitmap.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB3E158E6CAB00A3B31F /* ZXBinaryBitmap.mm */; };
|
||||
3BC3D684158E8C070037CE30 /* ZXCapture.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB40158E6CAB00A3B31F /* ZXCapture.mm */; };
|
||||
3BC3D685158E8C0B0037CE30 /* ZXCaptureView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB43158E6CAB00A3B31F /* ZXCaptureView.mm */; };
|
||||
3BC3D686158E8C0F0037CE30 /* ZXCGImageLuminanceSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB45158E6CAB00A3B31F /* ZXCGImageLuminanceSource.mm */; };
|
||||
3BC3D687158E8C120037CE30 /* ZXDecodeHints.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB47158E6CAB00A3B31F /* ZXDecodeHints.mm */; };
|
||||
3BC3D688158E8C160037CE30 /* ZXHybridBinarizer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB49158E6CAB00A3B31F /* ZXHybridBinarizer.mm */; };
|
||||
3BC3D689158E8C190037CE30 /* ZXIllegalArgumentException.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB4B158E6CAB00A3B31F /* ZXIllegalArgumentException.mm */; };
|
||||
3BC3D68A158E8C1D0037CE30 /* ZXImage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB4D158E6CAB00A3B31F /* ZXImage.mm */; };
|
||||
3BC3D68B158E8C200037CE30 /* ZXLuminanceSource.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB50158E6CAB00A3B31F /* ZXLuminanceSource.mm */; };
|
||||
3BC3D68C158E8C240037CE30 /* ZXMultiFormatReader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB52158E6CAB00A3B31F /* ZXMultiFormatReader.mm */; };
|
||||
3BC3D68D158E8C280037CE30 /* ZXQRCodeReader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB54158E6CAB00A3B31F /* ZXQRCodeReader.mm */; };
|
||||
3BC3D68E158E8C2C0037CE30 /* ZXReader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB56158E6CAB00A3B31F /* ZXReader.mm */; };
|
||||
3BC3D68F158E8C2F0037CE30 /* ZXReaderException.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB58158E6CAB00A3B31F /* ZXReaderException.mm */; };
|
||||
3BC3D690158E8C330037CE30 /* ZXResult.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3B83EB5A158E6CAB00A3B31F /* ZXResult.mm */; };
|
||||
3BC3D693158E8CA90037CE30 /* libiconv.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BC3D692158E8CA90037CE30 /* libiconv.dylib */; };
|
||||
3BC3D695158E8CCD0037CE30 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BC3D694158E8CCD0037CE30 /* CoreVideo.framework */; };
|
||||
3BC3D697158E8CFD0037CE30 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BC3D696158E8CFD0037CE30 /* QuartzCore.framework */; };
|
||||
3BC3D69B158E8D5B0037CE30 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BC3D69A158E8D5B0037CE30 /* QTKit.framework */; };
|
||||
3BC3D69D158E8E7F0037CE30 /* zxing_objc_framework.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BC3D69C158E8E7F0037CE30 /* zxing_objc_framework.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
3BC3D69F158E8E880037CE30 /* zxing_objc_framework.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BC3D69E158E8E880037CE30 /* zxing_objc_framework.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
3B5D0F5F1590F9CF00C33931 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 3B5D0F581590F9CE00C33931 /* zxing-cpp.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 3B83E98E158E66C600A3B31F;
|
||||
remoteInfo = "zxing-cpp";
|
||||
};
|
||||
3B83EBA4158E71CA00A3B31F /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 3B83EB1C158E6C5100A3B31F /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 3B83EB24158E6C5100A3B31F;
|
||||
remoteInfo = "zxing-objc";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
3B5D0F581590F9CE00C33931 /* zxing-cpp.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "zxing-cpp.xcodeproj"; path = "../cpp/zxing-cpp.xcodeproj"; sourceTree = "<group>"; };
|
||||
3B83EB25158E6C5100A3B31F /* libzxing-objc.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libzxing-objc.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3B83EB28158E6C5100A3B31F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
3B83EB3A158E6CAB00A3B31F /* CGImageLuminanceSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CGImageLuminanceSource.mm; sourceTree = "<group>"; };
|
||||
3B83EB3B158E6CAB00A3B31F /* ZXBinarizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXBinarizer.h; sourceTree = "<group>"; };
|
||||
3B83EB3C158E6CAB00A3B31F /* ZXBinarizer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ZXBinarizer.mm; sourceTree = "<group>"; };
|
||||
3B83EB3D158E6CAB00A3B31F /* ZXBinaryBitmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXBinaryBitmap.h; sourceTree = "<group>"; };
|
||||
3B83EB3E158E6CAB00A3B31F /* ZXBinaryBitmap.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ZXBinaryBitmap.mm; sourceTree = "<group>"; };
|
||||
3B83EB3F158E6CAB00A3B31F /* ZXCapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXCapture.h; sourceTree = "<group>"; };
|
||||
3B83EB40158E6CAB00A3B31F /* ZXCapture.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ZXCapture.mm; sourceTree = "<group>"; };
|
||||
3B83EB41158E6CAB00A3B31F /* ZXCaptureDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXCaptureDelegate.h; sourceTree = "<group>"; };
|
||||
3B83EB42158E6CAB00A3B31F /* ZXCaptureView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXCaptureView.h; sourceTree = "<group>"; };
|
||||
3B83EB43158E6CAB00A3B31F /* ZXCaptureView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ZXCaptureView.mm; sourceTree = "<group>"; };
|
||||
3B83EB44158E6CAB00A3B31F /* ZXCGImageLuminanceSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXCGImageLuminanceSource.h; sourceTree = "<group>"; };
|
||||
3B83EB45158E6CAB00A3B31F /* ZXCGImageLuminanceSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ZXCGImageLuminanceSource.mm; sourceTree = "<group>"; };
|
||||
3B83EB46158E6CAB00A3B31F /* ZXDecodeHints.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXDecodeHints.h; sourceTree = "<group>"; };
|
||||
3B83EB47158E6CAB00A3B31F /* ZXDecodeHints.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ZXDecodeHints.mm; sourceTree = "<group>"; };
|
||||
3B83EB48158E6CAB00A3B31F /* ZXHybridBinarizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXHybridBinarizer.h; sourceTree = "<group>"; };
|
||||
3B83EB49158E6CAB00A3B31F /* ZXHybridBinarizer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ZXHybridBinarizer.mm; sourceTree = "<group>"; };
|
||||
3B83EB4A158E6CAB00A3B31F /* ZXIllegalArgumentException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXIllegalArgumentException.h; sourceTree = "<group>"; };
|
||||
3B83EB4B158E6CAB00A3B31F /* ZXIllegalArgumentException.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ZXIllegalArgumentException.mm; sourceTree = "<group>"; };
|
||||
3B83EB4C158E6CAB00A3B31F /* ZXImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXImage.h; sourceTree = "<group>"; };
|
||||
3B83EB4D158E6CAB00A3B31F /* ZXImage.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ZXImage.mm; sourceTree = "<group>"; };
|
||||
3B83EB4E158E6CAB00A3B31F /* ZXInit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ZXInit.c; sourceTree = "<group>"; };
|
||||
3B83EB4F158E6CAB00A3B31F /* ZXLuminanceSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXLuminanceSource.h; sourceTree = "<group>"; };
|
||||
3B83EB50158E6CAB00A3B31F /* ZXLuminanceSource.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ZXLuminanceSource.mm; sourceTree = "<group>"; };
|
||||
3B83EB51158E6CAB00A3B31F /* ZXMultiFormatReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXMultiFormatReader.h; sourceTree = "<group>"; };
|
||||
3B83EB52158E6CAB00A3B31F /* ZXMultiFormatReader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ZXMultiFormatReader.mm; sourceTree = "<group>"; };
|
||||
3B83EB53158E6CAB00A3B31F /* ZXQRCodeReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXQRCodeReader.h; sourceTree = "<group>"; };
|
||||
3B83EB54158E6CAB00A3B31F /* ZXQRCodeReader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ZXQRCodeReader.mm; sourceTree = "<group>"; };
|
||||
3B83EB55158E6CAB00A3B31F /* ZXReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXReader.h; sourceTree = "<group>"; };
|
||||
3B83EB56158E6CAB00A3B31F /* ZXReader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ZXReader.mm; sourceTree = "<group>"; };
|
||||
3B83EB57158E6CAB00A3B31F /* ZXReaderException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXReaderException.h; sourceTree = "<group>"; };
|
||||
3B83EB58158E6CAB00A3B31F /* ZXReaderException.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ZXReaderException.mm; sourceTree = "<group>"; };
|
||||
3B83EB59158E6CAB00A3B31F /* ZXResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXResult.h; sourceTree = "<group>"; };
|
||||
3B83EB5A158E6CAB00A3B31F /* ZXResult.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ZXResult.mm; sourceTree = "<group>"; };
|
||||
3B83EB5B158E6CAB00A3B31F /* ZXView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZXView.h; sourceTree = "<group>"; };
|
||||
3B83EB90158E71AD00A3B31F /* zxing-objc-framework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = "zxing-objc-framework.framework"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3B83EB91158E71AD00A3B31F /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = Library/Frameworks/Cocoa.framework; sourceTree = DEVELOPER_DIR; };
|
||||
3B83EB94158E71AD00A3B31F /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
|
||||
3B83EB95158E71AD00A3B31F /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
|
||||
3B83EB96158E71AD00A3B31F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
3B83EB99158E71AD00A3B31F /* zxing-objc-framework-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "zxing-objc-framework-Info.plist"; sourceTree = "<group>"; };
|
||||
3B83EB9B158E71AD00A3B31F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
3B83EB9D158E71AD00A3B31F /* zxing-objc-framework-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "zxing-objc-framework-Prefix.pch"; sourceTree = "<group>"; };
|
||||
3BC3D66D158E83B00037CE30 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };
|
||||
3BC3D692158E8CA90037CE30 /* libiconv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libiconv.dylib; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib/libiconv.dylib; sourceTree = DEVELOPER_DIR; };
|
||||
3BC3D694158E8CCD0037CE30 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/CoreVideo.framework; sourceTree = DEVELOPER_DIR; };
|
||||
3BC3D696158E8CFD0037CE30 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/QuartzCore.framework; sourceTree = DEVELOPER_DIR; };
|
||||
3BC3D698158E8D150037CE30 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/QuickTime.framework; sourceTree = DEVELOPER_DIR; };
|
||||
3BC3D69A158E8D5B0037CE30 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/QTKit.framework; sourceTree = DEVELOPER_DIR; };
|
||||
3BC3D69C158E8E7F0037CE30 /* zxing_objc_framework.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zxing_objc_framework.h; sourceTree = "<group>"; };
|
||||
3BC3D69E158E8E880037CE30 /* zxing_objc_framework.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = zxing_objc_framework.m; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
3B83EB22158E6C5100A3B31F /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3B1C7FDE15916B770074F246 /* libzxing-cpp.a in Frameworks */,
|
||||
3BC3D66E158E83B00037CE30 /* ImageIO.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3B83EB8C158E71AD00A3B31F /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3B5D0F621590FB5000C33931 /* libzxing-cpp.a in Frameworks */,
|
||||
3BC3D69B158E8D5B0037CE30 /* QTKit.framework in Frameworks */,
|
||||
3BC3D697158E8CFD0037CE30 /* QuartzCore.framework in Frameworks */,
|
||||
3BC3D695158E8CCD0037CE30 /* CoreVideo.framework in Frameworks */,
|
||||
3BC3D693158E8CA90037CE30 /* libiconv.dylib in Frameworks */,
|
||||
3B83EB92158E71AD00A3B31F /* Cocoa.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
3B5D0F591590F9CE00C33931 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B5D0F601590F9CF00C33931 /* libzxing-cpp.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B83EB1A158E6C5100A3B31F = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B5D0F581590F9CE00C33931 /* zxing-cpp.xcodeproj */,
|
||||
3B83EB39158E6CAB00A3B31F /* ZXing */,
|
||||
3B83EB97158E71AD00A3B31F /* zxing-objc-framework */,
|
||||
3B83EB27158E6C5100A3B31F /* Frameworks */,
|
||||
3B83EB26158E6C5100A3B31F /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B83EB26158E6C5100A3B31F /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B83EB25158E6C5100A3B31F /* libzxing-objc.a */,
|
||||
3B83EB90158E71AD00A3B31F /* zxing-objc-framework.framework */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B83EB27158E6C5100A3B31F /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3BC3D69A158E8D5B0037CE30 /* QTKit.framework */,
|
||||
3BC3D698158E8D150037CE30 /* QuickTime.framework */,
|
||||
3BC3D696158E8CFD0037CE30 /* QuartzCore.framework */,
|
||||
3BC3D694158E8CCD0037CE30 /* CoreVideo.framework */,
|
||||
3BC3D692158E8CA90037CE30 /* libiconv.dylib */,
|
||||
3BC3D66D158E83B00037CE30 /* ImageIO.framework */,
|
||||
3B83EB28158E6C5100A3B31F /* Foundation.framework */,
|
||||
3B83EB91158E71AD00A3B31F /* Cocoa.framework */,
|
||||
3B83EB93158E71AD00A3B31F /* Other Frameworks */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B83EB39158E6CAB00A3B31F /* ZXing */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B83EB3A158E6CAB00A3B31F /* CGImageLuminanceSource.mm */,
|
||||
3B83EB3B158E6CAB00A3B31F /* ZXBinarizer.h */,
|
||||
3B83EB3C158E6CAB00A3B31F /* ZXBinarizer.mm */,
|
||||
3B83EB3D158E6CAB00A3B31F /* ZXBinaryBitmap.h */,
|
||||
3B83EB3E158E6CAB00A3B31F /* ZXBinaryBitmap.mm */,
|
||||
3B83EB3F158E6CAB00A3B31F /* ZXCapture.h */,
|
||||
3B83EB40158E6CAB00A3B31F /* ZXCapture.mm */,
|
||||
3B83EB41158E6CAB00A3B31F /* ZXCaptureDelegate.h */,
|
||||
3B83EB42158E6CAB00A3B31F /* ZXCaptureView.h */,
|
||||
3B83EB43158E6CAB00A3B31F /* ZXCaptureView.mm */,
|
||||
3B83EB44158E6CAB00A3B31F /* ZXCGImageLuminanceSource.h */,
|
||||
3B83EB45158E6CAB00A3B31F /* ZXCGImageLuminanceSource.mm */,
|
||||
3B83EB46158E6CAB00A3B31F /* ZXDecodeHints.h */,
|
||||
3B83EB47158E6CAB00A3B31F /* ZXDecodeHints.mm */,
|
||||
3B83EB48158E6CAB00A3B31F /* ZXHybridBinarizer.h */,
|
||||
3B83EB49158E6CAB00A3B31F /* ZXHybridBinarizer.mm */,
|
||||
3B83EB4A158E6CAB00A3B31F /* ZXIllegalArgumentException.h */,
|
||||
3B83EB4B158E6CAB00A3B31F /* ZXIllegalArgumentException.mm */,
|
||||
3B83EB4C158E6CAB00A3B31F /* ZXImage.h */,
|
||||
3B83EB4D158E6CAB00A3B31F /* ZXImage.mm */,
|
||||
3B83EB4E158E6CAB00A3B31F /* ZXInit.c */,
|
||||
3B83EB4F158E6CAB00A3B31F /* ZXLuminanceSource.h */,
|
||||
3B83EB50158E6CAB00A3B31F /* ZXLuminanceSource.mm */,
|
||||
3B83EB51158E6CAB00A3B31F /* ZXMultiFormatReader.h */,
|
||||
3B83EB52158E6CAB00A3B31F /* ZXMultiFormatReader.mm */,
|
||||
3B83EB53158E6CAB00A3B31F /* ZXQRCodeReader.h */,
|
||||
3B83EB54158E6CAB00A3B31F /* ZXQRCodeReader.mm */,
|
||||
3B83EB55158E6CAB00A3B31F /* ZXReader.h */,
|
||||
3B83EB56158E6CAB00A3B31F /* ZXReader.mm */,
|
||||
3B83EB57158E6CAB00A3B31F /* ZXReaderException.h */,
|
||||
3B83EB58158E6CAB00A3B31F /* ZXReaderException.mm */,
|
||||
3B83EB59158E6CAB00A3B31F /* ZXResult.h */,
|
||||
3B83EB5A158E6CAB00A3B31F /* ZXResult.mm */,
|
||||
3B83EB5B158E6CAB00A3B31F /* ZXView.h */,
|
||||
);
|
||||
name = ZXing;
|
||||
path = src/ZXing;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B83EB93158E71AD00A3B31F /* Other Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B83EB94158E71AD00A3B31F /* AppKit.framework */,
|
||||
3B83EB95158E71AD00A3B31F /* CoreData.framework */,
|
||||
3B83EB96158E71AD00A3B31F /* Foundation.framework */,
|
||||
);
|
||||
name = "Other Frameworks";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B83EB97158E71AD00A3B31F /* zxing-objc-framework */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3BC3D69E158E8E880037CE30 /* zxing_objc_framework.m */,
|
||||
3BC3D69C158E8E7F0037CE30 /* zxing_objc_framework.h */,
|
||||
3B83EB98158E71AD00A3B31F /* Supporting Files */,
|
||||
);
|
||||
path = "zxing-objc-framework";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
3B83EB98158E71AD00A3B31F /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B83EB99158E71AD00A3B31F /* zxing-objc-framework-Info.plist */,
|
||||
3B83EB9A158E71AD00A3B31F /* InfoPlist.strings */,
|
||||
3B83EB9D158E71AD00A3B31F /* zxing-objc-framework-Prefix.pch */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
3B83EB23158E6C5100A3B31F /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3B83EB5D158E6CAB00A3B31F /* ZXBinarizer.h in Headers */,
|
||||
3B83EB5F158E6CAB00A3B31F /* ZXBinaryBitmap.h in Headers */,
|
||||
3B83EB61158E6CAB00A3B31F /* ZXCapture.h in Headers */,
|
||||
3B83EB63158E6CAB00A3B31F /* ZXCaptureDelegate.h in Headers */,
|
||||
3B83EB64158E6CAB00A3B31F /* ZXCaptureView.h in Headers */,
|
||||
3B83EB66158E6CAB00A3B31F /* ZXCGImageLuminanceSource.h in Headers */,
|
||||
3B83EB68158E6CAB00A3B31F /* ZXDecodeHints.h in Headers */,
|
||||
3B83EB6A158E6CAB00A3B31F /* ZXHybridBinarizer.h in Headers */,
|
||||
3B83EB6C158E6CAB00A3B31F /* ZXIllegalArgumentException.h in Headers */,
|
||||
3B83EB6E158E6CAB00A3B31F /* ZXImage.h in Headers */,
|
||||
3B83EB71158E6CAB00A3B31F /* ZXLuminanceSource.h in Headers */,
|
||||
3B83EB73158E6CAB00A3B31F /* ZXMultiFormatReader.h in Headers */,
|
||||
3B83EB75158E6CAB00A3B31F /* ZXQRCodeReader.h in Headers */,
|
||||
3B83EB77158E6CAB00A3B31F /* ZXReader.h in Headers */,
|
||||
3B83EB79158E6CAB00A3B31F /* ZXReaderException.h in Headers */,
|
||||
3B83EB7B158E6CAB00A3B31F /* ZXResult.h in Headers */,
|
||||
3B83EB7D158E6CAB00A3B31F /* ZXView.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3B83EB8D158E71AD00A3B31F /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3BC3D69D158E8E7F0037CE30 /* zxing_objc_framework.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
3B83EB24158E6C5100A3B31F /* zxing-objc */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3B83EB32158E6C5100A3B31F /* Build configuration list for PBXNativeTarget "zxing-objc" */;
|
||||
buildPhases = (
|
||||
3B83EB21158E6C5100A3B31F /* Sources */,
|
||||
3B83EB22158E6C5100A3B31F /* Frameworks */,
|
||||
3B83EB23158E6C5100A3B31F /* Headers */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "zxing-objc";
|
||||
productName = "zxing-objc";
|
||||
productReference = 3B83EB25158E6C5100A3B31F /* libzxing-objc.a */;
|
||||
productType = "com.apple.product-type.library.static";
|
||||
};
|
||||
3B83EB8F158E71AD00A3B31F /* zxing-objc-framework */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3B83EBA1158E71AD00A3B31F /* Build configuration list for PBXNativeTarget "zxing-objc-framework" */;
|
||||
buildPhases = (
|
||||
3B83EB8B158E71AD00A3B31F /* Sources */,
|
||||
3B83EB8C158E71AD00A3B31F /* Frameworks */,
|
||||
3B83EB8D158E71AD00A3B31F /* Headers */,
|
||||
3B83EB8E158E71AD00A3B31F /* Resources */,
|
||||
3B5D0F571590F45000C33931 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
3B83EBA5158E71CA00A3B31F /* PBXTargetDependency */,
|
||||
);
|
||||
name = "zxing-objc-framework";
|
||||
productName = "zxing-objc-framework";
|
||||
productReference = 3B83EB90158E71AD00A3B31F /* zxing-objc-framework.framework */;
|
||||
productType = "com.apple.product-type.framework";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
3B83EB1C158E6C5100A3B31F /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0430;
|
||||
};
|
||||
buildConfigurationList = 3B83EB1F158E6C5100A3B31F /* Build configuration list for PBXProject "zxing-objc" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 3B83EB1A158E6C5100A3B31F;
|
||||
productRefGroup = 3B83EB26158E6C5100A3B31F /* Products */;
|
||||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
{
|
||||
ProductGroup = 3B5D0F591590F9CE00C33931 /* Products */;
|
||||
ProjectRef = 3B5D0F581590F9CE00C33931 /* zxing-cpp.xcodeproj */;
|
||||
},
|
||||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
3B83EB24158E6C5100A3B31F /* zxing-objc */,
|
||||
3B83EB8F158E71AD00A3B31F /* zxing-objc-framework */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXReferenceProxy section */
|
||||
3B5D0F601590F9CF00C33931 /* libzxing-cpp.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libzxing-cpp.a";
|
||||
remoteRef = 3B5D0F5F1590F9CF00C33931 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
3B83EB8E158E71AD00A3B31F /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3B83EB9C158E71AD00A3B31F /* InfoPlist.strings in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
3B5D0F571590F45000C33931 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "set -x\n(cd src && pwd && rsync -arv --include ZXing '--include=*.h' '--exclude=*' ZXing ${BUILT_PRODUCTS_DIR}/${PUBLIC_HEADERS_FOLDER_PATH})\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
3B83EB21158E6C5100A3B31F /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3B83EB5C158E6CAB00A3B31F /* CGImageLuminanceSource.mm in Sources */,
|
||||
3B83EB5E158E6CAB00A3B31F /* ZXBinarizer.mm in Sources */,
|
||||
3B83EB60158E6CAB00A3B31F /* ZXBinaryBitmap.mm in Sources */,
|
||||
3B83EB62158E6CAB00A3B31F /* ZXCapture.mm in Sources */,
|
||||
3B83EB65158E6CAB00A3B31F /* ZXCaptureView.mm in Sources */,
|
||||
3B83EB67158E6CAB00A3B31F /* ZXCGImageLuminanceSource.mm in Sources */,
|
||||
3B83EB69158E6CAB00A3B31F /* ZXDecodeHints.mm in Sources */,
|
||||
3B83EB6B158E6CAB00A3B31F /* ZXHybridBinarizer.mm in Sources */,
|
||||
3B83EB6D158E6CAB00A3B31F /* ZXIllegalArgumentException.mm in Sources */,
|
||||
3B83EB6F158E6CAB00A3B31F /* ZXImage.mm in Sources */,
|
||||
3B83EB70158E6CAB00A3B31F /* ZXInit.c in Sources */,
|
||||
3B83EB72158E6CAB00A3B31F /* ZXLuminanceSource.mm in Sources */,
|
||||
3B83EB74158E6CAB00A3B31F /* ZXMultiFormatReader.mm in Sources */,
|
||||
3B83EB76158E6CAB00A3B31F /* ZXQRCodeReader.mm in Sources */,
|
||||
3B83EB78158E6CAB00A3B31F /* ZXReader.mm in Sources */,
|
||||
3B83EB7A158E6CAB00A3B31F /* ZXReaderException.mm in Sources */,
|
||||
3B83EB7C158E6CAB00A3B31F /* ZXResult.mm in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
3B83EB8B158E71AD00A3B31F /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
3BC3D681158E8BE80037CE30 /* CGImageLuminanceSource.mm in Sources */,
|
||||
3BC3D682158E8BEF0037CE30 /* ZXBinarizer.mm in Sources */,
|
||||
3BC3D683158E8C030037CE30 /* ZXBinaryBitmap.mm in Sources */,
|
||||
3BC3D684158E8C070037CE30 /* ZXCapture.mm in Sources */,
|
||||
3BC3D685158E8C0B0037CE30 /* ZXCaptureView.mm in Sources */,
|
||||
3BC3D686158E8C0F0037CE30 /* ZXCGImageLuminanceSource.mm in Sources */,
|
||||
3BC3D687158E8C120037CE30 /* ZXDecodeHints.mm in Sources */,
|
||||
3BC3D688158E8C160037CE30 /* ZXHybridBinarizer.mm in Sources */,
|
||||
3BC3D689158E8C190037CE30 /* ZXIllegalArgumentException.mm in Sources */,
|
||||
3BC3D68A158E8C1D0037CE30 /* ZXImage.mm in Sources */,
|
||||
3BC3D68B158E8C200037CE30 /* ZXLuminanceSource.mm in Sources */,
|
||||
3BC3D68C158E8C240037CE30 /* ZXMultiFormatReader.mm in Sources */,
|
||||
3BC3D68D158E8C280037CE30 /* ZXQRCodeReader.mm in Sources */,
|
||||
3BC3D68E158E8C2C0037CE30 /* ZXReader.mm in Sources */,
|
||||
3BC3D68F158E8C2F0037CE30 /* ZXReaderException.mm in Sources */,
|
||||
3BC3D690158E8C330037CE30 /* ZXResult.mm in Sources */,
|
||||
3BC3D69F158E8E880037CE30 /* zxing_objc_framework.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
3B83EBA5158E71CA00A3B31F /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 3B83EB24158E6C5100A3B31F /* zxing-objc */;
|
||||
targetProxy = 3B83EBA4158E71CA00A3B31F /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
3B83EB9A158E71AD00A3B31F /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
3B83EB9B158E71AD00A3B31F /* en */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
3B83EB30158E6C5100A3B31F /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
src,
|
||||
../cpp/core/src,
|
||||
);
|
||||
INSTALL_PATH = "@executable_path/../Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx";
|
||||
VALID_ARCHS = "armv6 armv7 x86_64 i386";
|
||||
"VALID_ARCHS[sdk=iphoneos*]" = "armv6 armv7";
|
||||
"VALID_ARCHS[sdk=macosx*]" = "x86_64 i386";
|
||||
WARNING_CFLAGS = "-Wall";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3B83EB31158E6C5100A3B31F /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||
COPY_PHASE_STRIP = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
src,
|
||||
../cpp/core/src,
|
||||
);
|
||||
INSTALL_PATH = "@executable_path/../Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 5.1;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
VALID_ARCHS = "armv6 armv7 x86_64 i386";
|
||||
"VALID_ARCHS[sdk=iphoneos*]" = "armv6 armv7";
|
||||
"VALID_ARCHS[sdk=macosx*]" = "x86_64 i386";
|
||||
WARNING_CFLAGS = "-Wall";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3B83EB33158E6C5100A3B31F /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = (
|
||||
x86_64,
|
||||
i386,
|
||||
armv7,
|
||||
armv6,
|
||||
);
|
||||
DSTROOT = /tmp/zxing_objc.dst;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = src/Prefix.pch;
|
||||
GCC_THUMB_SUPPORT = NO;
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3B83EB34158E6C5100A3B31F /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = (
|
||||
x86_64,
|
||||
i386,
|
||||
armv7,
|
||||
armv6,
|
||||
);
|
||||
DSTROOT = /tmp/zxing_objc.dst;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = src/Prefix.pch;
|
||||
GCC_THUMB_SUPPORT = NO;
|
||||
OTHER_LDFLAGS = "-ObjC";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SKIP_INSTALL = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3B83EBA2158E71AD00A3B31F /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks\"",
|
||||
);
|
||||
FRAMEWORK_VERSION = A;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "zxing-objc-framework/zxing-objc-framework-Prefix.pch";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
INFOPLIST_FILE = "zxing-objc-framework/zxing-objc-framework-Info.plist";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = macosx;
|
||||
SUPPORTED_PLATFORMS = macosx;
|
||||
WRAPPER_EXTENSION = framework;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3B83EBA3158E71AD00A3B31F /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_64_BIT)";
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"\"$(SYSTEM_APPS_DIR)/Xcode.app/Contents/Developer/Library/Frameworks\"",
|
||||
);
|
||||
FRAMEWORK_VERSION = A;
|
||||
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
|
||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||
GCC_PREFIX_HEADER = "zxing-objc-framework/zxing-objc-framework-Prefix.pch";
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
INFOPLIST_FILE = "zxing-objc-framework/zxing-objc-framework-Info.plist";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.7;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = macosx;
|
||||
SUPPORTED_PLATFORMS = macosx;
|
||||
WRAPPER_EXTENSION = framework;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
3B83EB1F158E6C5100A3B31F /* Build configuration list for PBXProject "zxing-objc" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3B83EB30158E6C5100A3B31F /* Debug */,
|
||||
3B83EB31158E6C5100A3B31F /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
3B83EB32158E6C5100A3B31F /* Build configuration list for PBXNativeTarget "zxing-objc" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3B83EB33158E6C5100A3B31F /* Debug */,
|
||||
3B83EB34158E6C5100A3B31F /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
3B83EBA1158E71AD00A3B31F /* Build configuration list for PBXNativeTarget "zxing-objc-framework" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3B83EBA2158E71AD00A3B31F /* Debug */,
|
||||
3B83EBA3158E71AD00A3B31F /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 3B83EB1C158E6C5100A3B31F /* Project object */;
|
||||
}
|
Loading…
Reference in a new issue