-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d4ce78c
commit 4fec588
Showing
33 changed files
with
4,903 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00"> | ||
<data> | ||
<int key="IBDocument.SystemTarget">1296</int> | ||
<string key="IBDocument.SystemVersion">11D50</string> | ||
<string key="IBDocument.InterfaceBuilderVersion">2182</string> | ||
<string key="IBDocument.AppKitVersion">1138.32</string> | ||
<string key="IBDocument.HIToolboxVersion">568.00</string> | ||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions"> | ||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||
<string key="NS.object.0">1181</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="975951072"> | ||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string> | ||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||
</object> | ||
<object class="IBUIView" id="191373211"> | ||
<reference key="NSNextResponder"/> | ||
<int key="NSvFlags">274</int> | ||
<array class="NSMutableArray" key="NSSubviews"> | ||
<object class="IBUIView" id="54889910"> | ||
<reference key="NSNextResponder" ref="191373211"/> | ||
<int key="NSvFlags">274</int> | ||
<string key="NSFrame">{{29, 52}, {262, 244}}</string> | ||
<reference key="NSSuperview" ref="191373211"/> | ||
<string key="NSReuseIdentifierKey">_NS:9</string> | ||
<object class="NSColor" key="IBUIBackgroundColor"> | ||
<int key="NSColorSpace">3</int> | ||
<bytes key="NSWhite">MQA</bytes> | ||
<object class="NSColorSpace" key="NSCustomColorSpace" id="981030692"> | ||
<int key="NSID">2</int> | ||
</object> | ||
</object> | ||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||
</object> | ||
</array> | ||
<string key="NSFrame">{{0, 20}, {320, 460}}</string> | ||
<reference key="NSSuperview"/> | ||
<object class="NSColor" key="IBUIBackgroundColor"> | ||
<int key="NSColorSpace">3</int> | ||
<bytes key="NSWhite">MQA</bytes> | ||
<reference key="NSCustomColorSpace" ref="981030692"/> | ||
</object> | ||
<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="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="191373211"/> | ||
<array class="NSMutableArray" key="children"> | ||
<reference ref="54889910"/> | ||
</array> | ||
<reference key="parent" ref="0"/> | ||
</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="975951072"/> | ||
<reference key="parent" ref="0"/> | ||
</object> | ||
<object class="IBObjectRecord"> | ||
<int key="objectID">4</int> | ||
<reference key="object" ref="54889910"/> | ||
<reference key="parent" ref="191373211"/> | ||
</object> | ||
</array> | ||
</object> | ||
<dictionary class="NSMutableDictionary" key="flattenedProperties"> | ||
<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="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string> | ||
<string key="4.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">4</int> | ||
</object> | ||
<object class="IBClassDescriber" key="IBDocument.Classes"/> | ||
<int key="IBDocument.localizationMode">0</int> | ||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string> | ||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults"> | ||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string> | ||
<real value="1296" key="NS.object.0"/> | ||
</object> | ||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool> | ||
<int key="IBDocument.defaultPropertyAccessControl">3</int> | ||
<string key="IBCocoaTouchPluginVersion">1181</string> | ||
</data> | ||
</archive> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
//------------------------------------------------------------------------ | ||
// Copyright 2010-2011 (c) Jeff Brown <spadix@users.sourceforge.net> | ||
// | ||
// This file is part of the ZBar Bar Code Reader. | ||
// | ||
// The ZBar Bar Code Reader is free software; you can redistribute it | ||
// and/or modify it under the terms of the GNU Lesser Public License as | ||
// published by the Free Software Foundation; either version 2.1 of | ||
// the License, or (at your option) any later version. | ||
// | ||
// The ZBar Bar Code Reader is distributed in the hope that it will be | ||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty | ||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU Lesser Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Lesser Public License | ||
// along with the ZBar Bar Code Reader; if not, write to the Free | ||
// Software Foundation, Inc., 51 Franklin St, Fifth Floor, | ||
// Boston, MA 02110-1301 USA | ||
// | ||
// http://sourceforge.net/projects/zbar | ||
//------------------------------------------------------------------------ | ||
|
||
@class ZBarReaderView; | ||
|
||
// hack around missing simulator support for AVCapture interfaces | ||
|
||
@interface ZBarCameraSimulator | ||
: NSObject | ||
< UINavigationControllerDelegate, | ||
UIImagePickerControllerDelegate, | ||
UIPopoverControllerDelegate > | ||
{ | ||
UIViewController *viewController; | ||
ZBarReaderView *readerView; | ||
UIImagePickerController *picker; | ||
UIPopoverController *pickerPopover; | ||
} | ||
|
||
- (id) initWithViewController: (UIViewController*) viewController; | ||
- (void) takePicture; | ||
|
||
@property (nonatomic, assign) ZBarReaderView *readerView; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
//------------------------------------------------------------------------ | ||
// Copyright 2010 (c) Jeff Brown <spadix@users.sourceforge.net> | ||
// | ||
// This file is part of the ZBar Bar Code Reader. | ||
// | ||
// The ZBar Bar Code Reader is free software; you can redistribute it | ||
// and/or modify it under the terms of the GNU Lesser Public License as | ||
// published by the Free Software Foundation; either version 2.1 of | ||
// the License, or (at your option) any later version. | ||
// | ||
// The ZBar Bar Code Reader is distributed in the hope that it will be | ||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty | ||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU Lesser Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Lesser Public License | ||
// along with the ZBar Bar Code Reader; if not, write to the Free | ||
// Software Foundation, Inc., 51 Franklin St, Fifth Floor, | ||
// Boston, MA 02110-1301 USA | ||
// | ||
// http://sourceforge.net/projects/zbar | ||
//------------------------------------------------------------------------ | ||
|
||
#import <CoreGraphics/CoreGraphics.h> | ||
#import "ZBarImageScanner.h" | ||
|
||
@class AVCaptureVideoDataOutput, AVCaptureOutput; | ||
@class ZBarCaptureReader, ZBarCVImage; | ||
|
||
@protocol ZBarCaptureDelegate <NSObject> | ||
|
||
// called when a new barcode is detected. the image refers to the | ||
// video buffer and must not be retained for long | ||
- (void) captureReader: (ZBarCaptureReader*) captureReader | ||
didReadNewSymbolsFromImage: (ZBarImage*) image; | ||
|
||
@optional | ||
// called when a potential/uncertain barcode is detected. will also | ||
// be called *after* captureReader:didReadNewSymbolsFromImage: | ||
// when good barcodes are detected | ||
- (void) captureReader: (ZBarCaptureReader*) captureReader | ||
didTrackSymbols: (ZBarSymbolSet*) symbols; | ||
|
||
@end | ||
|
||
@interface ZBarCaptureReader | ||
: NSObject | ||
{ | ||
#if !TARGET_IPHONE_SIMULATOR | ||
AVCaptureVideoDataOutput *captureOutput; | ||
id<ZBarCaptureDelegate> captureDelegate; | ||
ZBarImageScanner *scanner; | ||
CGRect scanCrop; | ||
CGSize size; | ||
CGFloat framesPerSecond; | ||
BOOL enableCache; | ||
|
||
dispatch_queue_t queue; | ||
ZBarImage *image; | ||
ZBarCVImage *result; | ||
volatile uint32_t state; | ||
int framecnt; | ||
unsigned width, height; | ||
uint64_t t_frame, t_fps, t_scan; | ||
CGFloat dt_frame; | ||
#endif | ||
} | ||
|
||
// supply a pre-configured image scanner | ||
- (id) initWithImageScanner: (ZBarImageScanner*) imageScanner; | ||
|
||
// this must be called before the session is started | ||
- (void) willStartRunning; | ||
|
||
// this must be called *before* the session is stopped | ||
- (void) willStopRunning; | ||
|
||
// clear the internal result cache | ||
- (void) flushCache; | ||
|
||
// capture the next frame after processing. the captured image will | ||
// follow the same delegate path as an image with decoded symbols. | ||
- (void) captureFrame; | ||
|
||
// the capture output. add this to an instance of AVCaptureSession | ||
@property (nonatomic, readonly) AVCaptureOutput *captureOutput; | ||
|
||
// delegate is notified of decode results and symbol tracking. | ||
@property (nonatomic, assign) id<ZBarCaptureDelegate> captureDelegate; | ||
|
||
// access to image scanner for configuration. | ||
@property (nonatomic, readonly) ZBarImageScanner *scanner; | ||
|
||
// region of image to scan in normalized coordinates. | ||
// NB horizontal crop currently ignored... | ||
@property (nonatomic, assign) CGRect scanCrop; | ||
|
||
// size of video frames. | ||
@property (nonatomic, readonly) CGSize size; | ||
|
||
// (quickly) gate the reader function without interrupting the video | ||
// stream. also flushes the cache when enabled. defaults to *NO* | ||
@property (nonatomic) BOOL enableReader; | ||
|
||
// current frame rate (for debug/optimization). | ||
// only valid when running | ||
@property (nonatomic, readonly) CGFloat framesPerSecond; | ||
|
||
@property (nonatomic) BOOL enableCache; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
//------------------------------------------------------------------------ | ||
// Copyright 2009-2010 (c) Jeff Brown <spadix@users.sourceforge.net> | ||
// | ||
// This file is part of the ZBar Bar Code Reader. | ||
// | ||
// The ZBar Bar Code Reader is free software; you can redistribute it | ||
// and/or modify it under the terms of the GNU Lesser Public License as | ||
// published by the Free Software Foundation; either version 2.1 of | ||
// the License, or (at your option) any later version. | ||
// | ||
// The ZBar Bar Code Reader is distributed in the hope that it will be | ||
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty | ||
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU Lesser Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Lesser Public License | ||
// along with the ZBar Bar Code Reader; if not, write to the Free | ||
// Software Foundation, Inc., 51 Franklin St, Fifth Floor, | ||
// Boston, MA 02110-1301 USA | ||
// | ||
// http://sourceforge.net/projects/zbar | ||
//------------------------------------------------------------------------ | ||
|
||
#import <UIKit/UIKit.h> | ||
|
||
@class ZBarHelpController; | ||
|
||
@protocol ZBarHelpDelegate | ||
@optional | ||
|
||
- (void) helpControllerDidFinish: (ZBarHelpController*) help; | ||
|
||
@end | ||
|
||
|
||
// failure dialog w/a few useful tips | ||
|
||
@interface ZBarHelpController : UIViewController | ||
< UIWebViewDelegate, | ||
UIAlertViewDelegate > | ||
{ | ||
NSString *reason; | ||
id delegate; | ||
UIWebView *webView; | ||
UIToolbar *toolbar; | ||
UIBarButtonItem *doneBtn, *backBtn, *space; | ||
NSURL *linkURL; | ||
NSUInteger orientations; | ||
} | ||
|
||
@property (nonatomic, assign) id<ZBarHelpDelegate> delegate; | ||
|
||
// designated initializer | ||
- (id) initWithReason: (NSString*) reason; | ||
|
||
- (BOOL) isInterfaceOrientationSupported: (UIInterfaceOrientation) orientation; | ||
- (void) setInterfaceOrientation: (UIInterfaceOrientation) orientation | ||
supported: (BOOL) supported; | ||
|
||
@end |
Oops, something went wrong.