diff --git a/CHANGELOG.md b/CHANGELOG.md index 35f79a02..159412d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ This file should follow the standards specified on [keepachangelog.com](http://k This project adheres to [Semantic Versioning](http://semver.org/). ## [unreleased] +### Fixed +* Fixed a bug introduced in 1.6.0 where Radiant would hang when external HID devices were connected ([#463](https://github.com/radiant-player/radiant-player-mac/pull/463)). Note that there is still an outstanding bug where the headphone play/pause buttons open iTunes in addition to controlling Radiant. That is still being investigated. ## [1.6.1] - 2015-12-20 ### Fixed diff --git a/radiant-player-mac.xcodeproj/project.pbxproj b/radiant-player-mac.xcodeproj/project.pbxproj index baeb86d0..7abb52ac 100644 --- a/radiant-player-mac.xcodeproj/project.pbxproj +++ b/radiant-player-mac.xcodeproj/project.pbxproj @@ -19,8 +19,17 @@ 2B8FC1C318C9CB16006D04FF /* RadiantPlayerScriptCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B8FC1C218C9CB16006D04FF /* RadiantPlayerScriptCommand.m */; }; 38D0C36DAD0F40F5A7254224 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BABD1B4DDCC34CB291C66033 /* libPods.a */; }; 42C12CDD1C1A73C100E5029B /* RdiantStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = 42C12CDC1C1A73C100E5029B /* RdiantStyle.m */; }; - 691954C11C1F305E00FAC602 /* DDHidLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 691954C01C1F305E00FAC602 /* DDHidLib.framework */; }; - 69DDF0611C1F334D006493B1 /* DDHidLib.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 691954C01C1F305E00FAC602 /* DDHidLib.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 693BAD221C2702A90022B557 /* DDHidLib in Resources */ = {isa = PBXBuildFile; fileRef = 693BAD211C2702A90022B557 /* DDHidLib */; }; + 693BAD4D1C2705200022B557 /* DDHidAppleMikey.m in Sources */ = {isa = PBXBuildFile; fileRef = 693BAD3A1C2705200022B557 /* DDHidAppleMikey.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 693BAD4E1C2705200022B557 /* DDHidAppleRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = 693BAD3C1C2705200022B557 /* DDHidAppleRemote.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 693BAD4F1C2705200022B557 /* DDHidDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 693BAD3E1C2705200022B557 /* DDHidDevice.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 693BAD501C2705200022B557 /* DDHidElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 693BAD401C2705200022B557 /* DDHidElement.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 693BAD511C2705200022B557 /* DDHidEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 693BAD421C2705200022B557 /* DDHidEvent.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 693BAD521C2705200022B557 /* DDHidQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 693BAD441C2705200022B557 /* DDHidQueue.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 693BAD531C2705200022B557 /* DDHidUsage.m in Sources */ = {isa = PBXBuildFile; fileRef = 693BAD461C2705200022B557 /* DDHidUsage.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 693BAD541C2705200022B557 /* DDHidUsageTables.m in Sources */ = {isa = PBXBuildFile; fileRef = 693BAD481C2705200022B557 /* DDHidUsageTables.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 693BAD551C2705200022B557 /* NSDictionary+DDHidExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = 693BAD4A1C2705200022B557 /* NSDictionary+DDHidExtras.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + 693BAD561C2705200022B557 /* NSXReturnThrowError.m in Sources */ = {isa = PBXBuildFile; fileRef = 693BAD4C1C2705200022B557 /* NSXReturnThrowError.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; B06FB3D219F7723500351943 /* LightStyle.m in Sources */ = {isa = PBXBuildFile; fileRef = B0BB948819F76CFD0081C97D /* LightStyle.m */; }; D302E13418B561E100CCD18E /* Preferences.plist in Resources */ = {isa = PBXBuildFile; fileRef = D302E13318B561E100CCD18E /* Preferences.plist */; }; D3091F6318C32961007C8DCD /* Utilities.m in Sources */ = {isa = PBXBuildFile; fileRef = D3091F6218C32961007C8DCD /* Utilities.m */; }; @@ -91,7 +100,6 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 69DDF0611C1F334D006493B1 /* DDHidLib.framework in Copy Frameworks */, D31ACE8D193BE39E00AC7CB4 /* Growl.framework in Copy Frameworks */, D30F578B1BDB7BD300929904 /* Sparkle.framework in Copy Frameworks */, ); @@ -133,7 +141,26 @@ 2B8FC1C218C9CB16006D04FF /* RadiantPlayerScriptCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RadiantPlayerScriptCommand.m; sourceTree = ""; }; 42C12CDB1C1A73AB00E5029B /* RdiantStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RdiantStyle.h; sourceTree = ""; }; 42C12CDC1C1A73C100E5029B /* RdiantStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RdiantStyle.m; sourceTree = ""; }; - 691954C01C1F305E00FAC602 /* DDHidLib.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = DDHidLib.framework; path = "radiant-player-mac/Frameworks/DDHidLib.framework"; sourceTree = ""; }; + 693BAD391C2705200022B557 /* DDHidAppleMikey.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDHidAppleMikey.h; path = DDHidLib/DDHidAppleMikey.h; sourceTree = ""; }; + 693BAD3A1C2705200022B557 /* DDHidAppleMikey.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDHidAppleMikey.m; path = DDHidLib/DDHidAppleMikey.m; sourceTree = ""; }; + 693BAD3B1C2705200022B557 /* DDHidAppleRemote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDHidAppleRemote.h; path = DDHidLib/DDHidAppleRemote.h; sourceTree = ""; }; + 693BAD3C1C2705200022B557 /* DDHidAppleRemote.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDHidAppleRemote.m; path = DDHidLib/DDHidAppleRemote.m; sourceTree = ""; }; + 693BAD3D1C2705200022B557 /* DDHidDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDHidDevice.h; path = DDHidLib/DDHidDevice.h; sourceTree = ""; }; + 693BAD3E1C2705200022B557 /* DDHidDevice.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDHidDevice.m; path = DDHidLib/DDHidDevice.m; sourceTree = ""; }; + 693BAD3F1C2705200022B557 /* DDHidElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDHidElement.h; path = DDHidLib/DDHidElement.h; sourceTree = ""; }; + 693BAD401C2705200022B557 /* DDHidElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDHidElement.m; path = DDHidLib/DDHidElement.m; sourceTree = ""; }; + 693BAD411C2705200022B557 /* DDHidEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDHidEvent.h; path = DDHidLib/DDHidEvent.h; sourceTree = ""; }; + 693BAD421C2705200022B557 /* DDHidEvent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDHidEvent.m; path = DDHidLib/DDHidEvent.m; sourceTree = ""; }; + 693BAD431C2705200022B557 /* DDHidQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDHidQueue.h; path = DDHidLib/DDHidQueue.h; sourceTree = ""; }; + 693BAD441C2705200022B557 /* DDHidQueue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDHidQueue.m; path = DDHidLib/DDHidQueue.m; sourceTree = ""; }; + 693BAD451C2705200022B557 /* DDHidUsage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDHidUsage.h; path = DDHidLib/DDHidUsage.h; sourceTree = ""; }; + 693BAD461C2705200022B557 /* DDHidUsage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDHidUsage.m; path = DDHidLib/DDHidUsage.m; sourceTree = ""; }; + 693BAD471C2705200022B557 /* DDHidUsageTables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DDHidUsageTables.h; path = DDHidLib/DDHidUsageTables.h; sourceTree = ""; }; + 693BAD481C2705200022B557 /* DDHidUsageTables.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DDHidUsageTables.m; path = DDHidLib/DDHidUsageTables.m; sourceTree = ""; }; + 693BAD491C2705200022B557 /* NSDictionary+DDHidExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+DDHidExtras.h"; path = "DDHidLib/NSDictionary+DDHidExtras.h"; sourceTree = ""; }; + 693BAD4A1C2705200022B557 /* NSDictionary+DDHidExtras.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+DDHidExtras.m"; path = "DDHidLib/NSDictionary+DDHidExtras.m"; sourceTree = ""; }; + 693BAD4B1C2705200022B557 /* NSXReturnThrowError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSXReturnThrowError.h; path = DDHidLib/NSXReturnThrowError.h; sourceTree = ""; }; + 693BAD4C1C2705200022B557 /* NSXReturnThrowError.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSXReturnThrowError.m; path = DDHidLib/NSXReturnThrowError.m; sourceTree = ""; }; A32790DC482A48E18B516D0B /* Pods.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.xcconfig; path = Pods/Pods.xcconfig; sourceTree = ""; }; B0BB948719F76CF80081C97D /* LightStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LightStyle.h; sourceTree = ""; }; B0BB948819F76CFD0081C97D /* LightStyle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LightStyle.m; sourceTree = ""; }; @@ -249,7 +276,6 @@ files = ( D31ACE86193BCD3E00AC7CB4 /* Growl.framework in Frameworks */, D370E8E018E21ABC007B5450 /* QuartzCore.framework in Frameworks */, - 691954C11C1F305E00FAC602 /* DDHidLib.framework in Frameworks */, D3B4C0C318DAB4740069AB18 /* JavaScriptCore.framework in Frameworks */, D30F57891BDB7B2200929904 /* Sparkle.framework in Frameworks */, 1A7B687417453E4C001E509E /* WebKit.framework in Frameworks */, @@ -284,7 +310,6 @@ 1A7B683E17453E40001E509E /* Frameworks */ = { isa = PBXGroup; children = ( - 691954C01C1F305E00FAC602 /* DDHidLib.framework */, D30F57881BDB7B2200929904 /* Sparkle.framework */, D31ACE85193BCD3E00AC7CB4 /* Growl.framework */, D370E8DF18E21ABC007B5450 /* QuartzCore.framework */, @@ -310,6 +335,7 @@ 1A7B684517453E40001E509E /* radiant-player-mac */ = { isa = PBXGroup; children = ( + 693BAD381C27050B0022B557 /* DDHidLib */, D36F50621A3D871D000541C9 /* Support */, D31ACE87193BDC9700AC7CB4 /* Notifications */, D3D4C3E318E75C79007238B3 /* LastFm */, @@ -366,6 +392,33 @@ path = AppleScript; sourceTree = ""; }; + 693BAD381C27050B0022B557 /* DDHidLib */ = { + isa = PBXGroup; + children = ( + 693BAD391C2705200022B557 /* DDHidAppleMikey.h */, + 693BAD3A1C2705200022B557 /* DDHidAppleMikey.m */, + 693BAD3B1C2705200022B557 /* DDHidAppleRemote.h */, + 693BAD3C1C2705200022B557 /* DDHidAppleRemote.m */, + 693BAD3D1C2705200022B557 /* DDHidDevice.h */, + 693BAD3E1C2705200022B557 /* DDHidDevice.m */, + 693BAD3F1C2705200022B557 /* DDHidElement.h */, + 693BAD401C2705200022B557 /* DDHidElement.m */, + 693BAD411C2705200022B557 /* DDHidEvent.h */, + 693BAD421C2705200022B557 /* DDHidEvent.m */, + 693BAD431C2705200022B557 /* DDHidQueue.h */, + 693BAD441C2705200022B557 /* DDHidQueue.m */, + 693BAD451C2705200022B557 /* DDHidUsage.h */, + 693BAD461C2705200022B557 /* DDHidUsage.m */, + 693BAD471C2705200022B557 /* DDHidUsageTables.h */, + 693BAD481C2705200022B557 /* DDHidUsageTables.m */, + 693BAD491C2705200022B557 /* NSDictionary+DDHidExtras.h */, + 693BAD4A1C2705200022B557 /* NSDictionary+DDHidExtras.m */, + 693BAD4B1C2705200022B557 /* NSXReturnThrowError.h */, + 693BAD4C1C2705200022B557 /* NSXReturnThrowError.m */, + ); + name = DDHidLib; + sourceTree = ""; + }; D318341818CFC73500E8F9B1 /* Styles */ = { isa = PBXGroup; children = ( @@ -570,6 +623,7 @@ files = ( D326EA6418B2D7E500BEC02F /* css in Resources */, D3D4C3E518E76063007238B3 /* LastFmPopover.xib in Resources */, + 693BAD221C2702A90022B557 /* DDHidLib in Resources */, D326EA6518B2D7E500BEC02F /* js in Resources */, 2B8FC1C018C9CB0E006D04FF /* radiant-player-mac.sdef in Resources */, D302E13418B561E100CCD18E /* Preferences.plist in Resources */, @@ -628,18 +682,22 @@ D3CD9C3C18F25E0E002FBEE9 /* ImageURLProtocol.m in Sources */, 1A68DAD81803B588004CBA25 /* CustomWebView.m in Sources */, D318342118D0513D00E8F9B1 /* CookieStorage.m in Sources */, + 693BAD4F1C2705200022B557 /* DDHidDevice.m in Sources */, D318341B18CFC7C500E8F9B1 /* ApplicationStyle.m in Sources */, 2B8FC1C318C9CB16006D04FF /* RadiantPlayerScriptCommand.m in Sources */, D3B71C2F18C2D5770041358B /* LastFmPreferencesViewController.m in Sources */, D30CA00519383160007B05B2 /* NSApplication+ScriptingProperties.m in Sources */, 1A7B684C17453E40001E509E /* main.m in Sources */, D37B638A18F1EFD30098F9DC /* InvertedSpriteURLProtocol.m in Sources */, + 693BAD561C2705200022B557 /* NSXReturnThrowError.m in Sources */, D35F2E8C1A3D9D130072E461 /* Swizzle.c in Sources */, D3DB8FF518BD2AEC00ABE93B /* PlaybackConstants.m in Sources */, D32861701924744200395FEA /* NSHTTPCookieStorage+Swizzle.m in Sources */, + 693BAD4D1C2705200022B557 /* DDHidAppleMikey.m in Sources */, D3DF18181A99A581002AEE64 /* GoogleStyle.m in Sources */, D3D4C3EB18E77AA0007238B3 /* LastFmTrackTableCellView.m in Sources */, 1A7B685317453E40001E509E /* AppDelegate.m in Sources */, + 693BAD551C2705200022B557 /* NSDictionary+DDHidExtras.m in Sources */, D3DB8FF818BD6A6400ABE93B /* PlaybackSliderCell.m in Sources */, D3FAC6D718BA942500D9F461 /* PopupViewDelegate.m in Sources */, 42C12CDD1C1A73C100E5029B /* RdiantStyle.m in Sources */, @@ -657,8 +715,11 @@ D3B71C2818C2D5240041358B /* PreferencesWindowController.m in Sources */, D328616519234D7900395FEA /* TitleBarTextView.m in Sources */, D318341718CFBC7400E8F9B1 /* AppearancePreferencesViewController.m in Sources */, + 693BAD501C2705200022B557 /* DDHidElement.m in Sources */, D37B638418ED315B0098F9DC /* LastFm+TrackInfo.m in Sources */, + 693BAD511C2705200022B557 /* DDHidEvent.m in Sources */, D30CA0081938722F007B05B2 /* NSImage+ScriptingDescriptor.m in Sources */, + 693BAD541C2705200022B557 /* DDHidUsageTables.m in Sources */, D35788BD18C2F820006AF859 /* GeneralPreferencesViewController.m in Sources */, D3FAC6D418BA81EC00D9F461 /* PopupStatusView.m in Sources */, D31ACE8A193BDD0F00AC7CB4 /* NotificationCenter.m in Sources */, @@ -666,10 +727,13 @@ D37C928C195E3B3F0035709A /* SpotifyBlackStyle.m in Sources */, FF76BDFF1C05083D0004D31A /* DarkCyanStyle.m in Sources */, D343CDF518C69DF4002F9DB3 /* NavigationPreferencesViewController.m in Sources */, + 693BAD531C2705200022B557 /* DDHidUsage.m in Sources */, + 693BAD4E1C2705200022B557 /* DDHidAppleRemote.m in Sources */, D3F14A4918F357AA007D4536 /* AdvancedPreferencesViewController.m in Sources */, D3D4C3E818E76674007238B3 /* LastFmPopover.m in Sources */, D3091F6318C32961007C8DCD /* Utilities.m in Sources */, D370E8E318E2BFE1007B5450 /* ExpandHoverView.m in Sources */, + 693BAD521C2705200022B557 /* DDHidQueue.m in Sources */, D32861681924000800395FEA /* NSDate+UTCString.m in Sources */, D32CCEFD18BE9BF800BDD484 /* PopupView.m in Sources */, D36F50651A3D874E000541C9 /* VisualEffectView.m in Sources */, @@ -772,11 +836,12 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/radiant-player-mac/Frameworks", + "$(PROJECT_DIR)", ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "radiant-player-mac/prefix.pch"; INFOPLIST_FILE = "$(SRCROOT)/radiant-player-mac/info.plist"; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks @loader_path/../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks"; PRODUCT_NAME = "Radiant Player"; WRAPPER_EXTENSION = app; }; @@ -790,11 +855,12 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/radiant-player-mac/Frameworks", + "$(PROJECT_DIR)", ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "radiant-player-mac/prefix.pch"; INFOPLIST_FILE = "$(SRCROOT)/radiant-player-mac/info.plist"; - LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks @loader_path/../Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/../Frameworks"; PRODUCT_NAME = "Radiant Player"; WRAPPER_EXTENSION = app; }; diff --git a/radiant-player-mac/AppDelegate.h b/radiant-player-mac/AppDelegate.h index 1f0390ca..5402c66a 100644 --- a/radiant-player-mac/AppDelegate.h +++ b/radiant-player-mac/AppDelegate.h @@ -11,7 +11,6 @@ #import #import #import -#import #import "Notifications/NotificationCenter.h" @@ -45,7 +44,8 @@ NSMutableDictionary *_styles; BOOL _isTall; - NSArray *mikeys; + NSMutableArray *_mikeys; + NSMutableArray *_appleRemotes; WebView *dummyWebView; DummyWebViewPolicyDelegate *dummyWebViewDelegate; diff --git a/radiant-player-mac/AppDelegate.m b/radiant-player-mac/AppDelegate.m index 171697a7..f35800a7 100644 --- a/radiant-player-mac/AppDelegate.m +++ b/radiant-player-mac/AppDelegate.m @@ -9,9 +9,10 @@ #import "AppDelegate.h" #import "LastFmService.h" +#import "DDHidAppleRemote.h" +#import "DDHidAppleMikey.h" #import -#import @implementation AppDelegate @@ -512,8 +513,8 @@ static CGEventRef event_tap_callback(CGEventTapProxy proxy, - (void) pressKey:(NSUInteger)keytype { - [self keyEvent:keytype state:0xA]; // key down - [self keyEvent:keytype state: 0xB]; // key up + [self keyEvent:keytype state:0xA]; // key down + [self keyEvent:keytype state:0xB]; // key up } - (void) keyEvent:(NSUInteger)keytype state:(NSUInteger)state @@ -541,15 +542,32 @@ - (void) refreshMikeys { NSLog(@"Reset Mikeys"); - if (mikeys != nil) { - [mikeys makeObjectsPerformSelector:@selector(stopListening) withObject:nil]; + if (_mikeys != nil) { + @try { + [_mikeys makeObjectsPerformSelector:@selector(stopListening)]; + } + @catch (NSException *exception) { + NSLog(@"Error when stopListening on device: %@", exception); + } + } + @try { + NSArray *mikeys = [DDHidAppleMikey allMikeys]; + _mikeys = [NSMutableArray arrayWithCapacity:mikeys.count]; + for (DDHidAppleMikey *item in mikeys) { + @try { + [item setDelegate:self]; + [item setListenInExclusiveMode:NO]; + [item startListening]; + [_mikeys addObject:item]; + } + @catch (NSException *exception) { + NSLog(@"Error when startListning on device: %@, exception %@", item, exception); + } + } + } + @catch (NSException *exception) { + NSLog(@"Error obtaining HID devices: %@", [exception description]); } - mikeys = [DDHidAppleMikey allMikeys]; - // we want to be the delegate of the mikeys - [mikeys makeObjectsPerformSelector:@selector(setDelegate:) withObject:self]; - // start listening to all mikey events - [mikeys makeObjectsPerformSelector:@selector(setListenInExclusiveMode:) withObject:(id)kCFBooleanFalse]; - [mikeys makeObjectsPerformSelector:@selector(startListening) withObject:nil]; } - (void) ddhidAppleMikey:(DDHidAppleMikey *)mikey press:(unsigned)usageId upOrDown:(BOOL)upOrDown @@ -569,10 +587,10 @@ - (void) ddhidAppleMikey:(DDHidAppleMikey *)mikey press:(unsigned)usageId upOrDo withObject:nil waitUntilDone:NO]; break; case kHIDUsage_GD_SystemMenuUp: - [self pressKey:NX_KEYTYPE_SOUND_UP]; + // [self pressKey:NX_KEYTYPE_SOUND_UP]; break; case kHIDUsage_GD_SystemMenuDown: - [self pressKey:NX_KEYTYPE_SOUND_DOWN]; + // [self pressKey:NX_KEYTYPE_SOUND_DOWN]; break; default: NSLog(@"Unknown key press seen %d", usageId); diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidAppleMikey.h b/radiant-player-mac/DDHidLib/DDHidAppleMikey.h similarity index 100% rename from radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidAppleMikey.h rename to radiant-player-mac/DDHidLib/DDHidAppleMikey.h diff --git a/radiant-player-mac/DDHidLib/DDHidAppleMikey.m b/radiant-player-mac/DDHidLib/DDHidAppleMikey.m new file mode 100644 index 00000000..4be2735c --- /dev/null +++ b/radiant-player-mac/DDHidLib/DDHidAppleMikey.m @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2007 Dave Dribin + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#import "DDHidAppleMikey.h" +#import "DDHidElement.h" +#import "DDHidUsage.h" +#import "DDHidQueue.h" +#import "DDHidEvent.h" +#include + +#define APPLE_MIC_ONLY 1 + +@interface DDHidAppleMikey (DDHidAppleMikeyDelegate) + +- (void) ddhidAppleMikey: (DDHidAppleMikey *) mikey + press: (unsigned) usageId + upOrDown:(BOOL)upOrDown; + +@end + +@interface DDHidAppleMikey (Private) + +- (void) initPressElements: (NSArray *) elements; +- (void) ddhidQueueHasEvents: (DDHidQueue *) hidQueue; + +@end + +@implementation DDHidAppleMikey + ++ (NSArray *) allMikeys; +{ + //add mikeys + id a2 = [self allDevicesMatchingUsagePage:12 usageId:1 withClass:self skipZeroLocations:NO]; +#if APPLE_MIC_ONLY + a2 = [a2 filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"productName == \"Apple Mikey HID Driver\""]]; +#endif + + return a2; +} + +- (id) initWithDevice: (io_object_t) device error: (NSError **) error_; +{ + self = [super initWithDevice: device error: error_]; + if (self == nil) + return nil; + + mPressElements = [[NSMutableArray alloc] init]; + [self initPressElements: [self elements]]; + + return self; +} + +//=========================================================== +// dealloc +//=========================================================== +- (void) dealloc +{ + [mPressElements release]; + + mPressElements = nil; + [super dealloc]; +} + +#pragma mark - +#pragma mark Elements + +- (NSArray *) pressElements; +{ + return mPressElements; +} + +- (unsigned) numberOfKeys; +{ + return (unsigned)[mPressElements count]; +} + +- (void) addElementsToQueue: (DDHidQueue *) queue; +{ + [queue addElements: mPressElements]; +} + +#pragma mark - +#pragma mark Asynchronous Notification + +- (void) setDelegate: (id) delegate; +{ + mDelegate = delegate; +} + +- (void) addElementsToDefaultQueue; +{ + [self addElementsToQueue: mDefaultQueue]; +} + +@end + +@implementation DDHidAppleMikey (DDHidAppleMikeyDelegate) + +- (void) ddhidAppleMikey:(DDHidAppleMikey *)mikey press:(unsigned int)usageId upOrDown:(BOOL)upOrDown +{ + if ([mDelegate respondsToSelector: _cmd]) + [mDelegate ddhidAppleMikey: mikey press: usageId upOrDown:(BOOL)upOrDown]; +} + +@end + +@implementation DDHidAppleMikey (Private) + +- (void) initPressElements: (NSArray *) elements; +{ + NSEnumerator * e = [elements objectEnumerator]; + DDHidElement * element; + while (element = [e nextObject]) + { +// unsigned usagePage = [[element usage] usagePage]; +// unsigned usageId = [[element usage] usageId]; +// if (usagePage == kHIDPage_KeyboardOrKeypad) +// { +// if ((usageId >= 0x04) && (usageId <= 0xA4) || +// (usageId >= 0xE0) && (usageId <= 0xE7)) + { + [mPressElements addObject: element]; + } +// } + NSArray * subElements = [element elements]; + if (subElements != nil) + [self initPressElements: subElements]; + } +} + +- (void) ddhidQueueHasEvents: (DDHidQueue *) hidQueue; +{ + DDHidEvent * event; + while ((event = [hidQueue nextEvent])) + { + DDHidElement * element = [self elementForCookie: [event elementCookie]]; + unsigned usageId = [[element usage] usageId]; + SInt32 value = [event value]; + [self ddhidAppleMikey:self press:usageId upOrDown:value==1]; + } +} + +@end diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidAppleRemote.h b/radiant-player-mac/DDHidLib/DDHidAppleRemote.h similarity index 98% rename from radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidAppleRemote.h rename to radiant-player-mac/DDHidLib/DDHidAppleRemote.h index f6bc8ef3..a17bddc6 100644 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidAppleRemote.h +++ b/radiant-player-mac/DDHidLib/DDHidAppleRemote.h @@ -42,6 +42,7 @@ enum DDHidAppleRemoteEventIdentifier kDDHidRemoteButtonPlay_Sleep, kDDHidRemoteControl_Switched, kDDHidRemoteControl_Paired, + kDDHidRemoteButtonPlayPause }; typedef enum DDHidAppleRemoteEventIdentifier DDHidAppleRemoteEventIdentifier; diff --git a/radiant-player-mac/DDHidLib/DDHidAppleRemote.m b/radiant-player-mac/DDHidLib/DDHidAppleRemote.m new file mode 100644 index 00000000..35c75a81 --- /dev/null +++ b/radiant-player-mac/DDHidLib/DDHidAppleRemote.m @@ -0,0 +1,252 @@ +/* + * Copyright (c) 2007 Dave Dribin + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +// Based on Martin Kahr's Apple Remote wrapper +// http://www.martinkahr.com/source-code/ + +#import "DDHidAppleRemote.h" +#import "DDHidElement.h" +#import "DDHidUsage.h" +#import "DDHidQueue.h" +#import "DDHidEvent.h" +#import "NSDictionary+DDHidExtras.h" + +@interface DDHidAppleRemote (Private) + +- (void) initRemoteElements: (NSArray *) elements; + +- (void) ddhidQueueHasEvents: (DDHidQueue *) hidQueue; + +- (void) handleEventWithCookieString: (NSString*) cookieString + sumOfValues: (SInt32) sumOfValues; + +@end + +@implementation DDHidAppleRemote + ++ (NSArray *) allRemotes; +{ + CFMutableDictionaryRef hidMatchDictionary = + IOServiceMatching("AppleIRController"); + + return + [DDHidDevice allDevicesMatchingCFDictionary: hidMatchDictionary + withClass: self + skipZeroLocations: YES]; +} + ++ (DDHidAppleRemote *) firstRemote; +{ + NSArray * allRemotes = [self allRemotes]; + if ([allRemotes count] > 0) + return [allRemotes objectAtIndex: 0]; + else + return nil; +} + +- (id) initWithDevice: (io_object_t) device error: (NSError **) error_; +{ + self = [super initWithDevice: device error: error_]; + if (self == nil) + return nil; + + mCookieToButtonMapping = [[NSMutableDictionary alloc] init]; + + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonVolume_Plus + forKey: @"14_12_11_6_5_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonVolume_Plus + forKey: @"31_29_28_19_18_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonVolume_Minus + forKey: @"14_13_11_6_5_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonVolume_Minus + forKey: @"31_30_28_19_18_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonMenu + forKey: @"14_7_6_5_14_7_6_5_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonMenu + forKey: @"31_20_19_18_31_20_19_18_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonPlay + forKey: @"14_8_6_5_14_8_6_5_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonPlay + forKey: @"31_21_19_18_31_21_19_18_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonRight + forKey: @"14_9_6_5_14_9_6_5_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonRight + forKey: @"31_22_19_18_31_22_19_18_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonLeft + forKey: @"14_10_6_5_14_10_6_5_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonLeft + forKey: @"31_23_19_18_31_23_19_18_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonRight_Hold + forKey: @"14_6_5_4_2_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonRight_Hold + forKey: @"31_19_18_4_2_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonLeft_Hold + forKey: @"14_6_5_3_2_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonLeft_Hold + forKey: @"31_19_18_3_2_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonMenu_Hold + forKey: @"14_6_5_14_6_5_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonMenu_Hold + forKey: @"31_19_18_31_19_18_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonPlay_Sleep + forKey: @"18_14_6_5_18_14_6_5_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonPlay_Sleep + forKey: @"35_31_19_18_35_31_19_18_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteControl_Switched + forKey: @"19_"]; + //[mCookieToButtonMapping ddhid_setInt: kDDHidRemoteControl_Switched + // forKey: @"??_"]; // unknown for 10.5 + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteControl_Paired + forKey: @"15_14_6_5_15_14_6_5_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteControl_Paired + forKey: @"32_31_19_18_32_31_19_18_"]; + + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonVolume_Plus + forKey: @"33_31_30_21_20_2_"]; + [mCookieToButtonMapping ddhid_setInt:kDDHidRemoteButtonVolume_Minus + forKey:@"33_32_30_21_20_2_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonRight + forKey:@"33_24_21_20_2_33_24_21_20_2_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonLeft + forKey:@"33_25_21_20_2_33_25_21_20_2_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonPlay + forKey:@"33_21_20_3_2_33_21_20_3_2_"]; // center + // button + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonMenu + forKey:@"33_22_21_20_2_33_22_21_20_2_"]; + [mCookieToButtonMapping ddhid_setInt: kDDHidRemoteButtonPlayPause + forKey:@"33_21_20_8_2_33_21_20_8_2_"]; + + [self initRemoteElements: [self elements]]; + + + return self; +} + +//=========================================================== +// dealloc +//=========================================================== +- (void) dealloc +{ + [mCookieToButtonMapping release]; + [mButtonElements release]; + [mIdElement release]; + + mCookieToButtonMapping = nil; + mButtonElements = nil; + mIdElement = nil; + [super dealloc]; +} + +#pragma mark - +#pragma mark Asynchronous Notification + +- (void) setDelegate: (id) delegate; +{ + mDelegate = delegate; +} + +- (void) addElementsToDefaultQueue; +{ + [mDefaultQueue addElements: mButtonElements]; +} + +#pragma mark - +#pragma mark Properties + +//=========================================================== +// remoteId +//=========================================================== +- (int) remoteId +{ + return mRemoteId; +} + +- (void) setRemoteId: (int) theRemoteId +{ + mRemoteId = theRemoteId; +} + +@end + +@implementation DDHidAppleRemote (Private) + +- (void) initRemoteElements: (NSArray *) elements; +{ + NSAssert([elements count] == 1, @"Assume only 1 top level remote element"); + DDHidElement * consumerControlsElement = [elements objectAtIndex: 0]; + mButtonElements = [[consumerControlsElement elements] retain]; + DDHidElement * element; + NSEnumerator * e = [mButtonElements objectEnumerator]; + while (element = [e nextObject]) + { + if ([[element usage] isEqualToUsagePage: 0x0006 + usageId: 0x0022]) + { + mIdElement = [element retain]; + } + } +} + +- (void) ddhidQueueHasEvents: (DDHidQueue *) hidQueue; +{ + NSMutableString * cookieString = [NSMutableString string]; + SInt32 sumOfValues = 0; + + DDHidEvent * event; + while ((event = [hidQueue nextEvent])) + { + if ([event elementCookie] == [mIdElement cookie]) + { + [self setRemoteId: [event value]]; + } + else + { + sumOfValues += [event value]; + [cookieString appendString: + [NSString stringWithFormat: @"%u_", [event elementCookieAsUnsigned]]]; + } + } + [self handleEventWithCookieString: cookieString sumOfValues: sumOfValues]; +} + +- (void) handleEventWithCookieString: (NSString*) cookieString + sumOfValues: (SInt32) sumOfValues; +{ + NSNumber* buttonId = [mCookieToButtonMapping objectForKey: cookieString]; + if (buttonId != nil) + { + if ([mDelegate respondsToSelector: @selector(ddhidAppleRemoteButton:pressedDown:)]) + { + [mDelegate ddhidAppleRemoteButton: [buttonId intValue] + pressedDown: (sumOfValues>0)]; + } + } + else + NSLog(@"Unknown button for cookiestring %@", cookieString); + +} + +@end + diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidDevice.h b/radiant-player-mac/DDHidLib/DDHidDevice.h similarity index 100% rename from radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidDevice.h rename to radiant-player-mac/DDHidLib/DDHidDevice.h diff --git a/radiant-player-mac/DDHidLib/DDHidDevice.m b/radiant-player-mac/DDHidLib/DDHidDevice.m new file mode 100644 index 00000000..f9f44d3f --- /dev/null +++ b/radiant-player-mac/DDHidLib/DDHidDevice.m @@ -0,0 +1,612 @@ +/* + * Copyright (c) 2007 Dave Dribin + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#import "DDHidDevice.h" +#import "DDHidUsage.h" +#import "DDHidElement.h" +#import "DDHidQueue.h" +#import "NSDictionary+DDHidExtras.h" +#import "NSXReturnThrowError.h" + +#include + +@interface DDHidDevice (Private) + ++ (void) addDevice: (io_object_t) hidDevice + withClass: (Class) hidClass + skipZeroLocations: (BOOL) skipZeroLocations + toDeviceList: (NSMutableArray *) devices; + +- (BOOL) initPropertiesWithError: (NSError **) error_; +- (BOOL) createDeviceInterfaceWithError: (NSError **) error_; + +@end + +@implementation DDHidDevice + +- (id) initWithDevice: (io_object_t) device error: (NSError **) error; +{ + return [self initLogicalWithDevice: device + logicalDeviceNumber: 0 + error: error]; +} + +- (id) initLogicalWithDevice: (io_object_t) device + logicalDeviceNumber: (int) logicalDeviceNumber + error: (NSError **) error; +{ + self = [super init]; + if (self == nil) + return nil; + + mHidDevice = device; + IOObjectRetain(mHidDevice); + + if (![self initPropertiesWithError: error]) + { + [self release]; + return nil; + } + + if (![self createDeviceInterfaceWithError: error]) + { + [self release]; + return nil; + } + + mLogicalDeviceNumber = logicalDeviceNumber; + mListenInExclusiveMode = NO; + mDefaultQueue = nil; + mTag = 0; + + return self; +} + +//=========================================================== +// dealloc +//=========================================================== +- (void) dealloc +{ + [mDefaultQueue release]; + if (mDeviceInterface != NULL) + { + (*mDeviceInterface)->close(mDeviceInterface); + (*mDeviceInterface)->Release(mDeviceInterface); + } + [mElementsByCookie release]; + [mElements release]; + [mUsages release]; + [mPrimaryUsage release]; + [mProperties release]; + IOObjectRelease(mHidDevice); + + mProperties = nil; + mDeviceInterface = NULL; + [super dealloc]; +} + +#pragma mark - +#pragma mark Finding Devices + ++ (NSArray *) allDevices; +{ + // Set up a matching dictionary to search the I/O Registry by class + // name for all HID class devices + CFMutableDictionaryRef hidMatchDictionary = + IOServiceMatching(kIOHIDDeviceKey); + id retVal = nil; + if(hidMatchDictionary) { + retVal = [self allDevicesMatchingCFDictionary: hidMatchDictionary + withClass: [DDHidDevice class] + skipZeroLocations: NO]; + //CFRelease(hidMatchDictionary);//dont free, it is freed by IOServiceGetMatchingServices + } + return retVal; +} + ++ (NSArray *) allDevicesMatchingUsagePage: (unsigned) usagePage + usageId: (unsigned) usageId + withClass: (Class) hidClass + skipZeroLocations: (BOOL) skipZeroLocations; +{ + // Set up a matching dictionary to search the I/O Registry by class + // name for all HID class devices + CFMutableDictionaryRef hidMatchDictionary = + IOServiceMatching(kIOHIDDeviceKey); + id retVal = nil; + if(hidMatchDictionary) { + NSMutableDictionary * objcMatchDictionary = + (NSMutableDictionary *) hidMatchDictionary; + [objcMatchDictionary ddhid_setObject: [NSNumber numberWithUnsignedInt: usagePage] + forString: kIOHIDDeviceUsagePageKey]; + [objcMatchDictionary ddhid_setObject: [NSNumber numberWithUnsignedInt: usageId] + forString: kIOHIDDeviceUsageKey]; + retVal = [self allDevicesMatchingCFDictionary: hidMatchDictionary + withClass: hidClass + skipZeroLocations: skipZeroLocations]; + //CFRelease(hidMatchDictionary);//dont free, it is freed by IOServiceGetMatchingServices + } +return retVal; +} + ++ (NSArray *) allDevicesMatchingCFDictionary: (CFDictionaryRef) matchDictionary + withClass: (Class) hidClass + skipZeroLocations: (BOOL) skipZeroLocations; +{ + // Now search I/O Registry for matching devices. + io_iterator_t hidObjectIterator = MACH_PORT_NULL; + NSMutableArray * devices = [NSMutableArray array]; + @try + { + NSXThrowError(IOServiceGetMatchingServices(kIOMasterPortDefault, + matchDictionary, + &hidObjectIterator)); + + if (hidObjectIterator == 0) + return [NSArray array]; + + io_object_t hidDevice; + while ((hidDevice = IOIteratorNext(hidObjectIterator))) + { + @try { + [self addDevice: hidDevice + withClass: hidClass + skipZeroLocations: skipZeroLocations + toDeviceList: devices]; + } + @catch (NSException *exception) { + NSLog(@"(DDHidDevice) Error adding Hid device - %u, class - %@: %@", hidDevice, NSStringFromClass(hidClass), [exception description]); + } + } + + // This makes sure the array return is consistent from run to run, + // assuming no new devices were added. + [devices sortUsingSelector: @selector(compareByLocationId:)]; + } + @finally + { + if (hidObjectIterator != MACH_PORT_NULL) + IOObjectRelease(hidObjectIterator); + } + + return devices; +} + +- (int) logicalDeviceCount; +{ + return 1; +} + +#pragma mark - +#pragma mark I/O Kit Objects + +- (io_object_t) ioDevice; +{ + return mHidDevice; +} + +- (IOHIDDeviceInterface122**) deviceInterface; +{ + return mDeviceInterface; +} + +#pragma mark - +#pragma mark Operations + +- (void) open; +{ + [self openWithOptions: kIOHIDOptionsTypeNone]; +} + +- (void) openWithOptions: (UInt32) options; +{ + NSXThrowError((*mDeviceInterface)->open(mDeviceInterface, options)); +} + +- (void) close; +{ + NSXThrowError((*mDeviceInterface)->close(mDeviceInterface)); +} + +- (DDHidQueue *) createQueueWithSize: (unsigned) size; +{ + IOHIDQueueInterface ** queue = + (*mDeviceInterface)->allocQueue(mDeviceInterface); + if (queue == NULL) + return nil; + return [[[DDHidQueue alloc] initWithHIDQueue: queue + size: size] autorelease]; +} + +- (long) getElementValue: (DDHidElement *) element; +{ + IOHIDEventStruct event; + NSXThrowError((*mDeviceInterface)->getElementValue(mDeviceInterface, + [element cookie], + &event)); + return event.value; +} + +#pragma mark - +#pragma mark Asynchronous Notification + +//=========================================================== +// listenInExclusiveMode +//=========================================================== +- (BOOL) listenInExclusiveMode +{ + return mListenInExclusiveMode; +} + +- (void) setListenInExclusiveMode: (BOOL) flag +{ + mListenInExclusiveMode = flag; +} + +- (void) startListening; +{ + if ([self isListening]) + return; + + UInt32 options = kIOHIDOptionsTypeNone; + if (mListenInExclusiveMode) + options = kIOHIDOptionsTypeSeizeDevice; + [self openWithOptions: options]; + mDefaultQueue = [[self createQueueWithSize: [self sizeOfDefaultQueue]] retain]; + [mDefaultQueue setDelegate: self]; + [self addElementsToDefaultQueue]; + [mDefaultQueue startOnCurrentRunLoop]; +} + +- (void) stopListening; +{ + if (![self isListening]) + return; + + [mDefaultQueue stop]; + [mDefaultQueue release]; + mDefaultQueue = nil; + [self close]; +} + +- (BOOL) isListening; +{ + return (mDefaultQueue != nil); +} + +#pragma mark - +#pragma mark Properties + +- (NSDictionary *) properties; +{ + return mProperties; +} + +//=========================================================== +// - productName +//=========================================================== +- (NSString *) productName +{ + NSString * productName = [mProperties ddhid_stringForString: kIOHIDProductKey]; + if ([self logicalDeviceCount] > 1) + { + productName = [productName stringByAppendingString: + [NSString stringWithFormat:@" #%d", mLogicalDeviceNumber + 1]]; + } + return productName; +} + +//=========================================================== +// - manufacturer +//=========================================================== +- (NSString *) manufacturer +{ + return [mProperties ddhid_stringForString: kIOHIDManufacturerKey]; +} + +//=========================================================== +// - serialNumber +//=========================================================== +- (NSString *) serialNumber +{ + return [mProperties ddhid_stringForString: kIOHIDSerialNumberKey]; +} + +//=========================================================== +// - transport +//=========================================================== +- (NSString *) transport +{ + return [mProperties ddhid_stringForString: kIOHIDTransportKey]; +} + +//=========================================================== +// - vendorId +//=========================================================== +- (long) vendorId +{ + return [mProperties ddhid_longForString: kIOHIDVendorIDKey]; +} + +//=========================================================== +// - productId +//=========================================================== +- (long) productId +{ + return [mProperties ddhid_longForString: kIOHIDProductIDKey]; +} + +//=========================================================== +// - version +//=========================================================== +- (long) version +{ + return [mProperties ddhid_longForString: kIOHIDVersionNumberKey]; +} + +//=========================================================== +// - locationId +//=========================================================== +- (long) locationId +{ + return [mProperties ddhid_longForString: kIOHIDLocationIDKey]; +} + +//=========================================================== +// - usagePage +//=========================================================== +- (long) usagePage +{ + return [mProperties ddhid_longForString: kIOHIDPrimaryUsagePageKey]; +} + +//=========================================================== +// - usage +//=========================================================== +- (long) usage +{ + return [mProperties ddhid_longForString: kIOHIDPrimaryUsageKey]; +} + +- (NSArray *) elements; +{ + return mElements; +} + +- (DDHidElement *) elementForCookie: (IOHIDElementCookie) cookie; +{ + NSNumber * n = [NSNumber numberWithUnsignedInt: (unsigned) cookie]; + return [mElementsByCookie objectForKey: n]; +} + +- (DDHidUsage *) primaryUsage; +{ + return mPrimaryUsage; +} + +- (NSArray *) usages; +{ + return mUsages; +} + +- (NSComparisonResult) compareByLocationId: (DDHidDevice *) device; +{ + long myLocationId = [self locationId]; + long otherLocationId = [device locationId]; + if (myLocationId < otherLocationId) + return NSOrderedAscending; + else if (myLocationId > otherLocationId) + return NSOrderedDescending; + else + return NSOrderedSame; +} + +//=========================================================== +// tag +//=========================================================== +- (int) tag +{ + return mTag; +} + +- (void) setTag: (int) theTag +{ + mTag = theTag; +} + +- (NSString *)description{ + + return [NSString stringWithFormat:@"HidDevice with productName: %@\n manufacturer: %@\n serialNumber: %@\n transport: %@\n vendorId: %ld\n productId: %ld\n version: %ld\n locationId: %ld\n usagePage: %ld\n usage: %ld\n", [self productName], [self manufacturer], [self serialNumber], [self transport], [self vendorId], [self productId], [self version], [self locationId], [self usagePage], [self usage]]; +} + +@end + +@implementation DDHidDevice (Protected) + +- (unsigned) sizeOfDefaultQueue; +{ + return 10; +} + +- (void) addElementsToDefaultQueue; +{ + [mDefaultQueue addElements: [self elements] recursively: YES]; +} + +@end + +@implementation DDHidDevice (Private) + ++ (void) addDevice: (io_object_t) hidDevice + withClass: (Class) hidClass + skipZeroLocations: (BOOL) skipZeroLocations + toDeviceList: (NSMutableArray *) devices; +{ + @try + { + NSError * error = nil; + DDHidDevice * device = [[hidClass alloc] initWithDevice: hidDevice + error: &error]; + if (device == nil) + { + NSXRaiseError(error); + } + [device autorelease]; + + if (([device locationId] == 0) && skipZeroLocations) + return; + + [devices addObject: device]; + + // Add remainnig logical devices + int i; + for (i = 1; i < [device logicalDeviceCount]; i++) + { + device = [[hidClass alloc] initLogicalWithDevice: hidDevice + logicalDeviceNumber: i + error: &error]; + + if (device == nil) + { + NSXRaiseError(error); + } + [device autorelease]; + + [devices addObject: device]; + } + } + @finally + { + IOObjectRelease(hidDevice); + } +} + +- (void) indexElements: (NSArray *) elements; +{ + NSEnumerator * e = [elements objectEnumerator]; + DDHidElement * element; + while (element = [e nextObject]) + { + NSNumber * n = [NSNumber numberWithUnsignedInt: [element cookieAsUnsigned]]; + [mElementsByCookie setObject: element + forKey: n]; + NSArray * children = [element elements]; + if (children != nil) + [self indexElements: children]; + } +} + +- (BOOL) initPropertiesWithError: (NSError **) error_; +{ + NSError * error = nil; + BOOL result = NO; + + CFMutableDictionaryRef properties; + NSXReturnError(IORegistryEntryCreateCFProperties(mHidDevice, &properties, + kCFAllocatorDefault, kNilOptions)); + if (error) + goto done; + + mProperties = (NSMutableDictionary *) properties; + +#if DEBUG + if (![mProperties isKindOfClass:[NSDictionary class]]) { + NSLog(@"Hid device Properties is not a dictionary: %@ self: %@", mProperties, self); + } +#endif + + NSArray * elementProperties = [mProperties ddhid_objectForString: kIOHIDElementKey]; + mElements = [DDHidElement elementsWithPropertiesArray: elementProperties]; + [mElements retain]; + + unsigned usagePage = [mProperties ddhid_unsignedIntForString: kIOHIDPrimaryUsagePageKey]; + unsigned usageId = [mProperties ddhid_unsignedIntForString: kIOHIDPrimaryUsageKey]; + + mPrimaryUsage = [[DDHidUsage alloc] initWithUsagePage: usagePage + usageId: usageId]; + mUsages = [[NSMutableArray alloc] init]; + + NSArray * usagePairs = [mProperties ddhid_objectForString: kIOHIDDeviceUsagePairsKey]; + NSEnumerator * e = [usagePairs objectEnumerator]; + NSDictionary * usagePair; + while (usagePair = [e nextObject]) + { + usagePage = [usagePair ddhid_unsignedIntForString: kIOHIDDeviceUsagePageKey]; + usageId = [usagePair ddhid_unsignedIntForString: kIOHIDDeviceUsageKey]; + DDHidUsage * usage = [DDHidUsage usageWithUsagePage: usagePage + usageId: usageId]; + [mUsages addObject: usage]; + } + + mElementsByCookie = [[NSMutableDictionary alloc] init]; + [self indexElements: mElements]; + result = YES; + +done: + if (error_) + *error_ = error; + return result; +} + +- (BOOL) createDeviceInterfaceWithError: (NSError **) error_; +{ + io_name_t className; + IOCFPlugInInterface ** plugInInterface = NULL; + SInt32 score = 0; + NSError * error = nil; + BOOL result = NO; + + mDeviceInterface = NULL; + + NSXReturnError(IOObjectGetClass(mHidDevice, className)); + if (error) + goto done; + + NSXReturnError(IOCreatePlugInInterfaceForService(mHidDevice, + kIOHIDDeviceUserClientTypeID, + kIOCFPlugInInterfaceID, + &plugInInterface, + &score)); + if (error) + goto done; + + //Call a method of the intermediate plug-in to create the device interface + NSXReturnError((*plugInInterface)->QueryInterface(plugInInterface, CFUUIDGetUUIDBytes(kIOHIDDeviceInterfaceID), (LPVOID) &mDeviceInterface)); + if (error) + goto done; + + result = YES; + +done: + if (plugInInterface != NULL) + { + (*plugInInterface)->Release(plugInInterface); + } + if (error_) + *error_ = error; + return result; +} + +@end + diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidElement.h b/radiant-player-mac/DDHidLib/DDHidElement.h similarity index 100% rename from radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidElement.h rename to radiant-player-mac/DDHidLib/DDHidElement.h diff --git a/radiant-player-mac/DDHidLib/DDHidElement.m b/radiant-player-mac/DDHidLib/DDHidElement.m new file mode 100644 index 00000000..605824a6 --- /dev/null +++ b/radiant-player-mac/DDHidLib/DDHidElement.m @@ -0,0 +1,193 @@ +/* + * Copyright (c) 2007 Dave Dribin + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#import "DDHidElement.h" +#import "DDHidUsage.h" +#import "NSDictionary+DDHidExtras.h" +#include + +@implementation DDHidElement + ++ (NSArray *) elementsWithPropertiesArray: (NSArray *) propertiesArray; +{ + if(!propertiesArray) return nil; + if(![propertiesArray isKindOfClass:[NSArray class]]) propertiesArray = @[propertiesArray]; + + NSMutableArray * elements = [NSMutableArray array]; + + NSDictionary * properties; + NSEnumerator * e = [propertiesArray objectEnumerator]; + while (properties = [e nextObject]) + { +#if DEBUG + if (![properties isKindOfClass:[NSDictionary class]]) { + NSLog(@"DDHidElement properties is not a dictionary: %@ self: %@", properties, self); + } +#endif + DDHidElement * element = [DDHidElement elementWithProperties: properties]; + [elements addObject: element]; + } + + return elements; +} + ++ (DDHidElement *) elementWithProperties: (NSDictionary *) properties; +{ + DDHidElement * element = [[DDHidElement alloc] initWithProperties: properties]; + return [element autorelease]; +} + +- (id) initWithProperties: (NSDictionary *) properties; +{ + self = [super init]; + if (self == nil) + return nil; + + mProperties = [properties retain]; + unsigned usagePage = [mProperties ddhid_unsignedIntForString: kIOHIDElementUsagePageKey]; + unsigned usageId = [mProperties ddhid_unsignedIntForString: kIOHIDElementUsageKey]; + mUsage = [[DDHidUsage alloc] initWithUsagePage: usagePage + usageId: usageId]; + + NSArray * elementsProperties = + [mProperties ddhid_objectForString: kIOHIDElementKey]; + mElements = [[DDHidElement elementsWithPropertiesArray: elementsProperties] + retain]; + + return self; +} + +//=========================================================== +// dealloc +//=========================================================== +- (void) dealloc +{ + [mProperties release]; + [mUsage release]; + [mElements release]; + + mProperties = nil; + mUsage = nil; + mElements = nil; + [super dealloc]; +} + +- (NSDictionary *) properties; +{ + return mProperties; +} + +- (NSString *) stringForKey: (NSString *) key; +{ + return [mProperties objectForKey: key]; +} + +- (NSString *) description; +{ + return [[self usage] usageNameWithIds]; +} + +- (IOHIDElementCookie) cookie; +{ + return (IOHIDElementCookie) + [mProperties ddhid_unsignedIntForString: kIOHIDElementCookieKey]; +} + +- (unsigned) cookieAsUnsigned; +{ + return [mProperties ddhid_unsignedIntForString: kIOHIDElementCookieKey]; +} + +- (DDHidUsage *) usage; +{ + return mUsage; +} + +- (NSArray *) elements; +{ + return mElements; +} + +- (NSString *) name; +{ + return [mProperties ddhid_objectForString: kIOHIDElementNameKey]; +} + +- (BOOL) hasNullState; +{ + return [mProperties ddhid_boolForString: kIOHIDElementHasNullStateKey]; +} + +- (BOOL) hasPreferredState; +{ + return [mProperties ddhid_boolForString: kIOHIDElementHasNullStateKey]; +} + +- (BOOL) isArray; +{ + return [mProperties ddhid_boolForString: kIOHIDElementIsArrayKey]; +} + +- (BOOL) isRelative; +{ + return [mProperties ddhid_boolForString: kIOHIDElementIsRelativeKey]; +} + +- (BOOL) isWrapping; +{ + return [mProperties ddhid_boolForString: kIOHIDElementIsWrappingKey]; +} + +- (long) maxValue; +{ + return [mProperties ddhid_longForString: kIOHIDElementMaxKey]; +} + +- (long) minValue; +{ + return [mProperties ddhid_longForString: kIOHIDElementMinKey]; +} + +- (NSComparisonResult) compareByUsage: (DDHidElement *) device; +{ + unsigned myUsagePage = [[self usage] usagePage]; + unsigned myUsageId = [[self usage] usageId]; + + unsigned otherUsagePage = [[device usage] usagePage]; + unsigned otherUsageId = [[device usage] usageId]; + + if (myUsagePage < otherUsagePage) + return NSOrderedAscending; + else if (myUsagePage > otherUsagePage) + return NSOrderedDescending; + + if (myUsageId < otherUsageId) + return NSOrderedAscending; + else if (myUsageId > otherUsageId) + return NSOrderedDescending; + + return NSOrderedSame; +} + +@end diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidEvent.h b/radiant-player-mac/DDHidLib/DDHidEvent.h similarity index 100% rename from radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidEvent.h rename to radiant-player-mac/DDHidLib/DDHidEvent.h diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidEvent.h b/radiant-player-mac/DDHidLib/DDHidEvent.m similarity index 74% rename from radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidEvent.h rename to radiant-player-mac/DDHidLib/DDHidEvent.m index 0861cfd2..8b2ab5fb 100644 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidEvent.h +++ b/radiant-player-mac/DDHidLib/DDHidEvent.m @@ -22,24 +22,60 @@ * SOFTWARE. */ -#import -#include +#import "DDHidEvent.h" -@interface DDHidEvent : NSObject -{ - IOHIDEventStruct mEvent; -} + +@implementation DDHidEvent + (DDHidEvent *) eventWithIOHIDEvent: (IOHIDEventStruct *) event; +{ + return [[[self alloc] initWithIOHIDEvent: event] autorelease]; +} - (id) initWithIOHIDEvent: (IOHIDEventStruct *) event; +{ + self = [super init]; + if (self == nil) + return nil; + + mEvent = *event; + + return self; +} - (IOHIDElementType) type; +{ + return mEvent.type; +} + - (IOHIDElementCookie) elementCookie; +{ + return mEvent.elementCookie; +} + - (unsigned) elementCookieAsUnsigned; +{ + return (unsigned) mEvent.elementCookie; +} + - (SInt32) value; +{ + return mEvent.value; +} + - (AbsoluteTime) timestamp; +{ + return mEvent.timestamp; +} + - (UInt32) longValueSize; +{ + return mEvent.longValueSize; +} + - (void *) longValue; +{ + return mEvent.longValue; +} @end diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidQueue.h b/radiant-player-mac/DDHidLib/DDHidQueue.h similarity index 100% rename from radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidQueue.h rename to radiant-player-mac/DDHidLib/DDHidQueue.h diff --git a/radiant-player-mac/DDHidLib/DDHidQueue.m b/radiant-player-mac/DDHidLib/DDHidQueue.m new file mode 100644 index 00000000..4575dff0 --- /dev/null +++ b/radiant-player-mac/DDHidLib/DDHidQueue.m @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2007 Dave Dribin + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#import "DDHidQueue.h" +#import "DDHidElement.h" +#import "DDHIdEvent.h" +#import "NSXReturnThrowError.h" + +static void queueCallbackFunction(void* target, IOReturn result, void* refcon, + void* sender); + +@interface DDHidQueue (Private) + +- (void) handleQueueCallback; + +@end + +@implementation DDHidQueue + +- (id) initWithHIDQueue: (IOHIDQueueInterface **) queue + size: (unsigned) size; +{ + self = [super init]; + if (self == nil) + return nil; + + mQueue = queue; + IOReturn result = (*mQueue)->create(mQueue, 0, size); + if (result != kIOReturnSuccess) + { + [self release]; + return nil; + } + + return self; +} + +- (void) dealloc; +{ + [self stop]; + (*mQueue)->dispose(mQueue); + (*mQueue)->Release(mQueue); + [super dealloc]; +} + +- (void) addElement: (DDHidElement *) element; +{ + IOHIDElementCookie cookie = [element cookie]; + (*mQueue)->addElement(mQueue, cookie, 0); +} + +- (void) addElements: (NSArray *) elements; +{ + return [self addElements: elements recursively: NO]; +} + +- (void) addElements: (NSArray *) elements recursively: (BOOL) recursively; +{ + NSEnumerator * e = [elements objectEnumerator]; + DDHidElement * element; + while (element = [e nextObject]) + { + [self addElement: element]; + if (recursively) + [self addElements: [element elements]]; + } +} + +- (void) setDelegate: (id) delegate; +{ + mDelegate = delegate; +} + +- (void) startOnCurrentRunLoop; +{ + [self startOnRunLoop: [NSRunLoop currentRunLoop]]; +} + +- (void) startOnRunLoop: (NSRunLoop *) runLoop; +{ + if (mStarted) + return; + + mRunLoop = [runLoop retain]; + + NSXThrowError((*mQueue)->createAsyncEventSource(mQueue, &mEventSource)); + NSXThrowError((*mQueue)->setEventCallout(mQueue, queueCallbackFunction, self, NULL)); + CFRunLoopAddSource([mRunLoop getCFRunLoop], mEventSource, + kCFRunLoopDefaultMode); + (*mQueue)->start(mQueue); + mStarted = YES; +} + +- (void) stop; +{ + if (!mStarted) + return; + + CFRunLoopRemoveSource([mRunLoop getCFRunLoop], mEventSource, kCFRunLoopDefaultMode); + (*mQueue)->stop(mQueue); + [mRunLoop release]; + CFRelease(mEventSource); + + mRunLoop = nil; + mStarted = NO; +} + +- (BOOL) isStarted; +{ + return mStarted; +} + +- (BOOL) getNextEvent: (IOHIDEventStruct *) event; +{ + AbsoluteTime zeroTime = {0, 0}; + IOReturn result = (*mQueue)->getNextEvent(mQueue, event, zeroTime, 0); + return (result == kIOReturnSuccess); +} + +- (DDHidEvent *) nextEvent; +{ + AbsoluteTime zeroTime = {0, 0}; + IOHIDEventStruct event; + IOReturn result = (*mQueue)->getNextEvent(mQueue, &event, zeroTime, 0); + if (result != kIOReturnSuccess) + return nil; + else + return [DDHidEvent eventWithIOHIDEvent: &event]; +} + +@end + +@implementation DDHidQueue (Private) + +- (void) handleQueueCallback; +{ + if ([mDelegate respondsToSelector: @selector(ddhidQueueHasEvents:)]) + { + [mDelegate ddhidQueueHasEvents: self]; + } +} + +@end + +static void queueCallbackFunction(void* target, IOReturn result, void* refcon, + void* sender) +{ + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + DDHidQueue * queue = (DDHidQueue *) target; + [queue handleQueueCallback]; + [pool release]; + +} diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidUsage.h b/radiant-player-mac/DDHidLib/DDHidUsage.h similarity index 100% rename from radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidUsage.h rename to radiant-player-mac/DDHidLib/DDHidUsage.h diff --git a/radiant-player-mac/DDHidLib/DDHidUsage.m b/radiant-player-mac/DDHidLib/DDHidUsage.m new file mode 100644 index 00000000..8fe2c117 --- /dev/null +++ b/radiant-player-mac/DDHidLib/DDHidUsage.m @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2007 Dave Dribin + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#import "DDHidUsage.h" +#import "DDHidUsageTables.h" + +@implementation DDHidUsage + ++ (DDHidUsage *) usageWithUsagePage: (unsigned) usagePage + usageId: (unsigned) usageId; +{ + return [[[self alloc] initWithUsagePage: usagePage usageId: usageId] + autorelease]; +} + +- (id) initWithUsagePage: (unsigned) usagePage + usageId: (unsigned) usageId; +{ + self = [super init]; + if (self == nil) + return nil; + + mUsagePage = usagePage; + mUsageId = usageId; + + return self; +} + +- (unsigned) usagePage; +{ + return mUsagePage; +} + +- (unsigned) usageId; +{ + return mUsageId; +} + +- (NSString *) usageName; +{ + DDHidUsageTables * usageTables = [DDHidUsageTables standardUsageTables]; + return + [usageTables descriptionForUsagePage: mUsagePage + usage: mUsageId]; +} + +- (NSString *) usageNameWithIds; +{ + return [NSString stringWithFormat: @"%@ (0x%04x : 0x%04x)", + [self usageName], mUsagePage, mUsageId]; +} + +- (NSString *) description; +{ + return [NSString stringWithFormat: @"HID Usage: %@", [self usageName]]; +} + +- (BOOL) isEqualToUsagePage: (unsigned) usagePage usageId: (unsigned) usageId; +{ + return ((mUsagePage == usagePage) && (mUsageId == usageId)); +} + +@end diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidUsageTables.h b/radiant-player-mac/DDHidLib/DDHidUsageTables.h similarity index 100% rename from radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidUsageTables.h rename to radiant-player-mac/DDHidLib/DDHidUsageTables.h diff --git a/radiant-player-mac/DDHidLib/DDHidUsageTables.m b/radiant-player-mac/DDHidLib/DDHidUsageTables.m new file mode 100644 index 00000000..9e7703a8 --- /dev/null +++ b/radiant-player-mac/DDHidLib/DDHidUsageTables.m @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2007 Dave Dribin + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#import "DDHidUsageTables.h" + +@implementation DDHidUsageTables + +static DDHidUsageTables * sStandardUsageTables = nil; + ++ (DDHidUsageTables *) standardUsageTables; +{ + if (sStandardUsageTables == nil) + { + NSBundle * myBundle = [NSBundle bundleForClass: self]; + NSString * usageTablesPath = + [myBundle pathForResource: @"DDHidStandardUsages" ofType: @"plist"]; + NSDictionary * lookupTables = + [NSDictionary dictionaryWithContentsOfFile: usageTablesPath]; + sStandardUsageTables = + [[DDHidUsageTables alloc] initWithLookupTables: lookupTables]; + [sStandardUsageTables retain]; + } + + return sStandardUsageTables; +} + +- (id) initWithLookupTables: (NSDictionary *) lookupTables; +{ + self = [super init]; + if (self == nil) + return nil; + + mLookupTables = [lookupTables retain]; + + return self; +} + +- (NSString *) descriptionForUsagePage: (unsigned) usagePage + usage: (unsigned) usage +{ + NSString * usagePageString = [NSString stringWithFormat: @"%u", usagePage]; + NSString * usageString = [NSString stringWithFormat: @"%u", usage]; + // NSNumber * usagePageNumber = [NSNumber numberWithUnsignedInt: usagePage]; + + NSDictionary * usagePageLookup = [mLookupTables objectForKey: usagePageString]; + if (usagePageLookup == nil) + return @"Unknown usage page"; + + NSDictionary * usageLookup = [usagePageLookup objectForKey: @"usages"]; + NSString * description = [usageLookup objectForKey: usageString]; + if (description != nil) + return description; + + NSString * defaultUsage = [usagePageLookup objectForKey: @"default"]; + if (defaultUsage != nil) + { + description = [NSString stringWithFormat: defaultUsage, usage]; + return description; + } + + return @"Unknown usage"; +} + +@end diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidUsage.h b/radiant-player-mac/DDHidLib/NSDictionary+DDHidExtras.h similarity index 68% rename from radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidUsage.h rename to radiant-player-mac/DDHidLib/NSDictionary+DDHidExtras.h index 8dc5654c..750d0d40 100644 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidUsage.h +++ b/radiant-player-mac/DDHidLib/NSDictionary+DDHidExtras.h @@ -25,28 +25,22 @@ #import -@interface DDHidUsage : NSObject -{ - unsigned mUsagePage; - unsigned mUsageId; -} +@interface NSDictionary (DDHidExtras) -+ (DDHidUsage *) usageWithUsagePage: (unsigned) usagePage - usageId: (unsigned) usageId; +- (unsigned) ddhid_unsignedForKey: (NSString *) key; -- (id) initWithUsagePage: (unsigned) usagePage - usageId: (unsigned) usageId; +- (id) ddhid_objectForString: (const char *) key; -- (unsigned) usagePage; +- (NSString *) ddhid_stringForString: (const char *) key; +- (long) ddhid_longForString: (const char *) key; +- (unsigned int) ddhid_unsignedIntForString: (const char *) key; +- (BOOL) ddhid_boolForString: (const char *) key; -- (unsigned) usageId; - -- (NSString *) usageName; - -- (NSString *) usageNameWithIds; +@end -- (NSString *) description; +@interface NSMutableDictionary (DDHidExtras) -- (BOOL) isEqualToUsagePage: (unsigned) usagePage usageId: (unsigned) usageId; +- (void) ddhid_setObject: (id) object forString: (const char *) key; +- (void) ddhid_setInt: (int) i forKey: (id) key; @end diff --git a/radiant-player-mac/DDHidLib/NSDictionary+DDHidExtras.m b/radiant-player-mac/DDHidLib/NSDictionary+DDHidExtras.m new file mode 100644 index 00000000..4864a489 --- /dev/null +++ b/radiant-player-mac/DDHidLib/NSDictionary+DDHidExtras.m @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2007 Dave Dribin + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#import "NSDictionary+DDHidExtras.h" + + +@implementation NSDictionary (DDHidExtras) + +- (unsigned) ddhid_unsignedForKey: (NSString *) key; +{ + NSNumber * number = [self objectForKey: key]; + return [number unsignedIntValue]; +} + +- (id) ddhid_objectForString: (const char *) key; +{ + NSString * objcKey = [NSString stringWithUTF8String: key]; + return [self objectForKey: objcKey]; +} + +- (NSString *) ddhid_stringForString: (const char *) key; +{ + return [self ddhid_objectForString: key]; +} + +- (long) ddhid_longForString: (const char *) key; +{ + NSNumber * number = [self ddhid_objectForString: key]; + return [number longValue]; +} + +- (unsigned int) ddhid_unsignedIntForString: (const char *) key; +{ + NSNumber * number = [self ddhid_objectForString: key]; + return [number unsignedIntValue]; +} + +- (BOOL) ddhid_boolForString: (const char *) key; +{ + NSNumber * number = [self ddhid_objectForString: key]; + return [number boolValue]; +} + +@end + +@implementation NSMutableDictionary (DDHidExtras) + +- (void) ddhid_setObject: (id) object forString: (const char *) key; +{ + NSString * objcKey = [NSString stringWithUTF8String: key]; + [self setObject: object forKey: objcKey]; +} + +- (void) ddhid_setInt: (int) i forKey: (id) key; +{ + NSNumber * number = [NSNumber numberWithInt: i]; + [self setObject: number forKey: key]; +} + +@end diff --git a/radiant-player-mac/DDHidLib/NSXReturnThrowError.h b/radiant-player-mac/DDHidLib/NSXReturnThrowError.h new file mode 100644 index 00000000..b8aa11a3 --- /dev/null +++ b/radiant-player-mac/DDHidLib/NSXReturnThrowError.h @@ -0,0 +1,103 @@ +/***************************************************************************//** + NSXReturnThrowError.h + Copyright (c) 2007 Jonathan 'Wolf' Rentzsch: + Some rights reserved: + + @section Overview + + NSXReturnThrowError does two things: + + 1. Eases wrapping error codes into NSError objects. + + 2. Enhances NSError by adding origin information to the error instance. + Origin information includes the actual line of code that returned + the error, as well as the file+line+function/method name. + + A big NSXReturnThrowError feature is that it deduces the correct NSError + error domain based on the wrapped code's return type+value. Bonus: it + does so without requiring ObjC++, relying on \@encode acrobatics + instead. + + NSXReturnThrowError was coded against 10.4, but should be compatible + with 10.3 as well. However that's currently untested. + + @section Usage + + NSXReturnThrowError handles both types of error handling: explicit + returning of NSError objects and raising NSExceptions. + + Use NSXReturnError() if you're returning NSError objects explicitly: + + @code + - (id)demoReturnError:(NSError**)error_ { + id result = nil; + NSError *error = nil; + + NSXReturnError(SomeCarbonFunction()); + if (!error) + NSXReturnError(someposixfunction()); + if (!error) + NSXReturnError(some_mach_function()); + if (!error) + NSXReturnError([SomeCocoaClass sharedInstance]); + + if (error_) *error_ = error; + return result; + } + @endcode + + Use NSXThrowError() if you'd prefer to raise NSException objects: + + @code + - (id)demo { + id result = nil; + + NSXThrowError(SomeCarbonFunction()); + NSXThrowError(someposixfunction()); + NSXThrowError(some_mach_function()); + NSXThrowError([SomeCocoaClass newObject]); + + return result; + } + @endcode + + The current structure of the raised NSException object is that it's a + normal NSException whose name is "NSError". The actual error object is + hung off the exception's userInfo dictionary with the key of @"error". + + @mainpage NSXReturnThrowError + @todo Add a compile-time flag for whether to stuff __FILE__+friends + info into the generated NSError or not. + + + ***************************************************************************/ + +#import + +extern NSString *NSXErrorExceptionName; +extern NSString *NULLPointerErrorDomain; +extern NSString *BOOLErrorDomain; + +void NSXMakeErrorImp(const char *objCType_, intptr_t result_, const char *file_, unsigned line_, const char *function_, const char *code_, NSError **error_); + +#define NSXMakeError(ERROR, CODE) \ + do{ \ + typeof(CODE) codeResult = (CODE); \ + NSXMakeErrorImp(@encode(typeof(CODE)), (intptr_t)codeResult, __FILE__, __LINE__, __PRETTY_FUNCTION__, #CODE, &ERROR); \ + }while(0) + +#define NSXReturnError(CODE) NSXMakeError(error, CODE) + +#define NSXRaiseError(ERROR) \ + [[NSException exceptionWithName:NSXErrorExceptionName \ + reason:[error description] \ + userInfo:[NSDictionary dictionaryWithObject:error forKey:@"error"]] raise]; + +#define NSXThrowError(CODE) \ + do{ \ + NSError *error = nil; \ + NSXReturnError(CODE); \ + if (error) { \ + NSXRaiseError(ERROR); \ + } \ + }while(0) diff --git a/radiant-player-mac/DDHidLib/NSXReturnThrowError.m b/radiant-player-mac/DDHidLib/NSXReturnThrowError.m new file mode 100644 index 00000000..bb1f0d7c --- /dev/null +++ b/radiant-player-mac/DDHidLib/NSXReturnThrowError.m @@ -0,0 +1,106 @@ +/******************************************************************************* + NSXReturnThrowError.m + Copyright (c) 2007 Jonathan 'Wolf' Rentzsch: + Some rights reserved: + + ***************************************************************************/ + +#import "NSXReturnThrowError.h" + +NSString *NSXErrorExceptionName = @"NSXError"; +NSString *NULLPointerErrorDomain = @"NULLPointerErrorDomain"; +NSString *BOOLErrorDomain = @"BOOLErrorDomain"; + +typedef enum { + NSXErrorCodeType_Unknown, + NSXErrorCodeType_Cocoa, // "@" + NSXErrorCodeType_PosixOrMach, // "i" (-1 == posix+errno, otherwise mach) + NSXErrorCodeType_Carbon, // "s" || "l" + NSXErrorCodeType_ptr, // "r*" || "*" || "^" + NSXErrorCodeType_BOOL // "c" +} NSXErrorCodeType; + +static NSXErrorCodeType NSXErrorCodeTypeFromObjCType(const char *objCType) { + switch (objCType[0]) { + case 's': + case 'l': + return NSXErrorCodeType_Carbon; + case 'i': + return NSXErrorCodeType_PosixOrMach; + case '@': + return NSXErrorCodeType_Cocoa; + case '^': + case '*': + return NSXErrorCodeType_ptr; + case 'r': + return '*' == objCType[1] ? NSXErrorCodeType_ptr : NSXErrorCodeType_Unknown; + case 'c': + return NSXErrorCodeType_BOOL; + default: + return NSXErrorCodeType_Unknown; + } +} + +void NSXMakeErrorImp(const char *objCType_, intptr_t result_, const char *file_, unsigned line_, const char *function_, const char *code_, NSError **error_) { + NSString *errorDomain = nil; + int errorCode = (int)result_; + + switch (NSXErrorCodeTypeFromObjCType(objCType_)) { + case NSXErrorCodeType_Cocoa: + // codeResult's type is an id/NSObject* pointer. 0 == nil == failure. + if (0 == result_) { + errorDomain = @"NSCocoaErrorDomain"; // Could use NSCocoaErrorDomain symbol, but that would force us to 10.4. + errorCode = -1; + } + break; + case NSXErrorCodeType_Carbon: + // codeResult's type is OSErr (short) or OSStatus (long). 0 == noErr == success. + if (0 != result_) { + errorDomain = NSOSStatusErrorDomain; + } + break; + case NSXErrorCodeType_PosixOrMach: + // codeResult's type is int, which is used for both posix error codes and mach_error_t/kern_return_t. + // 0 means success for both, and we can differentiate posix error codes since they're always -1 (the + // actual posix code stored in errno). + if (0 != result_) { + if (-1 == result_) { + // Posix error code. + errorDomain = NSPOSIXErrorDomain; + errorCode = errno; + } else { + // Mach error code. + errorDomain = NSMachErrorDomain; + } + } + break; + case NSXErrorCodeType_ptr: + // codeResult's type is some sort of non-id/non-NSObject* pointer. 0 == NULL == failure. + if (0 == result_) { + errorDomain = NULLPointerErrorDomain; + errorCode = -1; + } + break; + case NSXErrorCodeType_BOOL: + // codeResult's type is a BOOL. 0 == NO == failure. + if (0 == result_) { + errorDomain = BOOLErrorDomain; + errorCode = -1; + } + break; + default: + NSCAssert1(NO, @"NSXErrorCodeType_Unknown: \"%s\"", objCType_); + break; + } + + if (errorDomain && error_) { + *error_ = [NSError errorWithDomain:errorDomain + code:errorCode + userInfo:[NSDictionary dictionaryWithObjectsAndKeys: + [NSString stringWithUTF8String:file_], @"reportingFile", + [NSNumber numberWithInt:line_], @"reportingLine", + [NSString stringWithUTF8String:function_], @"reportingMethod", + [NSString stringWithUTF8String:code_], @"origin", + nil]]; + } +} diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/DDHidLib b/radiant-player-mac/Frameworks/DDHidLib.framework/DDHidLib deleted file mode 100755 index 1257681a..00000000 Binary files a/radiant-player-mac/Frameworks/DDHidLib.framework/DDHidLib and /dev/null differ diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidAppleRemote.h b/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidAppleRemote.h deleted file mode 100644 index f6bc8ef3..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidAppleRemote.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2007 Dave Dribin - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#import - -#import "DDHidDevice.h" - -@class DDHidElement; - -enum DDHidAppleRemoteEventIdentifier -{ - kDDHidRemoteButtonVolume_Plus=0, - kDDHidRemoteButtonVolume_Minus, - kDDHidRemoteButtonMenu, - kDDHidRemoteButtonPlay, - kDDHidRemoteButtonRight, - kDDHidRemoteButtonLeft, - kDDHidRemoteButtonRight_Hold, - kDDHidRemoteButtonLeft_Hold, - kDDHidRemoteButtonMenu_Hold, - kDDHidRemoteButtonPlay_Sleep, - kDDHidRemoteControl_Switched, - kDDHidRemoteControl_Paired, -}; -typedef enum DDHidAppleRemoteEventIdentifier DDHidAppleRemoteEventIdentifier; - -@interface DDHidAppleRemote : DDHidDevice -{ - NSMutableDictionary * mCookieToButtonMapping; - NSArray * mButtonElements; - DDHidElement * mIdElement; - int mRemoteId; - - id mDelegate; -} - -+ (NSArray *) allRemotes; - -+ (DDHidAppleRemote *) firstRemote; - -- (id) initWithDevice: (io_object_t) device error: (NSError **) error_; - -#pragma mark - -#pragma mark Asynchronous Notification - -- (void) setDelegate: (id) delegate; - -- (void) addElementsToDefaultQueue; - -#pragma mark - -#pragma mark Properties - -- (int) remoteId; -- (void) setRemoteId: (int) theRemoteId; - -@end - -@interface NSObject (DDHidAppleRemoteDelegate) - -- (void) ddhidAppleRemoteButton: (DDHidAppleRemoteEventIdentifier) buttonIdentifier - pressedDown: (BOOL) pressedDown; - -@end diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidJoystick.h b/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidJoystick.h deleted file mode 100644 index ebf20ccb..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidJoystick.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2007 Dave Dribin - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#import -#import "DDHidDevice.h" - -@class DDHidElement; -@class DDHidQueue; - -@interface DDHidJoystickStick : NSObject -{ - DDHidElement * mXAxisElement; - DDHidElement * mYAxisElement; - NSMutableArray * mStickElements; - // Point of view elements (i.e. hat switches) - NSMutableArray * mPovElements; -} - -- (DDHidElement *) xAxisElement; - -- (DDHidElement *) yAxisElement; - -#pragma mark - -#pragma mark StickElements - indexed accessors - -- (unsigned int) countOfStickElements; -- (DDHidElement *) objectInStickElementsAtIndex: (unsigned int)index; - -#pragma mark - -#pragma mark PovElements - indexed accessors - -- (unsigned int) countOfPovElements; -- (DDHidElement *) objectInPovElementsAtIndex: (unsigned int)index; - -- (NSArray *) allElements; - -- (BOOL) addElement: (DDHidElement *) element; - -@end - -@interface DDHidJoystick : DDHidDevice -{ - NSMutableArray * mSticks; - NSMutableArray * mButtonElements; - NSMutableArray * mLogicalDeviceElements; - - id mDelegate; -} - -+ (NSArray *) allJoysticks; - -- (id) initLogicalWithDevice: (io_object_t) device - logicalDeviceNumber: (int) logicalDeviceNumber - error: (NSError **) error; - -- (int) logicalDeviceCount; - -#pragma mark - -#pragma mark Joystick Elements - -- (unsigned) numberOfButtons; - -- (NSArray *) buttonElements; - -#pragma mark - -#pragma mark Sticks - indexed accessors - -- (unsigned int) countOfSticks; -- (DDHidJoystickStick *) objectInSticksAtIndex: (unsigned int)index; - -- (void) addElementsToQueue: (DDHidQueue *) queue; - -#pragma mark - -#pragma mark Asynchronous Notification - -- (void) setDelegate: (id) delegate; - -- (void) addElementsToDefaultQueue; - -@end - -#define DDHID_JOYSTICK_VALUE_MIN -65536 -#define DDHID_JOYSTICK_VALUE_MAX 65536 - -@interface NSObject (DDHidJoystickDelegate) - -- (void) ddhidJoystick: (DDHidJoystick *) joystick - stick: (unsigned) stick - xChanged: (int) value; - -- (void) ddhidJoystick: (DDHidJoystick *) joystick - stick: (unsigned) stick - yChanged: (int) value; - -- (void) ddhidJoystick: (DDHidJoystick *) joystick - stick: (unsigned) stick - otherAxis: (unsigned) otherAxis - valueChanged: (int) value; - -- (void) ddhidJoystick: (DDHidJoystick *) joystick - stick: (unsigned) stick - povNumber: (unsigned) povNumber - valueChanged: (int) value; - -- (void) ddhidJoystick: (DDHidJoystick *) joystick - buttonDown: (unsigned) buttonNumber; - -- (void) ddhidJoystick: (DDHidJoystick *) joystick - buttonUp: (unsigned) buttonNumber; - -@end diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidKeyboard.h b/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidKeyboard.h deleted file mode 100644 index fd9200d2..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidKeyboard.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2007 Dave Dribin - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#import -#import "DDHidDevice.h" - -@class DDHidElement; -@class DDHidQueue; - -@interface DDHidKeyboard : DDHidDevice -{ - NSMutableArray * mKeyElements; - - id mDelegate; -} - -+ (NSArray *) allKeyboards; - -- (id) initWithDevice: (io_object_t) device error: (NSError **) error_; - -#pragma mark - -#pragma mark Keyboards Elements - -- (NSArray *) keyElements; - -- (unsigned) numberOfKeys; - -- (void) addElementsToQueue: (DDHidQueue *) queue; - -#pragma mark - -#pragma mark Asynchronous Notification - -- (void) setDelegate: (id) delegate; - -- (void) addElementsToDefaultQueue; - -@end - -@interface NSObject (DDHidKeyboardDelegate) - -- (void) ddhidKeyboard: (DDHidKeyboard *) keyboard - keyDown: (unsigned) usageId; - -- (void) ddhidKeyboard: (DDHidKeyboard *) keyboard - keyUp: (unsigned) usageId; - -@end diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidKeyboardBarcodeScanner.h b/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidKeyboardBarcodeScanner.h deleted file mode 100644 index 6573b016..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidKeyboardBarcodeScanner.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2007 Dave Dribin, Lucas Newman - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#import -#import "DDHidDevice.h" - -@class DDHidElement; -@class DDHidQueue; - -@interface DDHidKeyboardBarcodeScanner : DDHidDevice -{ - NSMutableArray * mKeyElements; - - NSMutableString * mAccumulatedDigits; - NSTimer *mBarcodeInputTimer; - BOOL mIsLikelyKeyboardBarcodeScanner; - - id mDelegate; -} - -+ (NSArray *) allPossibleKeyboardBarcodeScanners; - -- (id) initWithDevice: (io_object_t) device error: (NSError **) error_; - -#pragma mark - -#pragma mark Keyboard Elements - -- (NSArray *) keyElements; - -- (NSUInteger) numberOfKeys; - -- (void) addElementsToQueue: (DDHidQueue *) queue; - -#pragma mark - -#pragma mark Asynchronous Notification - -- (void) setDelegate: (id) delegate; - -- (void) addElementsToDefaultQueue; - -#pragma mark - -#pragma mark Properties - -- (BOOL) isLikelyKeyboardBarcodeScanner; - -@end - -@interface NSObject (DDHidKeyboardBarcodeScannerDelegate) - -- (void) ddhidKeyboardBarcodeScanner: (DDHidKeyboardBarcodeScanner *) keyboardBarcodeScanner - gotBarcode: (NSString *) barcode; - -@end diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidLib.h b/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidLib.h deleted file mode 100644 index 20d86817..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidLib.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2007 Dave Dribin - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#import "DDHidDevice.h" -#import "DDHidElement.h" -#import "DDHidUsage.h" -#import "DDHidQueue.h" -#import "DDHidEvent.h" -#import "DDHidUsageTables.h" -#import "DDHidMouse.h" -#import "DDHidJoystick.h" -#import "DDHidKeyboard.h" -#import "DDHidAppleRemote.h" -#import "DDHidAppleMikey.h" -#import "DDHidKeyboardBarcodeScanner.h" diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidMouse.h b/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidMouse.h deleted file mode 100644 index d396aba0..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Headers/DDHidMouse.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2007 Dave Dribin - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#import -#import "DDHidDevice.h" - -@class DDHidElement; -@class DDHidQueue; - -@interface DDHidMouse : DDHidDevice -{ - DDHidElement * mXElement; - DDHidElement * mYElement; - DDHidElement * mWheelElement; - NSMutableArray * mButtonElements; - - id mDelegate; -} - -+ (NSArray *) allMice; - -- (id) initWithDevice: (io_object_t) device error: (NSError **) error_; - -#pragma mark - -#pragma mark Mouse Elements - -- (DDHidElement *) xElement; - -- (DDHidElement *) yElement; - -- (DDHidElement *) wheelElement; - -- (NSArray *) buttonElements; - -- (unsigned) numberOfButtons; - -- (void) addElementsToQueue: (DDHidQueue *) queue; - -#pragma mark - -#pragma mark Asynchronous Notification - -- (void) setDelegate: (id) delegate; - -- (void) addElementsToDefaultQueue; - -@end - -@interface NSObject (DDHidMouseDelegate) - -- (void) ddhidMouse: (DDHidMouse *) mouse xChanged: (SInt32) deltaX; -- (void) ddhidMouse: (DDHidMouse *) mouse yChanged: (SInt32) deltaY; -- (void) ddhidMouse: (DDHidMouse *) mouse wheelChanged: (SInt32) deltaWheel; -- (void) ddhidMouse: (DDHidMouse *) mouse buttonDown: (unsigned) buttonNumber; -- (void) ddhidMouse: (DDHidMouse *) mouse buttonUp: (unsigned) buttonNumber; - -@end - diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Resources/DDHidStandardUsages.plist b/radiant-player-mac/Frameworks/DDHidLib.framework/Resources/DDHidStandardUsages.plist deleted file mode 100644 index 84eb663f..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Resources/DDHidStandardUsages.plist +++ /dev/null @@ -1,2327 +0,0 @@ - - - - - 1 - - description - Generic Desktop - ranges - - - usages - - 0 - Undefined - 1 - Pointer - 2 - Mouse - 3 - Reserved - 4 - Joystick - 5 - Game Pad - 6 - Keyboard - 7 - Keypad - 8 - Multi-axis Controller - 48 - X - 49 - Y - 50 - Z - 51 - Rx - 52 - Ry - 53 - Rz - 54 - Slider - 55 - Dial - 56 - Wheel - 57 - Hat Switch - 58 - Counted Buffer - 59 - Byte Count - 60 - Motion Wakeup - 64 - Vx - 65 - Vy - 66 - Vz - 67 - Vbrx - 68 - Vbry - 69 - Vbrx - 70 - Vno - 128 - System Control - 129 - System Power Down - 130 - System Sleep - 131 - System Wake Up - 132 - System Context Menu - 133 - System Main Menu - 134 - System App Menu - 135 - System Menu Help - 136 - System Menu Exit - 137 - System Menu Select - 138 - System Menu Right - 139 - System Menu Left - 140 - System Menu Up - 141 - System Menu Down - 144 - D-pad Up - 145 - D-pad Down - 146 - D-pad Right - 147 - D-pad Left - - - 2 - - description - Simulation Controls - ranges - - - usages - - 0 - Undefined - 1 - Flight Simulation Device - 2 - Automobile Simulation Device - 3 - Tank Simulation Device - 4 - Spaceship Simulation Device - 5 - Submarine Simulation Device - 6 - Sailing Simulation Device - 7 - Motorcycle Simulation Device - 8 - Sports Simulation Device - 9 - Airplane Simulation Device - 10 - Helicopter Simulation Device - 11 - Magic Carpet Simulation Device - 12 - Bicycle - 32 - Flight Control Stick - 33 - Flight Stick - 34 - Cyclic Control - 35 - Cyclic Trim - 36 - Flight Yoke - 37 - Track Control - 38 - Driving Control - 176 - Aileron - 177 - Aileron Trim - 178 - Anti-Torque Control - 179 - Auto-pilot Enable - 180 - Chaff Release - 181 - Collective Control - 182 - Dive Brake - 183 - Electronic Counter Measures - 184 - Elevator - 185 - Elevator Trim - 186 - Rudder - 187 - Throttle - 188 - Flight Communication - 189 - Flare Release - 190 - Landing Gear - 191 - Toe Brake - 192 - Trigger - 193 - Weapons Arm - 194 - Weapons Select - 195 - Wing Flaps - 196 - Accelerator - 197 - Brake - 198 - Clutch - 199 - Shifter - 200 - Steering - 201 - Turret Direction - 202 - Barrel Elevation - 203 - Dive Plane - 204 - Ballast - 205 - Bicycle Crank - 206 - Handle Bars - 207 - Front Brake - 208 - Rear Brake - - - 3 - - description - VR Controls - ranges - - - usages - - 0 - Unidentified - 1 - Belt - 2 - Body Suit - 3 - Flexor - 4 - Glove - 5 - Head Tracker - 6 - Head Mounted Display - 7 - Hand Tracker - 8 - Oculometer - 9 - Vest - 10 - Animatronic Device - 32 - Stereo Enable - 33 - Display Enable - - - 4 - - description - Sports Controls - ranges - - - usages - - 0 - Unidentified - 1 - Baseball Bat - 2 - Golf Club - 3 - Rowing Machine - 4 - Treadmill - 48 - Oar - 49 - Slope - 50 - Rate - 51 - Stick Speed - 52 - Stick Face Angle - 53 - Stick Heel/Toe - 54 - Stick Follow Through - 55 - Stick Tempo - 56 - Stick Type - 57 - Stick Height - 80 - Putter - 81 - 1 Iron - 82 - 2 Iron - 83 - 3 Iron - 84 - 4 Iron - 85 - 5 Iron - 86 - 6 Iron - 87 - 7 Iron - 88 - 8 Iron - 89 - 9 Iron - 90 - 10 Iron - 91 - 11 Iron - 92 - Sand Wedge - 93 - Loft Wedge - 94 - Power Wedge - 95 - 1 Wood - 96 - 3 Wood - 97 - 5 Wood - 98 - 7 Wood - 99 - 9 Wood - - - 5 - - description - Game Controls - ranges - - - usages - - 0 - Undefined - 1 - 3D Game Controller - 2 - Pinball Device - 3 - Gun Device - 32 - Point of View - 33 - Turn Right/Left - 34 - Pitch Right/Left - 35 - Roll Forward/Backward - 36 - Move Right/Left - 37 - Move Forward/Backward - 38 - Move Up/Down - 39 - Lean Right/Left - 40 - Lean Forward/Backward - 41 - Height of POV - 42 - Flipper - 43 - Secondary Flipper - 44 - Bump - 45 - New Game - 46 - Shoot Ball - 47 - Player - 48 - Gun Bolt - 49 - Gun Clip - 50 - Gun Selector - 51 - Gun Single Shot - 52 - Gun Burst - 53 - Gun Automatic - 54 - Gun Safety - 55 - Gamepad Fire/Jump - 57 - Gamepad Trigger - - - 7 - - description - Keyboard - ranges - - - usages - - 0 - No Event - 1 - Keyboard ErrorRollOver - 2 - Keyboard POSTFail - 3 - Keyboard ErrorUndefined - 4 - Keyboard a and A - 5 - Keyboard b and B - 6 - Keyboard c and C - 7 - Keyboard d and D - 8 - Keyboard e and E - 9 - Keyboard f and F - 10 - Keyboard g and G - 11 - Keyboard h and H - 12 - Keyboard i and I - 13 - Keyboard j and J - 14 - Keyboard k and K - 15 - Keyboard l and L - 16 - Keyboard m and M - 17 - Keyboard n and N - 18 - Keyboard o and O - 19 - Keyboard p and P - 20 - Keyboard q and Q - 21 - Keyboard r and R - 22 - Keyboard s and S - 23 - Keyboard t and T - 24 - Keyboard u and U - 25 - Keyboard v and V - 26 - Keyboard w and W - 27 - Keyboard x and X - 28 - Keyboard y and Y - 29 - Keyboard z and Z - 30 - Keyboard 1 and ! - 31 - Keyboard 2 and @ - 32 - Keyboard 3 and # - 33 - Keyboard 4 and $ - 34 - Keyboard 5 and % - 35 - Keyboard 6 and ^ - 36 - Keyboard 7 and & - 37 - Keyboard 8 and * - 38 - Keyboard 9 and ( - 39 - Keyboard 0 and ) - 40 - Keyboard Return (ENTER) - 41 - Keyboard ESCAPE - 42 - Keyboard DELETE (Backspace) - 43 - Keyboard Tab - 44 - Keyboard Spacebar - 45 - Keyboard - and (underscore) - 46 - Keyboard = and + - 47 - Keyboard [ and { - 48 - Keyboard ] and } - 49 - Keyboard \ and | - 50 - Keyboard Non-US # and ~ - 51 - Keyboard ; and : - 52 - Keyboard ' and " - 53 - Keyboard Grave Accent and Tilde - 54 - Keyboard, and < - 55 - Keyboard . and > - 56 - Keyboard / and ? - 57 - Keyboard Caps Lock - 58 - Keyboard F1 - 59 - Keyboard F2 - 60 - Keyboard F3 - 61 - Keyboard F4 - 62 - Keyboard F5 - 63 - Keyboard F6 - 64 - Keyboard F7 - 65 - Keyboard F8 - 66 - Keyboard F9 - 67 - Keyboard F10 - 68 - Keyboard F11 - 69 - Keyboard F12 - 70 - Keyboard PrintScreen - 71 - Keyboard Scroll Lock - 72 - Keyboard Pause - 73 - Keyboard Insert - 74 - Keyboard Home - 75 - Keyboard PageUp - 76 - Keyboard Delete Forward - 77 - Keyboard End - 78 - Keyboard PageDown - 79 - Keyboard RightArrow - 80 - Keyboard LeftArrow - 81 - Keyboard DownArrow - 82 - Keyboard UpArrow - 83 - Keypad Num Lock and Clear - 84 - Keypad / - 85 - Keypad * - 86 - Keypad - - 87 - Keypad + - 88 - Keypad ENTER - 89 - Keypad 1 and End - 90 - Keypad 2 and Down Arrow - 91 - Keypad 3 and PageDn - 92 - Keypad 4 and Left Arrow - 93 - Keypad 5 - 94 - Keypad 6 and Right Arrow - 95 - Keypad 7 and Home - 96 - Keypad 8 and Up Arrow - 97 - Keypad 9 and PageUp - 98 - Keypad 0 and Insert - 99 - Keypad . and Delete - 100 - Keyboard Non-US \ and | - 101 - Keyboard Application - 102 - Keyboard Power - 103 - Keypad = - 104 - Keyboard F13 - 105 - Keyboard F14 - 106 - Keyboard F15 - 107 - Keyboard F16 - 108 - Keyboard F17 - 109 - Keyboard F18 - 110 - Keyboard F19 - 111 - Keyboard F20 - 112 - Keyboard F21 - 113 - Keyboard F22 - 114 - Keyboard F23 - 115 - Keyboard F24 - 116 - Keyboard Execute - 117 - Keyboard Help - 118 - Keyboard Menu - 119 - Keyboard Select - 120 - Keyboard Stop - 121 - Keyboard Again - 122 - Keyboard Undo - 123 - Keyboard Cut - 124 - Keyboard Copy - 125 - Keyboard Paste - 126 - Keyboard Find - 127 - Keyboard Mute - 128 - Keyboard Volume Up - 129 - Keyboard Volume Down - 130 - Keyboard Locking Caps Lock - 131 - Keyboard Locking Num Lock - 132 - Keyboard Locking Scroll Lock - 133 - Keypad Comma - 134 - Keypad Equal Sign - 135 - Keyboard International1 - 136 - Keyboard International2 - 137 - Keyboard International3 - 138 - Keyboard International4 - 139 - Keyboard International5 - 140 - Keyboard International6 - 141 - Keyboard International7 - 142 - Keyboard International8 - 143 - Keyboard International9 - 144 - Keyboard LANG1 - 145 - Keyboard LANG2 - 146 - Keyboard LANG3 - 147 - Keyboard LANG4 - 148 - Keyboard LANG5 - 149 - Keyboard LANG6 - 150 - Keyboard LANG7 - 151 - Keyboard LANG8 - 152 - Keyboard LANG9 - 153 - Keyboard Alternate Erase - 154 - Keyboard SysReq/Attention - 155 - Keyboard Cancel - 156 - Keyboard Clear - 157 - Keyboard Prior - 158 - Keyboard Return - 159 - Keyboard Separator - 160 - Keyboard Out - 161 - Keyboard Oper - 162 - Keyboard Clear/Again - 163 - Keyboard CrSel/Props - 164 - Keyboard ExSel - 224 - Keyboard LeftControl - 225 - Keyboard LeftShift - 226 - Keyboard LeftAlt - 227 - Keyboard Left GUI - 228 - Keyboard RightControl - 229 - Keyboard RightShift - 230 - Keyboard RightAlt - 231 - Keyboard Right GUI - - - 8 - - description - LEDs - ranges - - {76, 65535} - Reserved - - usages - - 0 - Undefined - 1 - Num Lock - 2 - Caps Lock - 3 - Scroll Lock - 4 - Compose - 5 - Kana - 6 - Power - 7 - Shift - 8 - Do Not Disturb - 9 - Mute - 10 - Tone Enable - 11 - High Cut Filter - 12 - Low Cut Filter - 13 - Equalizer Enable - 14 - Sound Field On - 15 - Surround Field On - 16 - Repeat - 17 - Stereo - 18 - Sampling Rate Detect - 19 - Spinning - 20 - CAV - 21 - CLV - 22 - Recording Format Detect - 23 - Off-Hook - 24 - Ring - 25 - Message Waiting - 26 - Data Mode - 27 - Battery Operation - 28 - Battery OK - 29 - Battery Low - 30 - Speaker - 31 - Head Set - 32 - Hold - 33 - Microphone - 34 - Coverage - 35 - Night Mode - 36 - Send Calls - 37 - Call Pickup - 38 - Conference - 39 - Stand-by - 40 - Camera On - 41 - Camera Off - 42 - On-Line - 43 - Off-Line - 44 - Busy - 45 - Ready - 46 - Paper-Out - 47 - Paper-Jam - 48 - Remote - 49 - Forward - 50 - Reverse - 51 - Stop - 52 - Rewind - 53 - Fast Forward - 54 - Play - 55 - Pause - 56 - Record - 57 - Error - 58 - Usage Selected Indicator - 59 - Usage In Use Indicator - 60 - Usage Multi Mode Indicator - 61 - Indicator On - 62 - Indicator Flash - 63 - Indicator Slow Blink - 64 - Indicator Fast Blink - 65 - Indicator Off - 66 - Flash On Time - 67 - Slow Blink On Time - 68 - Slow Blink Off Time - 69 - Fast Blink On Time - 70 - Fast Blink Off Time - 71 - Usage Indicator Color - 72 - Red - 73 - Green - 74 - Amber - 75 - Generic Indicator - 76 - System Suspend - 77 - External Power Connected - - - 9 - - default - Button %d - description - Button - ranges - - - usages - - 0 - No Button Pressed - - - 10 - - default - Instance %d - description - Ordinal - ranges - - - usages - - 0 - Unused - - - 11 - - description - Telephony - ranges - - - usages - - 0 - Unassigned - 1 - Phone - 2 - Answering Machine - 3 - Message Controls - 4 - Handset - 5 - Headset - 6 - Telephony Key Pad - 7 - Programmable Button - 32 - Hook Switch - 33 - Flash - 34 - Feature - 35 - Hold - 36 - Redial - 37 - Transfer - 38 - Drop - 39 - Park - 40 - Forward Calls - 41 - Alternate Function - 42 - Line - 43 - Speaker Phone - 44 - Conference - 45 - Ring Enable - 46 - Ring Select - 47 - Phone Mute - 48 - Caller ID - 80 - Speed Dial - 81 - Store Number - 82 - Recall Number - 83 - Phone Directory - 112 - Voice Mail - 113 - Screen Calls - 114 - Do Not Disturb - 115 - Message - 116 - Answer On/Off - 144 - Inside Dial Tone - 145 - Outside Dial Tone - 146 - Inside Ring Tone - 147 - Outside Ring Tone - 148 - Priority Ring Tone - 149 - Inside Ringback - 150 - Priority Ringback - 151 - Line Busy Tone - 152 - Reorder Tone - 153 - Call Waiting Tone - 154 - Confirmation Tone 1 - 155 - Confirmation Tone 2 - 156 - Tones Off - 176 - Phone Key 0 - 177 - Phone Key 1 - 178 - Phone Key 2 - 179 - Phone Key 3 - 180 - Phone Key 4 - 181 - Phone Key 5 - 182 - Phone Key 6 - 183 - Phone Key 7 - 184 - Phone Key 8 - 185 - Phone Key 9 - 186 - Phone Key Star - 187 - Phone Key Pound - 188 - Phone Key A - 189 - Phone Key B - 190 - Phone Key C - 191 - Phone Key D - - - 12 - - description - Consumer - ranges - - - usages - - 0 - Unassigned - 1 - Consumer Control - 2 - Numeric Key Pad - 3 - Programmable Buttons - 32 - +10 - 33 - +100 - 34 - AM/PM - 48 - Power - 49 - Reset - 50 - Sleep - 51 - Sleep After - 52 - Sleep Mode - 53 - Illumination - 54 - Function Buttons - 64 - Menu - 65 - Menu Pick - 66 - Menu Up - 67 - Menu Down - 68 - Menu Left - 69 - Menu Right - 70 - Menu Escape - 71 - Menu Value Increase - 72 - Menu Value Decrease - 96 - Data On Screen - 97 - Closed Caption - 98 - Closed Caption Select - 99 - VCR/TV - 100 - Broadcast Mode - 101 - Snapshot - 102 - Still - 128 - Selection - 129 - Assign Selection - 130 - Mode Step - 131 - Recall Last - 132 - Enter Channel - 133 - Order Movie - 134 - Channel - 135 - Media Selection - 136 - Media Select Computer - 137 - Media Select TV - 138 - Media Select WWW - 139 - Media Select DVD - 140 - Media Select Telephone - 141 - Media Select Program Guide - 142 - Media Select Video Phone - 143 - Media Select Games - 144 - Media Select Messages - 145 - Media Select CD - 146 - Media Select VCR - 147 - Media Select Tuner - 148 - Quit - 149 - Help - 150 - Media Select Tape - 151 - Media Select Cable - 152 - Media Select Satellite - 153 - Media Select Security - 154 - Media Select Home - 155 - Media Select Call - 156 - Channel Increment - 157 - Channel Decrement - 158 - Media Select SAP - 160 - VCR Plus - 161 - Once - 162 - Daily - 163 - Weekly - 164 - Monthly - 176 - Play - 177 - Pause - 178 - Record - 179 - Fast Forward - 180 - Rewind - 181 - Scan Next Track - 182 - Scan Previous Track - 183 - Stop - 184 - Eject - 185 - Random Play - 186 - Select DisC - 187 - Enter Disc - 188 - Repeat - 189 - Tracking - 190 - Track Normal - 191 - Slow Tracking - 192 - Frame Forward - 193 - Frame Back - 194 - Mark - 195 - Clear Mark - 196 - Repeat From Mark - 197 - Return To Mark - 198 - Search Mark Forward - 199 - Search Mark Backwards - 200 - Counter Reset - 201 - Show Counter - 202 - Tracking Increment - 203 - Tracking Decrement - 205 - Pause/Play - 224 - Volume - 225 - Balance - 226 - Mute - 227 - Bass - 228 - Treble - 229 - Bass Boost - 230 - Surround Mode - 231 - Loudness - 232 - MPX - 233 - Volume Up - 234 - Volume Down - 240 - Speed Select - 241 - Playback Speed - 242 - Standard Play - 243 - Long Play - 244 - Extended Play - 245 - Slow - 256 - Fan Enable - 257 - Fan Speed - 258 - Light - 259 - Light Illumination Level - 260 - Climate Control Enable - 261 - Room Temperature - 262 - Security Enable - 263 - Fire Alarm - 264 - Police Alarm - 336 - Balance Right - 337 - Balance Left - 338 - Bass Increment - 339 - Bass Decrement - 340 - Treble Increment - 341 - Treble Decrement - 352 - Speaker System - 353 - Channel Left - 354 - Channel Right - 355 - Channel Center - 356 - Channel Front - 357 - Channel Center Front - 358 - Channel Side - 359 - Channel Surround - 360 - Channel Low Frequency Enhancement - 361 - Channel Top - 362 - Channel Unknown - 368 - Sub-channel - 369 - Sub-channel Increment - 370 - Sub-channel Decrement - 371 - Alternate Audio Increment - 372 - Alternate Audio Decrement - 384 - Application Launch Buttons - 385 - AL Launch Button Configuration Tool - 386 - AL Programmable Button Configuration - 387 - AL Consumer Control Configuration - 388 - AL Word Processor - 389 - AL Text Editor - 390 - AL Spreadsheet - 391 - AL Graphics Editor - 392 - AL Presentation App - 393 - AL Database App - 394 - AL Email Reader - 395 - AL Newsreader - 396 - AL Voicemail - 397 - AL Contacts/Address Book - 398 - AL Calendar/Schedule - 399 - AL Task/Project Manager - 400 - AL Log/Journal/Timecard - 401 - AL Checkbook/Finance - 402 - AL Calculator - 403 - AL A/V Capture/Playback - 404 - AL Local Machine Browser - 405 - AL LAN/WAN Browser - 406 - AL Internet Browser - 407 - AL Remote Networking/ISP Connect - 408 - AL Network Conference - 409 - AL Network Chat - 410 - AL Telephony/Dialer - 411 - AL Logon - 412 - AL Logoff - 413 - AL Logon/Logoff - 414 - AL Terminal Lock/Screensaver - 415 - AL Control Panel - 416 - AL Command Line Processor/Run - 417 - AL Process/Task Manager - 418 - AL Select Tast/Application - 419 - AL Next Task/Application - 420 - AL Previous Task/Application - 421 - AL Preemptive Halt Task/Application - 423 - AL My Documents - 427 - AC Spell - 438 - AL My Pictures - 439 - AL My Music - 512 - Generic GUI Application Controls - 513 - AC New - 514 - AC Open - 515 - AC Close - 516 - AC Exit - 517 - AC Maximize - 518 - AC Minimize - 519 - AC Save - 520 - AC Print - 521 - AC Properties - 538 - AC Undo - 539 - AC Copy - 540 - AC Cut - 541 - AC Paste - 542 - AC Select All - 543 - AC Find - 544 - AC Find and Replace - 545 - AC Search - 546 - AC Go To - 547 - AC Home - 548 - AC Back - 549 - AC Forward - 550 - AC Stop - 551 - AC Refresh - 552 - AC Previous Link - 553 - AC Next Link - 554 - AC Bookmarks - 555 - AC History - 556 - AC Subscriptions - 557 - AC Zoom In - 558 - AC Zoom Out - 559 - AC Zoom - 560 - AC Full Screen View - 561 - AC Normal View - 562 - AC View Toggle - 563 - AC Scroll Up - 564 - AC Scroll Down - 565 - AC Scroll - 566 - AC Pan Left - 567 - AC Pan Right - 568 - AC Pan - 569 - AC New Window - 570 - AC Tile Horizontally - 571 - AC Tile Vertically - 572 - AC Format - 633 - AC Redo - 649 - AC Reply - 651 - AC Fwd - 652 - AC Send - - - 13 - - description - Digitizer - ranges - - - usages - - 0 - Undefined - 1 - Digitizer - 2 - Pen - 3 - Light Pen - 4 - Touch Screen - 5 - Touch Pad - 6 - White Board - 7 - Coordinate Measuring Machine - 8 - 3-D Digitizer - 9 - Stereo Plotter - 10 - Articulated Arm - 11 - Armature - 12 - Multiple Point Digitizer - 13 - Free Space Wand - 32 - Stylus - 33 - Puck - 34 - Finger - 48 - Tip Pressure - 49 - Barrel Pressure - 50 - In Range - 51 - Touch - 52 - Untouch - 53 - Tap - 54 - Quality - 55 - Data Valid - 56 - Transducer Index - 57 - Tablet Function Keys - 58 - Program Change Keys - 59 - Battery Strength - 60 - Invert - 61 - X Tilt - 62 - Y Tilt - 63 - Azimuth - 64 - Altitude - 65 - Twist - 66 - Tip Switch - 67 - Secondary Tip Switch - 68 - Barrel Switch - 69 - Eraser - 70 - Tablet Pick - - - 15 - - description - Physical Interface Device - ranges - - - usages - - - - 16 - - default - Unicode Char u%04x - description - Unicode - ranges - - - usages - - - - 20 - - description - Alphnumeric Display - ranges - - - usages - - 0 - Undefined - 1 - Alphanumeric Display - 32 - Display Attributes Report - 33 - ASCII Character Set - 34 - Data Read Back - 35 - Font Read Back - 36 - Display Control Report - 37 - Clear Display - 38 - Display Enable - 39 - Screen Saver Delay - 40 - Screen Saver Enable - 41 - Vertical Scroll - 42 - Horizontal Scroll - 43 - Character Report - 44 - Display Data - 45 - Display Status - 46 - Stat Not Ready - 47 - Stat Ready - 48 - Err Not a loadable character - 49 - Err Font data cannot be read - 50 - Cursor Position Report - 51 - Row - 52 - Column - 53 - Rows - 54 - Columns - 55 - Cursor Pixel Positioning - 56 - Cursor Mode - 57 - Cursor Enable - 58 - Cursor Blink - 59 - Font Report - 60 - Font Data - 61 - Character Width - 62 - Character Height - 63 - Character Spacing Horizontal - 64 - Character Spacing Vertical - 65 - Unicode Character Set - - - 128 - - description - Monitor - ranges - - - usages - - 0 - Undefined - 1 - Monitor Control - 2 - EDID Information - 3 - VDIF Information - 4 - VESA Version - 5 - On Screen Display - 6 - Auto Size Center - 7 - Polarity Horz Synch - 8 - Polarity Vert Synch - 9 - Sync Type - 10 - Screen Position - 11 - Horizontal Frequency - 12 - Vertical Frequency - - - 129 - - default - ENUM %d - description - Monitor Enumerated Values - ranges - - - usages - - 0 - unassigned - - - 130 - - description - VESA Virtual Controls - ranges - - - usages - - 16 - Brightness - 18 - Contrast - 22 - Video Gain Red - 24 - Video Gain Green - 26 - Video Gain Blue - 28 - Focus - 32 - Horizontal Position - 34 - Horizontal Size - 36 - Horizontal Pincushion - 38 - Horizontal Pincushion Balance - 40 - Horizontal Misconvergence - 42 - Horizontal Linearity - 44 - Horizontal Linearity Balance - 48 - Vertical Position - 50 - Vertical Size - 52 - Vertical Pincushion - 54 - Vertical Pincushion Balance - 56 - Vertical Misconvergence - 58 - Vertical Linearity - 60 - Vertical Linearity Balance - 64 - Parallelogram Distortion - 66 - Trapezoidal Distortion - 68 - Tilt - 70 - Top Corner Distortion Control - 72 - Top Corner Distortion Balance - 74 - Bottom Corner Distortion Control - 76 - Bottom Corner Distortion Balance - 86 - MoirHorizontal - 88 - MoirVertical - 94 - Input Level Select - 96 - Input Source Select - 98 - Stereo Mode - 108 - Video Black Level Red - 110 - Video Black Level Green - 112 - Video Black Level Blue - - - 131 - - description - VESA Command - ranges - - - usages - - 0 - Undefined - 1 - Settings - 2 - Degauss - - - 132 - - description - Power Device - ranges - - - usages - - 0 - Undefined - 1 - iName - 2 - PresentStatus - 3 - ChangedStatus - 4 - UPS - 5 - PowerSupply - 16 - BatterySystem - 17 - BatterySystemID - 18 - Battery - 19 - BatteryID - 20 - Charger - 21 - ChargerID - 22 - PowerConverter - 23 - PowerConverterID - 24 - OutletSystem - 25 - OutletSystemID - 26 - Input - 27 - InputID - 28 - Output - 29 - OutputID - 30 - Flow - 31 - FlowID - 32 - Outlet - 33 - OutletID - 34 - Gang - 35 - GangID - 36 - Sink - 37 - SinkID - 48 - Voltage - 49 - Current - 50 - Frequency - 51 - ApparentPower - 52 - ActivePower - 53 - PercentLoad - 54 - Temperature - 55 - Humidity - 64 - ConfigVoltage - 65 - ConfigCurrent - 66 - ConfigFrequency - 67 - ConfigApparentPower - 68 - ConfigActivePower - 69 - ConfigPercentLoad - 70 - ConfigTemperature - 71 - ConfigHumidity - 80 - SwitchOnControl - 81 - SwitchOffControl - 82 - ToggleControl - 83 - LowVoltageTransfer - 84 - HighVoltageTransfer - 85 - DelayBeforeReboot - 86 - DelayBeforeStartup - 87 - DelayBeforeShutdown - 88 - Test - 89 - Vendorspecificcommand - 96 - Present - 97 - Good - 98 - InternalFailure - 99 - VoltageOutOfRange - 100 - FrequencyOutOfRange - 101 - Overload - 102 - OverCharged - 103 - OverTemperature - 104 - ShutdownRequested - 105 - ShutdownImminent - 106 - VendorSpecificAnswerValid - 107 - SwitchOn/Off - 108 - Switcheble - 109 - Used - 110 - Boost - 111 - Buck - 112 - Initialized - 113 - Tested - - - 133 - - description - Battery System - ranges - - - usages - - 0 - Undefined - 1 - SMBBatteryMode - 2 - SMBBatteryStatus - 3 - SMBAlarmWarning - 4 - SMBChargerMode - 5 - SMBChargerStatus - 6 - SMBChargerSpecInfo - 7 - SMBSelectorState - 8 - SMBSelectorPreset - 9 - SMBSelectorInfo - 16 - OptionalMfgFunction1 - 17 - OptionalMfgFunction2 - 18 - OptionalMfgFunction3 - 19 - OptionalMfgFunction4 - 20 - OptionalMfgFunction5 - 21 - ConnectionToSMBus - 22 - OutputConnection - 23 - ChargerConnection - 24 - BatteryInsertion - 25 - Usenext - 26 - OKToUse - 40 - ManufacturerAccess - 41 - RemainingCapacityLimit - 42 - RemainingTimeLimit - 43 - AtRate - 44 - CapacityMode - 45 - BroadcastToCharger - 46 - PrimaryBattery - 47 - ChargeController - 64 - TerminateCharge - 65 - TermminateDischarge - 66 - BelowRemainingCapacityLimit - 67 - RemainingTimeLimitExpired - 68 - Charging - 69 - Discharging - 70 - FullyCharged - 71 - FullyDischarged - 72 - ConditionningFlag - 73 - AtRateOK - 74 - SMBErrorCode - 75 - NeedReplacement - 96 - AtRateTimeToFull - 97 - AtRateTimeToEmpty - 98 - AverageCurrent - 99 - Maxerror - 100 - RelativeStateOfCharge - 101 - AbsoluteStateOfCharge - 102 - RemainingCapacity - 103 - FullChargeCapacity - 104 - RunTimeToEmpty - 105 - AverageTimeToEmpty - 106 - AverageTimeToFull - 107 - CycleCount - 128 - BattPackModelLevel - 129 - InternalChargeController - 130 - PrimaryBatterySupport - 131 - DesignCapacity - 132 - SpecificationInfo - 133 - ManufacturerDate - 134 - SerialNumber - 135 - iManufacturerName - 136 - iDevicename - 137 - iDeviceChemistery - 138 - iManufacturerData - 139 - Rechargeable - 140 - WarningCapacityLimit - 141 - CapacityGranularity1 - 142 - CapacityGranularity2 - 192 - InhibitCharge - 193 - EnablePolling - 194 - ResetToZero - 208 - ACPresent - 209 - BatteryPresent - 210 - PowerFail - 211 - AlarmInhibited - 212 - ThermistorUnderRange - 213 - ThermistorHot - 214 - ThermistorCold - 215 - ThermistorOverRange - 216 - VoltageOutOfRange - 217 - CurrentOutOfRange - 218 - CurrentNotRegulated - 219 - VoltageNotRegulated - 220 - MasterMode - 221 - ChargerBattery/HostControlled - 240 - ChargerSpecInfo - 241 - ChargerSpecRef - 242 - Level2 - 243 - Level3 - - - 140 - - description - Bar Code Scanner - ranges - - - usages - - - - 141 - - description - Scale Device - ranges - - - usages - - - - 144 - - description - Camera Control - ranges - - - usages - - - - 145 - - description - Arcade Device - ranges - - - usages - - 233 - Base Up - 234 - Base Down - - - - diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Resources/Info.plist b/radiant-player-mac/Frameworks/DDHidLib.framework/Resources/Info.plist deleted file mode 100644 index c0ff6501..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Resources/Info.plist +++ /dev/null @@ -1,42 +0,0 @@ - - - - - BuildMachineOSBuild - 15C50 - CFBundleDevelopmentRegion - English - CFBundleExecutable - DDHidLib - CFBundleIdentifier - org.dribin.dave.DDHidLib - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.1.1 - CFBundleSignature - ???? - CFBundleSupportedPlatforms - - MacOSX - - CFBundleVersion - 1010.9.0 - DTCompiler - com.apple.compilers.llvm.clang.1_0 - DTPlatformBuild - 7C68 - DTPlatformVersion - GM - DTSDKBuild - 15C43 - DTSDKName - macosx10.11 - DTXcode - 0720 - DTXcodeBuild - 7C68 - - diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidAppleMikey.h b/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidAppleMikey.h deleted file mode 100644 index c6bea0d3..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidAppleMikey.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2007 Dave Dribin - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#import -#import "DDHidDevice.h" - -@class DDHidElement; -@class DDHidQueue; - -@interface DDHidAppleMikey : DDHidDevice -{ - NSMutableArray * mPressElements; - - id mDelegate; -} - -+ (NSArray *) allMikeys; - -- (id) initWithDevice: (io_object_t) device error: (NSError **) error_; - -#pragma mark - -#pragma mark Elements - -- (NSArray *) pressElements; - -- (unsigned) numberOfKeys; - -- (void) addElementsToQueue: (DDHidQueue *) queue; - -#pragma mark - -#pragma mark Asynchronous Notification - -- (void) setDelegate: (id) delegate; - -- (void) addElementsToDefaultQueue; - -@end - -@interface NSObject (DDHidAppleMikeyDelegate) - -- (void) ddhidAppleMikey: (DDHidAppleMikey *) mikey - press: (unsigned) usageId - upOrDown:(BOOL)upOrDown; - -@end diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidDevice.h b/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidDevice.h deleted file mode 100644 index 40b9fdb3..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidDevice.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2007 Dave Dribin - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#import -#include -#include -#include -#include - -@class DDHidUsage; -@class DDHidElement; -@class DDHidQueue; - -@interface DDHidDevice : NSObject -{ - io_object_t mHidDevice; - IOHIDDeviceInterface122** mDeviceInterface; - - NSMutableDictionary * mProperties; - DDHidUsage * mPrimaryUsage; - NSMutableArray * mUsages; - NSArray * mElements; - NSMutableDictionary * mElementsByCookie; - BOOL mListenInExclusiveMode; - DDHidQueue * mDefaultQueue; - int mTag; - int mLogicalDeviceNumber; -} - -- (id) initWithDevice: (io_object_t) device error: (NSError **) error; -- (id) initLogicalWithDevice: (io_object_t) device - logicalDeviceNumber: (int) logicalDeviceNumber - error: (NSError **) error; -- (int) logicalDeviceCount; - -#pragma mark - -#pragma mark Finding Devices - -+ (NSArray *) allDevices; - -+ (NSArray *) allDevicesMatchingUsagePage: (unsigned) usagePage - usageId: (unsigned) usageId - withClass: (Class) hidClass - skipZeroLocations: (BOOL) emptyLocation; - -+ (NSArray *) allDevicesMatchingCFDictionary: (CFDictionaryRef) matchDictionary - withClass: (Class) hidClass - skipZeroLocations: (BOOL) emptyLocation; - -#pragma mark - -#pragma mark I/O Kit Objects - -- (io_object_t) ioDevice; -- (IOHIDDeviceInterface122**) deviceInterface; - -#pragma mark - -#pragma mark Operations - -- (void) open; -- (void) openWithOptions: (UInt32) options; -- (void) close; -- (DDHidQueue *) createQueueWithSize: (unsigned) size; -- (long) getElementValue: (DDHidElement *) element; - -#pragma mark - -#pragma mark Asynchronous Notification - -- (BOOL) listenInExclusiveMode; -- (void) setListenInExclusiveMode: (BOOL) flag; - -- (void) startListening; - -- (void) stopListening; - -- (BOOL) isListening; - -#pragma mark - -#pragma mark Properties - -- (NSDictionary *) properties; - -- (NSArray *) elements; -- (DDHidElement *) elementForCookie: (IOHIDElementCookie) cookie; - -- (NSString *) productName; -- (NSString *) manufacturer; -- (NSString *) serialNumber; -- (NSString *) transport; -- (long) vendorId; -- (long) productId; -- (long) version; -- (long) locationId; -- (long) usagePage; -- (long) usage; -- (DDHidUsage *) primaryUsage; -- (NSArray *) usages; - -- (NSComparisonResult) compareByLocationId: (DDHidDevice *) device; - -- (int) tag; -- (void) setTag: (int) theTag; - -@end - -@interface DDHidDevice (Protected) - -- (unsigned) sizeOfDefaultQueue; -- (void) addElementsToDefaultQueue; - -@end diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidElement.h b/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidElement.h deleted file mode 100644 index 4e9577cd..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidElement.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2007 Dave Dribin - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#import -#include - -@class DDHidUsage; - -@interface DDHidElement : NSObject -{ - NSDictionary * mProperties; - DDHidUsage * mUsage; - NSArray * mElements; -} - -+ (NSArray *) elementsWithPropertiesArray: (NSArray *) propertiesArray; - -+ (DDHidElement *) elementWithProperties: (NSDictionary *) properties; - -- (id) initWithProperties: (NSDictionary *) properties; - -- (NSDictionary *) properties; - -- (NSString *) stringForKey: (NSString *) key; - -- (NSString *) description; - -- (IOHIDElementCookie) cookie; -- (unsigned) cookieAsUnsigned; - -- (NSArray *) elements; -- (DDHidUsage *) usage; -- (NSString *) name; -- (BOOL) hasNullState; -- (BOOL) hasPreferredState; -- (BOOL) isArray; -- (BOOL) isRelative; -- (BOOL) isWrapping; -- (long) maxValue; -- (long) minValue; - -- (NSComparisonResult) compareByUsage: (DDHidElement *) device; - -@end diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidJoystick.h b/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidJoystick.h deleted file mode 100644 index ebf20ccb..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidJoystick.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2007 Dave Dribin - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#import -#import "DDHidDevice.h" - -@class DDHidElement; -@class DDHidQueue; - -@interface DDHidJoystickStick : NSObject -{ - DDHidElement * mXAxisElement; - DDHidElement * mYAxisElement; - NSMutableArray * mStickElements; - // Point of view elements (i.e. hat switches) - NSMutableArray * mPovElements; -} - -- (DDHidElement *) xAxisElement; - -- (DDHidElement *) yAxisElement; - -#pragma mark - -#pragma mark StickElements - indexed accessors - -- (unsigned int) countOfStickElements; -- (DDHidElement *) objectInStickElementsAtIndex: (unsigned int)index; - -#pragma mark - -#pragma mark PovElements - indexed accessors - -- (unsigned int) countOfPovElements; -- (DDHidElement *) objectInPovElementsAtIndex: (unsigned int)index; - -- (NSArray *) allElements; - -- (BOOL) addElement: (DDHidElement *) element; - -@end - -@interface DDHidJoystick : DDHidDevice -{ - NSMutableArray * mSticks; - NSMutableArray * mButtonElements; - NSMutableArray * mLogicalDeviceElements; - - id mDelegate; -} - -+ (NSArray *) allJoysticks; - -- (id) initLogicalWithDevice: (io_object_t) device - logicalDeviceNumber: (int) logicalDeviceNumber - error: (NSError **) error; - -- (int) logicalDeviceCount; - -#pragma mark - -#pragma mark Joystick Elements - -- (unsigned) numberOfButtons; - -- (NSArray *) buttonElements; - -#pragma mark - -#pragma mark Sticks - indexed accessors - -- (unsigned int) countOfSticks; -- (DDHidJoystickStick *) objectInSticksAtIndex: (unsigned int)index; - -- (void) addElementsToQueue: (DDHidQueue *) queue; - -#pragma mark - -#pragma mark Asynchronous Notification - -- (void) setDelegate: (id) delegate; - -- (void) addElementsToDefaultQueue; - -@end - -#define DDHID_JOYSTICK_VALUE_MIN -65536 -#define DDHID_JOYSTICK_VALUE_MAX 65536 - -@interface NSObject (DDHidJoystickDelegate) - -- (void) ddhidJoystick: (DDHidJoystick *) joystick - stick: (unsigned) stick - xChanged: (int) value; - -- (void) ddhidJoystick: (DDHidJoystick *) joystick - stick: (unsigned) stick - yChanged: (int) value; - -- (void) ddhidJoystick: (DDHidJoystick *) joystick - stick: (unsigned) stick - otherAxis: (unsigned) otherAxis - valueChanged: (int) value; - -- (void) ddhidJoystick: (DDHidJoystick *) joystick - stick: (unsigned) stick - povNumber: (unsigned) povNumber - valueChanged: (int) value; - -- (void) ddhidJoystick: (DDHidJoystick *) joystick - buttonDown: (unsigned) buttonNumber; - -- (void) ddhidJoystick: (DDHidJoystick *) joystick - buttonUp: (unsigned) buttonNumber; - -@end diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidKeyboard.h b/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidKeyboard.h deleted file mode 100644 index fd9200d2..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidKeyboard.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2007 Dave Dribin - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#import -#import "DDHidDevice.h" - -@class DDHidElement; -@class DDHidQueue; - -@interface DDHidKeyboard : DDHidDevice -{ - NSMutableArray * mKeyElements; - - id mDelegate; -} - -+ (NSArray *) allKeyboards; - -- (id) initWithDevice: (io_object_t) device error: (NSError **) error_; - -#pragma mark - -#pragma mark Keyboards Elements - -- (NSArray *) keyElements; - -- (unsigned) numberOfKeys; - -- (void) addElementsToQueue: (DDHidQueue *) queue; - -#pragma mark - -#pragma mark Asynchronous Notification - -- (void) setDelegate: (id) delegate; - -- (void) addElementsToDefaultQueue; - -@end - -@interface NSObject (DDHidKeyboardDelegate) - -- (void) ddhidKeyboard: (DDHidKeyboard *) keyboard - keyDown: (unsigned) usageId; - -- (void) ddhidKeyboard: (DDHidKeyboard *) keyboard - keyUp: (unsigned) usageId; - -@end diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidKeyboardBarcodeScanner.h b/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidKeyboardBarcodeScanner.h deleted file mode 100644 index 6573b016..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidKeyboardBarcodeScanner.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2007 Dave Dribin, Lucas Newman - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#import -#import "DDHidDevice.h" - -@class DDHidElement; -@class DDHidQueue; - -@interface DDHidKeyboardBarcodeScanner : DDHidDevice -{ - NSMutableArray * mKeyElements; - - NSMutableString * mAccumulatedDigits; - NSTimer *mBarcodeInputTimer; - BOOL mIsLikelyKeyboardBarcodeScanner; - - id mDelegate; -} - -+ (NSArray *) allPossibleKeyboardBarcodeScanners; - -- (id) initWithDevice: (io_object_t) device error: (NSError **) error_; - -#pragma mark - -#pragma mark Keyboard Elements - -- (NSArray *) keyElements; - -- (NSUInteger) numberOfKeys; - -- (void) addElementsToQueue: (DDHidQueue *) queue; - -#pragma mark - -#pragma mark Asynchronous Notification - -- (void) setDelegate: (id) delegate; - -- (void) addElementsToDefaultQueue; - -#pragma mark - -#pragma mark Properties - -- (BOOL) isLikelyKeyboardBarcodeScanner; - -@end - -@interface NSObject (DDHidKeyboardBarcodeScannerDelegate) - -- (void) ddhidKeyboardBarcodeScanner: (DDHidKeyboardBarcodeScanner *) keyboardBarcodeScanner - gotBarcode: (NSString *) barcode; - -@end diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidLib b/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidLib deleted file mode 100755 index 1257681a..00000000 Binary files a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidLib and /dev/null differ diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidLib.h b/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidLib.h deleted file mode 100644 index 20d86817..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidLib.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2007 Dave Dribin - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#import "DDHidDevice.h" -#import "DDHidElement.h" -#import "DDHidUsage.h" -#import "DDHidQueue.h" -#import "DDHidEvent.h" -#import "DDHidUsageTables.h" -#import "DDHidMouse.h" -#import "DDHidJoystick.h" -#import "DDHidKeyboard.h" -#import "DDHidAppleRemote.h" -#import "DDHidAppleMikey.h" -#import "DDHidKeyboardBarcodeScanner.h" diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidMouse.h b/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidMouse.h deleted file mode 100644 index d396aba0..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidMouse.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2007 Dave Dribin - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#import -#import "DDHidDevice.h" - -@class DDHidElement; -@class DDHidQueue; - -@interface DDHidMouse : DDHidDevice -{ - DDHidElement * mXElement; - DDHidElement * mYElement; - DDHidElement * mWheelElement; - NSMutableArray * mButtonElements; - - id mDelegate; -} - -+ (NSArray *) allMice; - -- (id) initWithDevice: (io_object_t) device error: (NSError **) error_; - -#pragma mark - -#pragma mark Mouse Elements - -- (DDHidElement *) xElement; - -- (DDHidElement *) yElement; - -- (DDHidElement *) wheelElement; - -- (NSArray *) buttonElements; - -- (unsigned) numberOfButtons; - -- (void) addElementsToQueue: (DDHidQueue *) queue; - -#pragma mark - -#pragma mark Asynchronous Notification - -- (void) setDelegate: (id) delegate; - -- (void) addElementsToDefaultQueue; - -@end - -@interface NSObject (DDHidMouseDelegate) - -- (void) ddhidMouse: (DDHidMouse *) mouse xChanged: (SInt32) deltaX; -- (void) ddhidMouse: (DDHidMouse *) mouse yChanged: (SInt32) deltaY; -- (void) ddhidMouse: (DDHidMouse *) mouse wheelChanged: (SInt32) deltaWheel; -- (void) ddhidMouse: (DDHidMouse *) mouse buttonDown: (unsigned) buttonNumber; -- (void) ddhidMouse: (DDHidMouse *) mouse buttonUp: (unsigned) buttonNumber; - -@end - diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidQueue.h b/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidQueue.h deleted file mode 100644 index 315d0031..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidQueue.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2007 Dave Dribin - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#import -#include - -@class DDHidElement; -@class DDHidEvent; - -@interface DDHidQueue : NSObject -{ - IOHIDQueueInterface ** mQueue; - NSRunLoop * mRunLoop; - BOOL mStarted; - - id mDelegate; - CFRunLoopSourceRef mEventSource; -} - -- (id) initWithHIDQueue: (IOHIDQueueInterface **) queue - size: (unsigned) size; - -- (void) addElement: (DDHidElement *) element; - -- (void) addElements: (NSArray *) elements; - -- (void) addElements: (NSArray *) elements recursively: (BOOL) recursively; - -- (void) setDelegate: (id) delegate; - -- (void) startOnCurrentRunLoop; - -- (void) startOnRunLoop: (NSRunLoop *) runLoop; - -- (void) stop; - -- (BOOL) isStarted; - -- (BOOL) getNextEvent: (IOHIDEventStruct *) event; - -- (DDHidEvent *) nextEvent; - -@end - -@interface NSObject (DDHidQueueDelegate) - -- (void) ddhidQueueHasEvents: (DDHidQueue *) hidQueue; - -@end diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidUsageTables.h b/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidUsageTables.h deleted file mode 100644 index be8d46ed..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/DDHidUsageTables.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2007 Dave Dribin - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, copy, - * modify, merge, publish, distribute, sublicense, and/or sell copies - * of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#import - - -@interface DDHidUsageTables : NSObject -{ - NSDictionary * mLookupTables; -} - -+ (DDHidUsageTables *) standardUsageTables; - -- (id) initWithLookupTables: (NSDictionary *) lookupTables; - -- (NSString *) descriptionForUsagePage: (unsigned) usagePage - usage: (unsigned) usage; - -@end diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/Resources/DDHidStandardUsages.plist b/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/Resources/DDHidStandardUsages.plist deleted file mode 100644 index 84eb663f..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/Resources/DDHidStandardUsages.plist +++ /dev/null @@ -1,2327 +0,0 @@ - - - - - 1 - - description - Generic Desktop - ranges - - - usages - - 0 - Undefined - 1 - Pointer - 2 - Mouse - 3 - Reserved - 4 - Joystick - 5 - Game Pad - 6 - Keyboard - 7 - Keypad - 8 - Multi-axis Controller - 48 - X - 49 - Y - 50 - Z - 51 - Rx - 52 - Ry - 53 - Rz - 54 - Slider - 55 - Dial - 56 - Wheel - 57 - Hat Switch - 58 - Counted Buffer - 59 - Byte Count - 60 - Motion Wakeup - 64 - Vx - 65 - Vy - 66 - Vz - 67 - Vbrx - 68 - Vbry - 69 - Vbrx - 70 - Vno - 128 - System Control - 129 - System Power Down - 130 - System Sleep - 131 - System Wake Up - 132 - System Context Menu - 133 - System Main Menu - 134 - System App Menu - 135 - System Menu Help - 136 - System Menu Exit - 137 - System Menu Select - 138 - System Menu Right - 139 - System Menu Left - 140 - System Menu Up - 141 - System Menu Down - 144 - D-pad Up - 145 - D-pad Down - 146 - D-pad Right - 147 - D-pad Left - - - 2 - - description - Simulation Controls - ranges - - - usages - - 0 - Undefined - 1 - Flight Simulation Device - 2 - Automobile Simulation Device - 3 - Tank Simulation Device - 4 - Spaceship Simulation Device - 5 - Submarine Simulation Device - 6 - Sailing Simulation Device - 7 - Motorcycle Simulation Device - 8 - Sports Simulation Device - 9 - Airplane Simulation Device - 10 - Helicopter Simulation Device - 11 - Magic Carpet Simulation Device - 12 - Bicycle - 32 - Flight Control Stick - 33 - Flight Stick - 34 - Cyclic Control - 35 - Cyclic Trim - 36 - Flight Yoke - 37 - Track Control - 38 - Driving Control - 176 - Aileron - 177 - Aileron Trim - 178 - Anti-Torque Control - 179 - Auto-pilot Enable - 180 - Chaff Release - 181 - Collective Control - 182 - Dive Brake - 183 - Electronic Counter Measures - 184 - Elevator - 185 - Elevator Trim - 186 - Rudder - 187 - Throttle - 188 - Flight Communication - 189 - Flare Release - 190 - Landing Gear - 191 - Toe Brake - 192 - Trigger - 193 - Weapons Arm - 194 - Weapons Select - 195 - Wing Flaps - 196 - Accelerator - 197 - Brake - 198 - Clutch - 199 - Shifter - 200 - Steering - 201 - Turret Direction - 202 - Barrel Elevation - 203 - Dive Plane - 204 - Ballast - 205 - Bicycle Crank - 206 - Handle Bars - 207 - Front Brake - 208 - Rear Brake - - - 3 - - description - VR Controls - ranges - - - usages - - 0 - Unidentified - 1 - Belt - 2 - Body Suit - 3 - Flexor - 4 - Glove - 5 - Head Tracker - 6 - Head Mounted Display - 7 - Hand Tracker - 8 - Oculometer - 9 - Vest - 10 - Animatronic Device - 32 - Stereo Enable - 33 - Display Enable - - - 4 - - description - Sports Controls - ranges - - - usages - - 0 - Unidentified - 1 - Baseball Bat - 2 - Golf Club - 3 - Rowing Machine - 4 - Treadmill - 48 - Oar - 49 - Slope - 50 - Rate - 51 - Stick Speed - 52 - Stick Face Angle - 53 - Stick Heel/Toe - 54 - Stick Follow Through - 55 - Stick Tempo - 56 - Stick Type - 57 - Stick Height - 80 - Putter - 81 - 1 Iron - 82 - 2 Iron - 83 - 3 Iron - 84 - 4 Iron - 85 - 5 Iron - 86 - 6 Iron - 87 - 7 Iron - 88 - 8 Iron - 89 - 9 Iron - 90 - 10 Iron - 91 - 11 Iron - 92 - Sand Wedge - 93 - Loft Wedge - 94 - Power Wedge - 95 - 1 Wood - 96 - 3 Wood - 97 - 5 Wood - 98 - 7 Wood - 99 - 9 Wood - - - 5 - - description - Game Controls - ranges - - - usages - - 0 - Undefined - 1 - 3D Game Controller - 2 - Pinball Device - 3 - Gun Device - 32 - Point of View - 33 - Turn Right/Left - 34 - Pitch Right/Left - 35 - Roll Forward/Backward - 36 - Move Right/Left - 37 - Move Forward/Backward - 38 - Move Up/Down - 39 - Lean Right/Left - 40 - Lean Forward/Backward - 41 - Height of POV - 42 - Flipper - 43 - Secondary Flipper - 44 - Bump - 45 - New Game - 46 - Shoot Ball - 47 - Player - 48 - Gun Bolt - 49 - Gun Clip - 50 - Gun Selector - 51 - Gun Single Shot - 52 - Gun Burst - 53 - Gun Automatic - 54 - Gun Safety - 55 - Gamepad Fire/Jump - 57 - Gamepad Trigger - - - 7 - - description - Keyboard - ranges - - - usages - - 0 - No Event - 1 - Keyboard ErrorRollOver - 2 - Keyboard POSTFail - 3 - Keyboard ErrorUndefined - 4 - Keyboard a and A - 5 - Keyboard b and B - 6 - Keyboard c and C - 7 - Keyboard d and D - 8 - Keyboard e and E - 9 - Keyboard f and F - 10 - Keyboard g and G - 11 - Keyboard h and H - 12 - Keyboard i and I - 13 - Keyboard j and J - 14 - Keyboard k and K - 15 - Keyboard l and L - 16 - Keyboard m and M - 17 - Keyboard n and N - 18 - Keyboard o and O - 19 - Keyboard p and P - 20 - Keyboard q and Q - 21 - Keyboard r and R - 22 - Keyboard s and S - 23 - Keyboard t and T - 24 - Keyboard u and U - 25 - Keyboard v and V - 26 - Keyboard w and W - 27 - Keyboard x and X - 28 - Keyboard y and Y - 29 - Keyboard z and Z - 30 - Keyboard 1 and ! - 31 - Keyboard 2 and @ - 32 - Keyboard 3 and # - 33 - Keyboard 4 and $ - 34 - Keyboard 5 and % - 35 - Keyboard 6 and ^ - 36 - Keyboard 7 and & - 37 - Keyboard 8 and * - 38 - Keyboard 9 and ( - 39 - Keyboard 0 and ) - 40 - Keyboard Return (ENTER) - 41 - Keyboard ESCAPE - 42 - Keyboard DELETE (Backspace) - 43 - Keyboard Tab - 44 - Keyboard Spacebar - 45 - Keyboard - and (underscore) - 46 - Keyboard = and + - 47 - Keyboard [ and { - 48 - Keyboard ] and } - 49 - Keyboard \ and | - 50 - Keyboard Non-US # and ~ - 51 - Keyboard ; and : - 52 - Keyboard ' and " - 53 - Keyboard Grave Accent and Tilde - 54 - Keyboard, and < - 55 - Keyboard . and > - 56 - Keyboard / and ? - 57 - Keyboard Caps Lock - 58 - Keyboard F1 - 59 - Keyboard F2 - 60 - Keyboard F3 - 61 - Keyboard F4 - 62 - Keyboard F5 - 63 - Keyboard F6 - 64 - Keyboard F7 - 65 - Keyboard F8 - 66 - Keyboard F9 - 67 - Keyboard F10 - 68 - Keyboard F11 - 69 - Keyboard F12 - 70 - Keyboard PrintScreen - 71 - Keyboard Scroll Lock - 72 - Keyboard Pause - 73 - Keyboard Insert - 74 - Keyboard Home - 75 - Keyboard PageUp - 76 - Keyboard Delete Forward - 77 - Keyboard End - 78 - Keyboard PageDown - 79 - Keyboard RightArrow - 80 - Keyboard LeftArrow - 81 - Keyboard DownArrow - 82 - Keyboard UpArrow - 83 - Keypad Num Lock and Clear - 84 - Keypad / - 85 - Keypad * - 86 - Keypad - - 87 - Keypad + - 88 - Keypad ENTER - 89 - Keypad 1 and End - 90 - Keypad 2 and Down Arrow - 91 - Keypad 3 and PageDn - 92 - Keypad 4 and Left Arrow - 93 - Keypad 5 - 94 - Keypad 6 and Right Arrow - 95 - Keypad 7 and Home - 96 - Keypad 8 and Up Arrow - 97 - Keypad 9 and PageUp - 98 - Keypad 0 and Insert - 99 - Keypad . and Delete - 100 - Keyboard Non-US \ and | - 101 - Keyboard Application - 102 - Keyboard Power - 103 - Keypad = - 104 - Keyboard F13 - 105 - Keyboard F14 - 106 - Keyboard F15 - 107 - Keyboard F16 - 108 - Keyboard F17 - 109 - Keyboard F18 - 110 - Keyboard F19 - 111 - Keyboard F20 - 112 - Keyboard F21 - 113 - Keyboard F22 - 114 - Keyboard F23 - 115 - Keyboard F24 - 116 - Keyboard Execute - 117 - Keyboard Help - 118 - Keyboard Menu - 119 - Keyboard Select - 120 - Keyboard Stop - 121 - Keyboard Again - 122 - Keyboard Undo - 123 - Keyboard Cut - 124 - Keyboard Copy - 125 - Keyboard Paste - 126 - Keyboard Find - 127 - Keyboard Mute - 128 - Keyboard Volume Up - 129 - Keyboard Volume Down - 130 - Keyboard Locking Caps Lock - 131 - Keyboard Locking Num Lock - 132 - Keyboard Locking Scroll Lock - 133 - Keypad Comma - 134 - Keypad Equal Sign - 135 - Keyboard International1 - 136 - Keyboard International2 - 137 - Keyboard International3 - 138 - Keyboard International4 - 139 - Keyboard International5 - 140 - Keyboard International6 - 141 - Keyboard International7 - 142 - Keyboard International8 - 143 - Keyboard International9 - 144 - Keyboard LANG1 - 145 - Keyboard LANG2 - 146 - Keyboard LANG3 - 147 - Keyboard LANG4 - 148 - Keyboard LANG5 - 149 - Keyboard LANG6 - 150 - Keyboard LANG7 - 151 - Keyboard LANG8 - 152 - Keyboard LANG9 - 153 - Keyboard Alternate Erase - 154 - Keyboard SysReq/Attention - 155 - Keyboard Cancel - 156 - Keyboard Clear - 157 - Keyboard Prior - 158 - Keyboard Return - 159 - Keyboard Separator - 160 - Keyboard Out - 161 - Keyboard Oper - 162 - Keyboard Clear/Again - 163 - Keyboard CrSel/Props - 164 - Keyboard ExSel - 224 - Keyboard LeftControl - 225 - Keyboard LeftShift - 226 - Keyboard LeftAlt - 227 - Keyboard Left GUI - 228 - Keyboard RightControl - 229 - Keyboard RightShift - 230 - Keyboard RightAlt - 231 - Keyboard Right GUI - - - 8 - - description - LEDs - ranges - - {76, 65535} - Reserved - - usages - - 0 - Undefined - 1 - Num Lock - 2 - Caps Lock - 3 - Scroll Lock - 4 - Compose - 5 - Kana - 6 - Power - 7 - Shift - 8 - Do Not Disturb - 9 - Mute - 10 - Tone Enable - 11 - High Cut Filter - 12 - Low Cut Filter - 13 - Equalizer Enable - 14 - Sound Field On - 15 - Surround Field On - 16 - Repeat - 17 - Stereo - 18 - Sampling Rate Detect - 19 - Spinning - 20 - CAV - 21 - CLV - 22 - Recording Format Detect - 23 - Off-Hook - 24 - Ring - 25 - Message Waiting - 26 - Data Mode - 27 - Battery Operation - 28 - Battery OK - 29 - Battery Low - 30 - Speaker - 31 - Head Set - 32 - Hold - 33 - Microphone - 34 - Coverage - 35 - Night Mode - 36 - Send Calls - 37 - Call Pickup - 38 - Conference - 39 - Stand-by - 40 - Camera On - 41 - Camera Off - 42 - On-Line - 43 - Off-Line - 44 - Busy - 45 - Ready - 46 - Paper-Out - 47 - Paper-Jam - 48 - Remote - 49 - Forward - 50 - Reverse - 51 - Stop - 52 - Rewind - 53 - Fast Forward - 54 - Play - 55 - Pause - 56 - Record - 57 - Error - 58 - Usage Selected Indicator - 59 - Usage In Use Indicator - 60 - Usage Multi Mode Indicator - 61 - Indicator On - 62 - Indicator Flash - 63 - Indicator Slow Blink - 64 - Indicator Fast Blink - 65 - Indicator Off - 66 - Flash On Time - 67 - Slow Blink On Time - 68 - Slow Blink Off Time - 69 - Fast Blink On Time - 70 - Fast Blink Off Time - 71 - Usage Indicator Color - 72 - Red - 73 - Green - 74 - Amber - 75 - Generic Indicator - 76 - System Suspend - 77 - External Power Connected - - - 9 - - default - Button %d - description - Button - ranges - - - usages - - 0 - No Button Pressed - - - 10 - - default - Instance %d - description - Ordinal - ranges - - - usages - - 0 - Unused - - - 11 - - description - Telephony - ranges - - - usages - - 0 - Unassigned - 1 - Phone - 2 - Answering Machine - 3 - Message Controls - 4 - Handset - 5 - Headset - 6 - Telephony Key Pad - 7 - Programmable Button - 32 - Hook Switch - 33 - Flash - 34 - Feature - 35 - Hold - 36 - Redial - 37 - Transfer - 38 - Drop - 39 - Park - 40 - Forward Calls - 41 - Alternate Function - 42 - Line - 43 - Speaker Phone - 44 - Conference - 45 - Ring Enable - 46 - Ring Select - 47 - Phone Mute - 48 - Caller ID - 80 - Speed Dial - 81 - Store Number - 82 - Recall Number - 83 - Phone Directory - 112 - Voice Mail - 113 - Screen Calls - 114 - Do Not Disturb - 115 - Message - 116 - Answer On/Off - 144 - Inside Dial Tone - 145 - Outside Dial Tone - 146 - Inside Ring Tone - 147 - Outside Ring Tone - 148 - Priority Ring Tone - 149 - Inside Ringback - 150 - Priority Ringback - 151 - Line Busy Tone - 152 - Reorder Tone - 153 - Call Waiting Tone - 154 - Confirmation Tone 1 - 155 - Confirmation Tone 2 - 156 - Tones Off - 176 - Phone Key 0 - 177 - Phone Key 1 - 178 - Phone Key 2 - 179 - Phone Key 3 - 180 - Phone Key 4 - 181 - Phone Key 5 - 182 - Phone Key 6 - 183 - Phone Key 7 - 184 - Phone Key 8 - 185 - Phone Key 9 - 186 - Phone Key Star - 187 - Phone Key Pound - 188 - Phone Key A - 189 - Phone Key B - 190 - Phone Key C - 191 - Phone Key D - - - 12 - - description - Consumer - ranges - - - usages - - 0 - Unassigned - 1 - Consumer Control - 2 - Numeric Key Pad - 3 - Programmable Buttons - 32 - +10 - 33 - +100 - 34 - AM/PM - 48 - Power - 49 - Reset - 50 - Sleep - 51 - Sleep After - 52 - Sleep Mode - 53 - Illumination - 54 - Function Buttons - 64 - Menu - 65 - Menu Pick - 66 - Menu Up - 67 - Menu Down - 68 - Menu Left - 69 - Menu Right - 70 - Menu Escape - 71 - Menu Value Increase - 72 - Menu Value Decrease - 96 - Data On Screen - 97 - Closed Caption - 98 - Closed Caption Select - 99 - VCR/TV - 100 - Broadcast Mode - 101 - Snapshot - 102 - Still - 128 - Selection - 129 - Assign Selection - 130 - Mode Step - 131 - Recall Last - 132 - Enter Channel - 133 - Order Movie - 134 - Channel - 135 - Media Selection - 136 - Media Select Computer - 137 - Media Select TV - 138 - Media Select WWW - 139 - Media Select DVD - 140 - Media Select Telephone - 141 - Media Select Program Guide - 142 - Media Select Video Phone - 143 - Media Select Games - 144 - Media Select Messages - 145 - Media Select CD - 146 - Media Select VCR - 147 - Media Select Tuner - 148 - Quit - 149 - Help - 150 - Media Select Tape - 151 - Media Select Cable - 152 - Media Select Satellite - 153 - Media Select Security - 154 - Media Select Home - 155 - Media Select Call - 156 - Channel Increment - 157 - Channel Decrement - 158 - Media Select SAP - 160 - VCR Plus - 161 - Once - 162 - Daily - 163 - Weekly - 164 - Monthly - 176 - Play - 177 - Pause - 178 - Record - 179 - Fast Forward - 180 - Rewind - 181 - Scan Next Track - 182 - Scan Previous Track - 183 - Stop - 184 - Eject - 185 - Random Play - 186 - Select DisC - 187 - Enter Disc - 188 - Repeat - 189 - Tracking - 190 - Track Normal - 191 - Slow Tracking - 192 - Frame Forward - 193 - Frame Back - 194 - Mark - 195 - Clear Mark - 196 - Repeat From Mark - 197 - Return To Mark - 198 - Search Mark Forward - 199 - Search Mark Backwards - 200 - Counter Reset - 201 - Show Counter - 202 - Tracking Increment - 203 - Tracking Decrement - 205 - Pause/Play - 224 - Volume - 225 - Balance - 226 - Mute - 227 - Bass - 228 - Treble - 229 - Bass Boost - 230 - Surround Mode - 231 - Loudness - 232 - MPX - 233 - Volume Up - 234 - Volume Down - 240 - Speed Select - 241 - Playback Speed - 242 - Standard Play - 243 - Long Play - 244 - Extended Play - 245 - Slow - 256 - Fan Enable - 257 - Fan Speed - 258 - Light - 259 - Light Illumination Level - 260 - Climate Control Enable - 261 - Room Temperature - 262 - Security Enable - 263 - Fire Alarm - 264 - Police Alarm - 336 - Balance Right - 337 - Balance Left - 338 - Bass Increment - 339 - Bass Decrement - 340 - Treble Increment - 341 - Treble Decrement - 352 - Speaker System - 353 - Channel Left - 354 - Channel Right - 355 - Channel Center - 356 - Channel Front - 357 - Channel Center Front - 358 - Channel Side - 359 - Channel Surround - 360 - Channel Low Frequency Enhancement - 361 - Channel Top - 362 - Channel Unknown - 368 - Sub-channel - 369 - Sub-channel Increment - 370 - Sub-channel Decrement - 371 - Alternate Audio Increment - 372 - Alternate Audio Decrement - 384 - Application Launch Buttons - 385 - AL Launch Button Configuration Tool - 386 - AL Programmable Button Configuration - 387 - AL Consumer Control Configuration - 388 - AL Word Processor - 389 - AL Text Editor - 390 - AL Spreadsheet - 391 - AL Graphics Editor - 392 - AL Presentation App - 393 - AL Database App - 394 - AL Email Reader - 395 - AL Newsreader - 396 - AL Voicemail - 397 - AL Contacts/Address Book - 398 - AL Calendar/Schedule - 399 - AL Task/Project Manager - 400 - AL Log/Journal/Timecard - 401 - AL Checkbook/Finance - 402 - AL Calculator - 403 - AL A/V Capture/Playback - 404 - AL Local Machine Browser - 405 - AL LAN/WAN Browser - 406 - AL Internet Browser - 407 - AL Remote Networking/ISP Connect - 408 - AL Network Conference - 409 - AL Network Chat - 410 - AL Telephony/Dialer - 411 - AL Logon - 412 - AL Logoff - 413 - AL Logon/Logoff - 414 - AL Terminal Lock/Screensaver - 415 - AL Control Panel - 416 - AL Command Line Processor/Run - 417 - AL Process/Task Manager - 418 - AL Select Tast/Application - 419 - AL Next Task/Application - 420 - AL Previous Task/Application - 421 - AL Preemptive Halt Task/Application - 423 - AL My Documents - 427 - AC Spell - 438 - AL My Pictures - 439 - AL My Music - 512 - Generic GUI Application Controls - 513 - AC New - 514 - AC Open - 515 - AC Close - 516 - AC Exit - 517 - AC Maximize - 518 - AC Minimize - 519 - AC Save - 520 - AC Print - 521 - AC Properties - 538 - AC Undo - 539 - AC Copy - 540 - AC Cut - 541 - AC Paste - 542 - AC Select All - 543 - AC Find - 544 - AC Find and Replace - 545 - AC Search - 546 - AC Go To - 547 - AC Home - 548 - AC Back - 549 - AC Forward - 550 - AC Stop - 551 - AC Refresh - 552 - AC Previous Link - 553 - AC Next Link - 554 - AC Bookmarks - 555 - AC History - 556 - AC Subscriptions - 557 - AC Zoom In - 558 - AC Zoom Out - 559 - AC Zoom - 560 - AC Full Screen View - 561 - AC Normal View - 562 - AC View Toggle - 563 - AC Scroll Up - 564 - AC Scroll Down - 565 - AC Scroll - 566 - AC Pan Left - 567 - AC Pan Right - 568 - AC Pan - 569 - AC New Window - 570 - AC Tile Horizontally - 571 - AC Tile Vertically - 572 - AC Format - 633 - AC Redo - 649 - AC Reply - 651 - AC Fwd - 652 - AC Send - - - 13 - - description - Digitizer - ranges - - - usages - - 0 - Undefined - 1 - Digitizer - 2 - Pen - 3 - Light Pen - 4 - Touch Screen - 5 - Touch Pad - 6 - White Board - 7 - Coordinate Measuring Machine - 8 - 3-D Digitizer - 9 - Stereo Plotter - 10 - Articulated Arm - 11 - Armature - 12 - Multiple Point Digitizer - 13 - Free Space Wand - 32 - Stylus - 33 - Puck - 34 - Finger - 48 - Tip Pressure - 49 - Barrel Pressure - 50 - In Range - 51 - Touch - 52 - Untouch - 53 - Tap - 54 - Quality - 55 - Data Valid - 56 - Transducer Index - 57 - Tablet Function Keys - 58 - Program Change Keys - 59 - Battery Strength - 60 - Invert - 61 - X Tilt - 62 - Y Tilt - 63 - Azimuth - 64 - Altitude - 65 - Twist - 66 - Tip Switch - 67 - Secondary Tip Switch - 68 - Barrel Switch - 69 - Eraser - 70 - Tablet Pick - - - 15 - - description - Physical Interface Device - ranges - - - usages - - - - 16 - - default - Unicode Char u%04x - description - Unicode - ranges - - - usages - - - - 20 - - description - Alphnumeric Display - ranges - - - usages - - 0 - Undefined - 1 - Alphanumeric Display - 32 - Display Attributes Report - 33 - ASCII Character Set - 34 - Data Read Back - 35 - Font Read Back - 36 - Display Control Report - 37 - Clear Display - 38 - Display Enable - 39 - Screen Saver Delay - 40 - Screen Saver Enable - 41 - Vertical Scroll - 42 - Horizontal Scroll - 43 - Character Report - 44 - Display Data - 45 - Display Status - 46 - Stat Not Ready - 47 - Stat Ready - 48 - Err Not a loadable character - 49 - Err Font data cannot be read - 50 - Cursor Position Report - 51 - Row - 52 - Column - 53 - Rows - 54 - Columns - 55 - Cursor Pixel Positioning - 56 - Cursor Mode - 57 - Cursor Enable - 58 - Cursor Blink - 59 - Font Report - 60 - Font Data - 61 - Character Width - 62 - Character Height - 63 - Character Spacing Horizontal - 64 - Character Spacing Vertical - 65 - Unicode Character Set - - - 128 - - description - Monitor - ranges - - - usages - - 0 - Undefined - 1 - Monitor Control - 2 - EDID Information - 3 - VDIF Information - 4 - VESA Version - 5 - On Screen Display - 6 - Auto Size Center - 7 - Polarity Horz Synch - 8 - Polarity Vert Synch - 9 - Sync Type - 10 - Screen Position - 11 - Horizontal Frequency - 12 - Vertical Frequency - - - 129 - - default - ENUM %d - description - Monitor Enumerated Values - ranges - - - usages - - 0 - unassigned - - - 130 - - description - VESA Virtual Controls - ranges - - - usages - - 16 - Brightness - 18 - Contrast - 22 - Video Gain Red - 24 - Video Gain Green - 26 - Video Gain Blue - 28 - Focus - 32 - Horizontal Position - 34 - Horizontal Size - 36 - Horizontal Pincushion - 38 - Horizontal Pincushion Balance - 40 - Horizontal Misconvergence - 42 - Horizontal Linearity - 44 - Horizontal Linearity Balance - 48 - Vertical Position - 50 - Vertical Size - 52 - Vertical Pincushion - 54 - Vertical Pincushion Balance - 56 - Vertical Misconvergence - 58 - Vertical Linearity - 60 - Vertical Linearity Balance - 64 - Parallelogram Distortion - 66 - Trapezoidal Distortion - 68 - Tilt - 70 - Top Corner Distortion Control - 72 - Top Corner Distortion Balance - 74 - Bottom Corner Distortion Control - 76 - Bottom Corner Distortion Balance - 86 - MoirHorizontal - 88 - MoirVertical - 94 - Input Level Select - 96 - Input Source Select - 98 - Stereo Mode - 108 - Video Black Level Red - 110 - Video Black Level Green - 112 - Video Black Level Blue - - - 131 - - description - VESA Command - ranges - - - usages - - 0 - Undefined - 1 - Settings - 2 - Degauss - - - 132 - - description - Power Device - ranges - - - usages - - 0 - Undefined - 1 - iName - 2 - PresentStatus - 3 - ChangedStatus - 4 - UPS - 5 - PowerSupply - 16 - BatterySystem - 17 - BatterySystemID - 18 - Battery - 19 - BatteryID - 20 - Charger - 21 - ChargerID - 22 - PowerConverter - 23 - PowerConverterID - 24 - OutletSystem - 25 - OutletSystemID - 26 - Input - 27 - InputID - 28 - Output - 29 - OutputID - 30 - Flow - 31 - FlowID - 32 - Outlet - 33 - OutletID - 34 - Gang - 35 - GangID - 36 - Sink - 37 - SinkID - 48 - Voltage - 49 - Current - 50 - Frequency - 51 - ApparentPower - 52 - ActivePower - 53 - PercentLoad - 54 - Temperature - 55 - Humidity - 64 - ConfigVoltage - 65 - ConfigCurrent - 66 - ConfigFrequency - 67 - ConfigApparentPower - 68 - ConfigActivePower - 69 - ConfigPercentLoad - 70 - ConfigTemperature - 71 - ConfigHumidity - 80 - SwitchOnControl - 81 - SwitchOffControl - 82 - ToggleControl - 83 - LowVoltageTransfer - 84 - HighVoltageTransfer - 85 - DelayBeforeReboot - 86 - DelayBeforeStartup - 87 - DelayBeforeShutdown - 88 - Test - 89 - Vendorspecificcommand - 96 - Present - 97 - Good - 98 - InternalFailure - 99 - VoltageOutOfRange - 100 - FrequencyOutOfRange - 101 - Overload - 102 - OverCharged - 103 - OverTemperature - 104 - ShutdownRequested - 105 - ShutdownImminent - 106 - VendorSpecificAnswerValid - 107 - SwitchOn/Off - 108 - Switcheble - 109 - Used - 110 - Boost - 111 - Buck - 112 - Initialized - 113 - Tested - - - 133 - - description - Battery System - ranges - - - usages - - 0 - Undefined - 1 - SMBBatteryMode - 2 - SMBBatteryStatus - 3 - SMBAlarmWarning - 4 - SMBChargerMode - 5 - SMBChargerStatus - 6 - SMBChargerSpecInfo - 7 - SMBSelectorState - 8 - SMBSelectorPreset - 9 - SMBSelectorInfo - 16 - OptionalMfgFunction1 - 17 - OptionalMfgFunction2 - 18 - OptionalMfgFunction3 - 19 - OptionalMfgFunction4 - 20 - OptionalMfgFunction5 - 21 - ConnectionToSMBus - 22 - OutputConnection - 23 - ChargerConnection - 24 - BatteryInsertion - 25 - Usenext - 26 - OKToUse - 40 - ManufacturerAccess - 41 - RemainingCapacityLimit - 42 - RemainingTimeLimit - 43 - AtRate - 44 - CapacityMode - 45 - BroadcastToCharger - 46 - PrimaryBattery - 47 - ChargeController - 64 - TerminateCharge - 65 - TermminateDischarge - 66 - BelowRemainingCapacityLimit - 67 - RemainingTimeLimitExpired - 68 - Charging - 69 - Discharging - 70 - FullyCharged - 71 - FullyDischarged - 72 - ConditionningFlag - 73 - AtRateOK - 74 - SMBErrorCode - 75 - NeedReplacement - 96 - AtRateTimeToFull - 97 - AtRateTimeToEmpty - 98 - AverageCurrent - 99 - Maxerror - 100 - RelativeStateOfCharge - 101 - AbsoluteStateOfCharge - 102 - RemainingCapacity - 103 - FullChargeCapacity - 104 - RunTimeToEmpty - 105 - AverageTimeToEmpty - 106 - AverageTimeToFull - 107 - CycleCount - 128 - BattPackModelLevel - 129 - InternalChargeController - 130 - PrimaryBatterySupport - 131 - DesignCapacity - 132 - SpecificationInfo - 133 - ManufacturerDate - 134 - SerialNumber - 135 - iManufacturerName - 136 - iDevicename - 137 - iDeviceChemistery - 138 - iManufacturerData - 139 - Rechargeable - 140 - WarningCapacityLimit - 141 - CapacityGranularity1 - 142 - CapacityGranularity2 - 192 - InhibitCharge - 193 - EnablePolling - 194 - ResetToZero - 208 - ACPresent - 209 - BatteryPresent - 210 - PowerFail - 211 - AlarmInhibited - 212 - ThermistorUnderRange - 213 - ThermistorHot - 214 - ThermistorCold - 215 - ThermistorOverRange - 216 - VoltageOutOfRange - 217 - CurrentOutOfRange - 218 - CurrentNotRegulated - 219 - VoltageNotRegulated - 220 - MasterMode - 221 - ChargerBattery/HostControlled - 240 - ChargerSpecInfo - 241 - ChargerSpecRef - 242 - Level2 - 243 - Level3 - - - 140 - - description - Bar Code Scanner - ranges - - - usages - - - - 141 - - description - Scale Device - ranges - - - usages - - - - 144 - - description - Camera Control - ranges - - - usages - - - - 145 - - description - Arcade Device - ranges - - - usages - - 233 - Base Up - 234 - Base Down - - - - diff --git a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/Resources/Info.plist b/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/Resources/Info.plist deleted file mode 100644 index c0ff6501..00000000 --- a/radiant-player-mac/Frameworks/DDHidLib.framework/Versions/A/Resources/Info.plist +++ /dev/null @@ -1,42 +0,0 @@ - - - - - BuildMachineOSBuild - 15C50 - CFBundleDevelopmentRegion - English - CFBundleExecutable - DDHidLib - CFBundleIdentifier - org.dribin.dave.DDHidLib - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.1.1 - CFBundleSignature - ???? - CFBundleSupportedPlatforms - - MacOSX - - CFBundleVersion - 1010.9.0 - DTCompiler - com.apple.compilers.llvm.clang.1_0 - DTPlatformBuild - 7C68 - DTPlatformVersion - GM - DTSDKBuild - 15C43 - DTSDKName - macosx10.11 - DTXcode - 0720 - DTXcodeBuild - 7C68 - -