Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added readme info

  • Loading branch information...
commit f402c477bac14d6b4a88744f22e1fcde86ea1b74 1 parent 757d3d6
@mattetti authored
View
2  RemoteControlWrapper.xcodeproj/mattetti.mode1v3
@@ -332,7 +332,7 @@
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>2B73BEDB0FFAED4500A1A3C5</string>
+ <string>2B73BEE80FFAF71C00A1A3C5</string>
<key>history</key>
<array>
<string>2B57FFC70FF6238000777150</string>
View
164 RemoteControlWrapper.xcodeproj/mattetti.pbxuser
@@ -57,43 +57,33 @@
PBXWorkspaceStateSaveDate = 268102885;
};
perUserProjectItems = {
- 2B0554370FF6036B00BBA978 = 2B0554370FF6036B00BBA978 /* PBXTextBookmark */;
- 2B05543E0FF603EC00BBA978 = 2B05543E0FF603EC00BBA978 /* PBXTextBookmark */;
- 2B05544C0FF6043400BBA978 = 2B05544C0FF6043400BBA978 /* PBXTextBookmark */;
- 2B0555C30FF604E300BBA978 = 2B0555C30FF604E300BBA978 /* PBXTextBookmark */;
- 2B0556520FF60F5300BBA978 = 2B0556520FF60F5300BBA978 /* PBXTextBookmark */;
- 2B0556540FF60F5300BBA978 = 2B0556540FF60F5300BBA978 /* PBXTextBookmark */;
- 2B57001C0FF70F6200777150 = 2B57001C0FF70F6200777150 /* PBXTextBookmark */;
- 2B57001F0FF70F6200777150 = 2B57001F0FF70F6200777150 /* PBXTextBookmark */;
- 2B57FFC70FF6238000777150 = 2B57FFC70FF6238000777150 /* PBXTextBookmark */;
- 2B57FFC80FF6238000777150 = 2B57FFC80FF6238000777150 /* PBXTextBookmark */;
- 2B57FFC90FF6238000777150 = 2B57FFC90FF6238000777150 /* PBXTextBookmark */;
- 2B57FFD10FF6238000777150 = 2B57FFD10FF6238000777150 /* PBXTextBookmark */;
- 2B57FFD30FF6238000777150 = 2B57FFD30FF6238000777150 /* PBXTextBookmark */;
- 2B57FFD40FF6238000777150 = 2B57FFD40FF6238000777150 /* PBXTextBookmark */;
- 2B57FFD50FF6238000777150 = 2B57FFD50FF6238000777150 /* PBXTextBookmark */;
- 2B57FFDF0FF623F000777150 = 2B57FFDF0FF623F000777150 /* PBXTextBookmark */;
- 2B57FFE10FF623F000777150 = 2B57FFE10FF623F000777150 /* PBXTextBookmark */;
- 2B57FFE20FF623F000777150 = 2B57FFE20FF623F000777150 /* PBXTextBookmark */;
- 2B57FFE50FF623F000777150 = 2B57FFE50FF623F000777150 /* PBXTextBookmark */;
- 2B57FFE70FF623F000777150 = 2B57FFE70FF623F000777150 /* PBXTextBookmark */;
+ 2B0554370FF6036B00BBA978 /* PBXTextBookmark */ = 2B0554370FF6036B00BBA978 /* PBXTextBookmark */;
+ 2B05543E0FF603EC00BBA978 /* PBXTextBookmark */ = 2B05543E0FF603EC00BBA978 /* PBXTextBookmark */;
+ 2B05544C0FF6043400BBA978 /* PBXTextBookmark */ = 2B05544C0FF6043400BBA978 /* PBXTextBookmark */;
+ 2B0555C30FF604E300BBA978 /* PBXTextBookmark */ = 2B0555C30FF604E300BBA978 /* PBXTextBookmark */;
+ 2B0556520FF60F5300BBA978 /* PBXTextBookmark */ = 2B0556520FF60F5300BBA978 /* PBXTextBookmark */;
+ 2B0556540FF60F5300BBA978 /* PBXTextBookmark */ = 2B0556540FF60F5300BBA978 /* PBXTextBookmark */;
+ 2B57001C0FF70F6200777150 /* PBXTextBookmark */ = 2B57001C0FF70F6200777150 /* PBXTextBookmark */;
+ 2B57001F0FF70F6200777150 /* PBXTextBookmark */ = 2B57001F0FF70F6200777150 /* PBXTextBookmark */;
+ 2B57FFC70FF6238000777150 /* PBXTextBookmark */ = 2B57FFC70FF6238000777150 /* PBXTextBookmark */;
+ 2B57FFC80FF6238000777150 /* PBXTextBookmark */ = 2B57FFC80FF6238000777150 /* PBXTextBookmark */;
+ 2B57FFC90FF6238000777150 /* PBXTextBookmark */ = 2B57FFC90FF6238000777150 /* PBXTextBookmark */;
+ 2B57FFD10FF6238000777150 /* PBXTextBookmark */ = 2B57FFD10FF6238000777150 /* PBXTextBookmark */;
+ 2B57FFD30FF6238000777150 /* PBXTextBookmark */ = 2B57FFD30FF6238000777150 /* PBXTextBookmark */;
+ 2B57FFD40FF6238000777150 /* PBXTextBookmark */ = 2B57FFD40FF6238000777150 /* PBXTextBookmark */;
+ 2B57FFD50FF6238000777150 /* PBXTextBookmark */ = 2B57FFD50FF6238000777150 /* PBXTextBookmark */;
+ 2B57FFDF0FF623F000777150 /* PBXTextBookmark */ = 2B57FFDF0FF623F000777150 /* PBXTextBookmark */;
+ 2B57FFE10FF623F000777150 /* PBXTextBookmark */ = 2B57FFE10FF623F000777150 /* PBXTextBookmark */;
+ 2B57FFE20FF623F000777150 /* PBXTextBookmark */ = 2B57FFE20FF623F000777150 /* PBXTextBookmark */;
+ 2B57FFE50FF623F000777150 /* PBXTextBookmark */ = 2B57FFE50FF623F000777150 /* PBXTextBookmark */;
+ 2B57FFE70FF623F000777150 /* PBXTextBookmark */ = 2B57FFE70FF623F000777150 /* PBXTextBookmark */;
2B73BEDA0FFAED4500A1A3C5 /* PBXTextBookmark */ = 2B73BEDA0FFAED4500A1A3C5 /* PBXTextBookmark */;
- 2B73BEDB0FFAED4500A1A3C5 /* PBXTextBookmark */ = 2B73BEDB0FFAED4500A1A3C5 /* PBXTextBookmark */;
- 2BC42ACE0FF72B4100DF30BC = 2BC42ACE0FF72B4100DF30BC /* PBXTextBookmark */;
- 2BC42ACF0FF72B4100DF30BC = 2BC42ACF0FF72B4100DF30BC /* PBXTextBookmark */;
- 2BC42AD00FF72B4100DF30BC = 2BC42AD00FF72B4100DF30BC /* PBXTextBookmark */;
- 2BC42AD10FF72B4100DF30BC = 2BC42AD10FF72B4100DF30BC /* PBXTextBookmark */;
- 2BC42AD20FF72B4100DF30BC = 2BC42AD20FF72B4100DF30BC /* PBXTextBookmark */;
- 2BC42AD30FF72B4100DF30BC = 2BC42AD30FF72B4100DF30BC /* PBXTextBookmark */;
- 2BC42AD40FF72B4100DF30BC = 2BC42AD40FF72B4100DF30BC /* PBXTextBookmark */;
- 2BC42ADE0FF76A3B00DF30BC = 2BC42ADE0FF76A3B00DF30BC /* PBXTextBookmark */;
- 2BC42ADF0FF76A3B00DF30BC = 2BC42ADF0FF76A3B00DF30BC /* PBXTextBookmark */;
- 2BC42AE00FF76A3B00DF30BC = 2BC42AE00FF76A3B00DF30BC /* PBXTextBookmark */;
- 2BC42AE10FF76A3B00DF30BC = 2BC42AE10FF76A3B00DF30BC /* PBXTextBookmark */;
- 2BC42AE20FF76A3B00DF30BC = 2BC42AE20FF76A3B00DF30BC /* PBXTextBookmark */;
- 2BC42AE30FF76A3B00DF30BC = 2BC42AE30FF76A3B00DF30BC /* PBXTextBookmark */;
- 2BC42AE40FF76A3B00DF30BC = 2BC42AE40FF76A3B00DF30BC /* PBXTextBookmark */;
- 2BC42AE50FF76A3B00DF30BC = 2BC42AE50FF76A3B00DF30BC /* PBXTextBookmark */;
+ 2B73BEE80FFAF71C00A1A3C5 /* PBXTextBookmark */ = 2B73BEE80FFAF71C00A1A3C5 /* PBXTextBookmark */;
+ 2BC42ACE0FF72B4100DF30BC /* PBXTextBookmark */ = 2BC42ACE0FF72B4100DF30BC /* PBXTextBookmark */;
+ 2BC42ACF0FF72B4100DF30BC /* PBXTextBookmark */ = 2BC42ACF0FF72B4100DF30BC /* PBXTextBookmark */;
+ 2BC42AD00FF72B4100DF30BC /* PBXTextBookmark */ = 2BC42AD00FF72B4100DF30BC /* PBXTextBookmark */;
+ 2BC42ADE0FF76A3B00DF30BC /* PBXTextBookmark */ = 2BC42ADE0FF76A3B00DF30BC /* PBXTextBookmark */;
+ 2BC42ADF0FF76A3B00DF30BC /* PBXTextBookmark */ = 2BC42ADF0FF76A3B00DF30BC /* PBXTextBookmark */;
};
sourceControlManager = 2BA9DD220FEF78A500F2C2BC /* Source Control */;
userBuildSettings = {
@@ -319,7 +309,7 @@
vrLen = 489;
vrLoc = 16370;
};
- 2B73BEDB0FFAED4500A1A3C5 /* PBXTextBookmark */ = {
+ 2B73BEE80FFAF71C00A1A3C5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 5B92775E0B78CABC0058AA16 /* HIDRemoteControlDevice.m */;
name = "HIDRemoteControlDevice.m: 414";
@@ -394,46 +384,6 @@
vrLen = 663;
vrLoc = 2960;
};
- 2BC42AD10FF72B4100DF30BC /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 5B9274A00B78B3B20058AA16 /* RemoteControl.m */;
- name = "RemoteControl.m: 52";
- rLen = 0;
- rLoc = 2542;
- rType = 0;
- vrLen = 1044;
- vrLoc = 922;
- };
- 2BC42AD20FF72B4100DF30BC /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 5BF9B75709C243FD00EFA68D /* AppleRemote.m */;
- name = "AppleRemote.m: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 1076;
- vrLoc = 1727;
- };
- 2BC42AD30FF72B4100DF30BC /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 5B9274A00B78B3B20058AA16 /* RemoteControl.m */;
- name = "RemoteControl.m: 51";
- rLen = 0;
- rLoc = 2479;
- rType = 0;
- vrLen = 353;
- vrLoc = 2239;
- };
- 2BC42AD40FF72B4100DF30BC /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 5B92749F0B78B3B20058AA16 /* RemoteControl.h */;
- name = "RemoteControl.h: 100";
- rLen = 23;
- rLoc = 3662;
- rType = 0;
- vrLen = 663;
- vrLoc = 2960;
- };
2BC42ADE0FF76A3B00DF30BC /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 5BF9B75609C243FD00EFA68D /* AppleRemote.h */;
@@ -454,66 +404,6 @@
vrLen = 683;
vrLoc = 1770;
};
- 2BC42AE00FF76A3B00DF30BC /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 5B92775E0B78CABC0058AA16 /* HIDRemoteControlDevice.m */;
- name = "HIDRemoteControlDevice.m: 414";
- rLen = 36;
- rLoc = 13261;
- rType = 0;
- vrLen = 564;
- vrLoc = 11175;
- };
- 2BC42AE10FF76A3B00DF30BC /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 5BF9B75609C243FD00EFA68D /* AppleRemote.h */;
- name = "AppleRemote.h: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 933;
- vrLoc = 0;
- };
- 2BC42AE20FF76A3B00DF30BC /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 5B92775D0B78CABC0058AA16 /* HIDRemoteControlDevice.h */;
- name = "HIDRemoteControlDevice.h: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 699;
- vrLoc = 1892;
- };
- 2BC42AE30FF76A3B00DF30BC /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 5B92775E0B78CABC0058AA16 /* HIDRemoteControlDevice.m */;
- name = "HIDRemoteControlDevice.m: 414";
- rLen = 36;
- rLoc = 13261;
- rType = 0;
- vrLen = 564;
- vrLoc = 11175;
- };
- 2BC42AE40FF76A3B00DF30BC /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 5B92775D0B78CABC0058AA16 /* HIDRemoteControlDevice.h */;
- name = "HIDRemoteControlDevice.h: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 683;
- vrLoc = 1770;
- };
- 2BC42AE50FF76A3B00DF30BC /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 5B92775E0B78CABC0058AA16 /* HIDRemoteControlDevice.m */;
- name = "HIDRemoteControlDevice.m: 414";
- rLen = 36;
- rLoc = 13261;
- rType = 0;
- vrLen = 454;
- vrLoc = 16405;
- };
5B8D4DE70C55D676008A1C8A /* readme.txt */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {747, 285}}";
View
39 readme.txt
@@ -1,7 +1,42 @@
Remote Control Wrapper
----------------------
-You get the latest version of this code from http://martinkahr.com/source-code/
-On the website you will also find more details about this code and how to use it in your own application.
+You can get the original version of this code from http://martinkahr.com/source-code/
+Remote Control Wrapper is an Objective-C wrapper for the Apple remote control.
+It was modified to be Obj-C 2 compatible and compile as a framework to be used with MacRuby.
+Note that to use this framework with MacRuby you need to use a BridgeSupport file (generated for you in the repo).
+A compiled version of the framework is available in the download section.
+Here is a quick implementation example using MacRuby and HotCocoa:
+
+
+require 'hotcocoa'
+framework File.join(File.dirname(__FILE__), 'vendor', 'AppleRemote.framework')
+
+class Application
+
+ include HotCocoa
+
+ def start
+ application :name => "AppRemote" do |app|
+ app.delegate = self
+ window :frame => [100, 100, 500, 500], :title => "Appremote" do |win|
+ win << label(:text => "Application Remote", :layout => {:start => false})
+ win.will_close { exit }
+ end
+ @remoteControl = AppleRemote.alloc.initWithDelegate(self)
+ @remoteControl.startListening(self)
+ end
+ end
+
+ # Callback triggered when the remote is being used.
+ #
+ # === Parameters
+ # button<Fixnum>:: button id
+ # pressed<Boolean>:: is the button pressed or released
+ # remote<AppleRemote>::
+ def sendRemoteButtonEvent(button, pressedDown:pressed, remoteControl:remote)
+ p "button pressed #{button} #{pressed ? 'clicked' : 'released'}"
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.