cocoa 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +12 -8
- data/VERSION +1 -1
- data/cocoa.gemspec +5 -2
- data/examples/hello_world.rb +10 -0
- data/lib/cocoa/bindings/Cocoa.rb +6693 -0
- data/lib/cocoa/extensions.rb +58 -8
- data/lib/cocoa/helpers.rb +23 -429
- data/lib/cocoa/objc.rb +262 -0
- data/lib/cocoa/structs/NSPoint.rb +6 -0
- data/lib/cocoa/structs/NSRange.rb +23 -0
- data/lib/cocoa/structs/NSRect.rb +6 -0
- data/lib/cocoa/structs/NSSize.rb +4 -0
- data/lib/cocoa.rb +2 -6694
- data/spec/cocoa/cocoa_spec.rb +1 -1
- data/tasks/generate.rake +2 -28
- metadata +5 -2
data/README.md
CHANGED
@@ -13,12 +13,16 @@ gem install cocoa
|
|
13
13
|
|
14
14
|
```ruby
|
15
15
|
require 'cocoa'
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
16
|
+
|
17
|
+
Cocoa::NSAutoreleasePool.new
|
18
|
+
|
19
|
+
app = Cocoa::NSApplication.sharedApplication
|
20
|
+
app.setActivationPolicy Cocoa::NSApplicationActivationPolicyRegular
|
21
|
+
app.activateIgnoringOtherApps true
|
22
|
+
|
23
|
+
alert = Cocoa::NSAlert.alloc.init.autorelease
|
24
|
+
alert.setMessageText "Hello world!"
|
25
|
+
alert.runModal
|
24
26
|
```
|
27
|
+
|
28
|
+

|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/cocoa.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "cocoa"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Patrick Hanevold"]
|
12
|
-
s.date = "2014-03-
|
12
|
+
s.date = "2014-03-27"
|
13
13
|
s.description = "Ruby FFI bindings for the OSX Cocoa API"
|
14
14
|
s.email = "patrick.hanevold@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -23,6 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
"Rakefile",
|
24
24
|
"VERSION",
|
25
25
|
"cocoa.gemspec",
|
26
|
+
"examples/hello_world.rb",
|
26
27
|
"examples/window.rb",
|
27
28
|
"lib/cocoa.rb",
|
28
29
|
"lib/cocoa/bindings/CAAnimation.rb",
|
@@ -52,6 +53,7 @@ Gem::Specification.new do |s|
|
|
52
53
|
"lib/cocoa/bindings/CIColor.rb",
|
53
54
|
"lib/cocoa/bindings/CIFilter.rb",
|
54
55
|
"lib/cocoa/bindings/CIImage.rb",
|
56
|
+
"lib/cocoa/bindings/Cocoa.rb",
|
55
57
|
"lib/cocoa/bindings/NSATSTypesetter.rb",
|
56
58
|
"lib/cocoa/bindings/NSActionCell.rb",
|
57
59
|
"lib/cocoa/bindings/NSAffineTransform.rb",
|
@@ -415,6 +417,7 @@ Gem::Specification.new do |s|
|
|
415
417
|
"lib/cocoa/helpers.rb",
|
416
418
|
"lib/cocoa/objc.rb",
|
417
419
|
"lib/cocoa/structs/NSPoint.rb",
|
420
|
+
"lib/cocoa/structs/NSRange.rb",
|
418
421
|
"lib/cocoa/structs/NSRect.rb",
|
419
422
|
"lib/cocoa/structs/NSSize.rb",
|
420
423
|
"spec/cocoa/cocoa_spec.rb",
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'cocoa'
|
2
|
+
|
3
|
+
Cocoa::NSAutoreleasePool.new
|
4
|
+
app = Cocoa::NSApplication.sharedApplication
|
5
|
+
app.setActivationPolicy Cocoa::NSApplicationActivationPolicyRegular
|
6
|
+
app.activateIgnoringOtherApps true
|
7
|
+
|
8
|
+
alert = Cocoa::NSAlert.alloc.init.autorelease
|
9
|
+
alert.setMessageText "Hello world!"
|
10
|
+
alert.runModal
|