Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
gpasq committed May 5, 2012
0 parents commit d95efe2
Show file tree
Hide file tree
Showing 4,569 changed files with 353,853 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.repl_history
build
14 changes: 14 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project'

Motion::Project::App.setup do |app|
# Use `rake config' to see complete project settings.
app.name = 'ZXingTest'
app.identifier = "com.biggermind.ZXingTest"
app.vendor_project('vendor/zxing-2.0/iphone/ZXingWidget', :xcode, :target => 'ZXingWidget', :headers_dir => 'Classes')
app.frameworks += ['AddressBook','AddressBookUI','AudioToolbox','AVFoundation','CoreMedia','CoreVideo']
app.libs += ['/usr/lib/libiconv.dylib']

app.codesign_certificate = "iPhone Developer: Greg Pasquariello (RJR57CJC3G)"

end
12 changes: 12 additions & 0 deletions app/app_delegate.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
@scannerViewController = ScannerViewController.alloc.init


@window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)
@window.rootViewController = UINavigationController.alloc.initWithRootViewController(@scannerViewController)
@window.rootViewController.wantsFullScreenLayout = true
@window.makeKeyAndVisible
true
end
end
56 changes: 56 additions & 0 deletions app/scanner_view_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
class ScannerViewController < UIViewController

def viewDidLoad
@scanner_button = self.create_scanner_button
self.view.addSubview(@scanner_button)

@result_label = self.create_result_label
self.view.addSubview(@result_label)
end

def create_result_label
label = UILabel.alloc.initWithFrame([[10, 90], [300,50]])
label.text = "No codes have been scanned."
label.backgroundColor = UIColor.clearColor
label.textColor = UIColor.whiteColor
label.adjustsFontSizeToFitWidth = true
label.textAlignment = UITextAlignmentCenter
label
end

def create_scanner_button
button = UIButton.buttonWithType(UIButtonTypeRoundedRect)
button.frame = [[(320 - 200)/2, 20], [200,50]]
button.setTitle("Launch Scan", forState:UIControlStateNormal)

#
# - (void)addTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents
#
button.addTarget(self, action: :'scanner_button_tapped:', forControlEvents:UIControlEventTouchUpInside)

button
end

def scanner_button_tapped(sender)
#
# ZXingWidgetController *widController = [[ZXingWidgetController alloc] initWithDelegate:self showCancel:YES OneDMode:NO];
#
@ZXingController = ZXingWidgetController.alloc.initWithDelegate(self, showCancel:true, OneDMode:false)

readers = NSMutableSet.alloc.init
readers.addObject(QRCodeReader.alloc.init)
@ZXingController.readers = readers

self.presentModalViewController(@ZXingController, animated:true)
end

def zxingController(controller, didScanResult:result)
self.dismissModalViewControllerAnimated(true)
@result_label.text = result;
end

def zxingControllerDidCancel(controller)
self.dismissModalViewControllerAnimated(true)
end

end
9 changes: 9 additions & 0 deletions spec/main_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
describe "Application 'ZXingTest'" do
before do
@app = UIApplication.sharedApplication
end

it "has one window" do
@app.windows.size.should == 1
end
end
83 changes: 83 additions & 0 deletions vendor/zxing-2.0/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
This project consists of contributions from several people, recognized here for convenience,
in alphabetical order.

Agustín Delgado (Servinform S.A.)
Aitor Almeida (University of Deusto)
Alasdair Mackintosh (Google)
Alexander Martin (Haase & Martin GmbH)
Andreas Pillath
Andrew Walbran (Google)
Andrey Sitnik
Androida.hu / http://www.androida.hu/
Antonio Manuel Benjumea (Servinform S.A.)
Asmuri Anwar
Brian Brown (Google)
Chang Hyun Park
Christian Brunschen (Google)
crowdin.net
Daniel Switkin (Google)
Dave MacLachlan (Google)
David Phillip Oster (Google)
David Albert (Bug Labs)
David Olivier
Diego Pierotto
drejc83
Eduardo Castillejo (University of Deusto)
Emanuele Aina
Eric Kobrin (Velocitude)
evansepdx
Erik Barbara
Fred Lin (Anobiit)
gcstang
Hannes Erven
hypest (Barcorama project)
Isaac Potoczny-Jones
Jacob Haynes (Google)
Jeff Breidenbach (Google)
Joan Montané (Softcatalà.cat)
John Connolly (Bug Labs)
Jonas Petersson (Prisjakt)
Joseph Wain (Google)
Juho Mikkonen
jwicks
Kamil Kaczmarczyk
Kazuki Nishiura
Kevin O'Sullivan (SITA)
Kevin Xue (NetDragon Websoft Inc., China)
Lachezar Dobrev
Luiz Silva
Luka Finžgar
Manuel Kasten
Marcelo
Mateusz Jędrasik
Matrix44
Matthew Schulkind (Google)
Matt York (LifeMarks)
mike32767
Mohamad Fairol
Morgan Courbet
Nikolaos Ftylitakis
Pablo Orduña (University of Deusto)
Paul Hackenberger
perennialmind
Ralf Kistner
Randy Shen (Acer)
Rasmus Schrøder Sørensen
Richard Hřivňák
Romain Pechayre
Roman Nurik (Google)
Ryan Alford
Sanford Squires
Shachar Shemesh
Sean Owen (Google)
Shiyuan Guo / 郭世元
Simon Flannery (Ericsson)
Steven Parkes
Suraj Supekar
Sven Klinkhamer
Thomas Gerbet
Tim Gernat
v.anestis
Vince Francis (LifeMarks)
Wolfgang Jung
Yakov Okshtein (Google)
Loading

0 comments on commit d95efe2

Please sign in to comment.