Skip to content

Commit d95efe2

Browse files
committed
Initial commit
0 parents  commit d95efe2

File tree

4,569 files changed

+353853
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,569 files changed

+353853
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.repl_history
2+
build

Rakefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
$:.unshift("/Library/RubyMotion/lib")
2+
require 'motion/project'
3+
4+
Motion::Project::App.setup do |app|
5+
# Use `rake config' to see complete project settings.
6+
app.name = 'ZXingTest'
7+
app.identifier = "com.biggermind.ZXingTest"
8+
app.vendor_project('vendor/zxing-2.0/iphone/ZXingWidget', :xcode, :target => 'ZXingWidget', :headers_dir => 'Classes')
9+
app.frameworks += ['AddressBook','AddressBookUI','AudioToolbox','AVFoundation','CoreMedia','CoreVideo']
10+
app.libs += ['/usr/lib/libiconv.dylib']
11+
12+
app.codesign_certificate = "iPhone Developer: Greg Pasquariello (RJR57CJC3G)"
13+
14+
end

app/app_delegate.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class AppDelegate
2+
def application(application, didFinishLaunchingWithOptions:launchOptions)
3+
@scannerViewController = ScannerViewController.alloc.init
4+
5+
6+
@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
7+
@window.rootViewController = UINavigationController.alloc.initWithRootViewController(@scannerViewController)
8+
@window.rootViewController.wantsFullScreenLayout = true
9+
@window.makeKeyAndVisible
10+
true
11+
end
12+
end

app/scanner_view_controller.rb

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
class ScannerViewController < UIViewController
2+
3+
def viewDidLoad
4+
@scanner_button = self.create_scanner_button
5+
self.view.addSubview(@scanner_button)
6+
7+
@result_label = self.create_result_label
8+
self.view.addSubview(@result_label)
9+
end
10+
11+
def create_result_label
12+
label = UILabel.alloc.initWithFrame([[10, 90], [300,50]])
13+
label.text = "No codes have been scanned."
14+
label.backgroundColor = UIColor.clearColor
15+
label.textColor = UIColor.whiteColor
16+
label.adjustsFontSizeToFitWidth = true
17+
label.textAlignment = UITextAlignmentCenter
18+
label
19+
end
20+
21+
def create_scanner_button
22+
button = UIButton.buttonWithType(UIButtonTypeRoundedRect)
23+
button.frame = [[(320 - 200)/2, 20], [200,50]]
24+
button.setTitle("Launch Scan", forState:UIControlStateNormal)
25+
26+
#
27+
# - (void)addTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents
28+
#
29+
button.addTarget(self, action: :'scanner_button_tapped:', forControlEvents:UIControlEventTouchUpInside)
30+
31+
button
32+
end
33+
34+
def scanner_button_tapped(sender)
35+
#
36+
# ZXingWidgetController *widController = [[ZXingWidgetController alloc] initWithDelegate:self showCancel:YES OneDMode:NO];
37+
#
38+
@ZXingController = ZXingWidgetController.alloc.initWithDelegate(self, showCancel:true, OneDMode:false)
39+
40+
readers = NSMutableSet.alloc.init
41+
readers.addObject(QRCodeReader.alloc.init)
42+
@ZXingController.readers = readers
43+
44+
self.presentModalViewController(@ZXingController, animated:true)
45+
end
46+
47+
def zxingController(controller, didScanResult:result)
48+
self.dismissModalViewControllerAnimated(true)
49+
@result_label.text = result;
50+
end
51+
52+
def zxingControllerDidCancel(controller)
53+
self.dismissModalViewControllerAnimated(true)
54+
end
55+
56+
end

spec/main_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
describe "Application 'ZXingTest'" do
2+
before do
3+
@app = UIApplication.sharedApplication
4+
end
5+
6+
it "has one window" do
7+
@app.windows.size.should == 1
8+
end
9+
end

vendor/zxing-2.0/AUTHORS

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
This project consists of contributions from several people, recognized here for convenience,
2+
in alphabetical order.
3+
4+
Agustín Delgado (Servinform S.A.)
5+
Aitor Almeida (University of Deusto)
6+
Alasdair Mackintosh (Google)
7+
Alexander Martin (Haase & Martin GmbH)
8+
Andreas Pillath
9+
Andrew Walbran (Google)
10+
Andrey Sitnik
11+
Androida.hu / http://www.androida.hu/
12+
Antonio Manuel Benjumea (Servinform S.A.)
13+
Asmuri Anwar
14+
Brian Brown (Google)
15+
Chang Hyun Park
16+
Christian Brunschen (Google)
17+
crowdin.net
18+
Daniel Switkin (Google)
19+
Dave MacLachlan (Google)
20+
David Phillip Oster (Google)
21+
David Albert (Bug Labs)
22+
David Olivier
23+
Diego Pierotto
24+
drejc83
25+
Eduardo Castillejo (University of Deusto)
26+
Emanuele Aina
27+
Eric Kobrin (Velocitude)
28+
evansepdx
29+
Erik Barbara
30+
Fred Lin (Anobiit)
31+
gcstang
32+
Hannes Erven
33+
hypest (Barcorama project)
34+
Isaac Potoczny-Jones
35+
Jacob Haynes (Google)
36+
Jeff Breidenbach (Google)
37+
Joan Montané (Softcatalà.cat)
38+
John Connolly (Bug Labs)
39+
Jonas Petersson (Prisjakt)
40+
Joseph Wain (Google)
41+
Juho Mikkonen
42+
jwicks
43+
Kamil Kaczmarczyk
44+
Kazuki Nishiura
45+
Kevin O'Sullivan (SITA)
46+
Kevin Xue (NetDragon Websoft Inc., China)
47+
Lachezar Dobrev
48+
Luiz Silva
49+
Luka Finžgar
50+
Manuel Kasten
51+
Marcelo
52+
Mateusz Jędrasik
53+
Matrix44
54+
Matthew Schulkind (Google)
55+
Matt York (LifeMarks)
56+
mike32767
57+
Mohamad Fairol
58+
Morgan Courbet
59+
Nikolaos Ftylitakis
60+
Pablo Orduña (University of Deusto)
61+
Paul Hackenberger
62+
perennialmind
63+
Ralf Kistner
64+
Randy Shen (Acer)
65+
Rasmus Schrøder Sørensen
66+
Richard Hřivňák
67+
Romain Pechayre
68+
Roman Nurik (Google)
69+
Ryan Alford
70+
Sanford Squires
71+
Shachar Shemesh
72+
Sean Owen (Google)
73+
Shiyuan Guo / 郭世元
74+
Simon Flannery (Ericsson)
75+
Steven Parkes
76+
Suraj Supekar
77+
Sven Klinkhamer
78+
Thomas Gerbet
79+
Tim Gernat
80+
v.anestis
81+
Vince Francis (LifeMarks)
82+
Wolfgang Jung
83+
Yakov Okshtein (Google)

0 commit comments

Comments
 (0)