diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2010-01-26 16:43:42 +0100 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2010-01-26 16:43:42 +0100 |
commit | f559570664faeb7cef0dfc5c29b6eaceeff601fe (patch) | |
tree | dbc387eb4eae73d4aef3aebcfac79fa06ebaa8b1 | |
parent | c0d088eafb758fd9bbb2eab8be2d5524609f7de0 (diff) | |
parent | dcda9ba2f8892c64c1b603783bafd95c0871926f (diff) |
CWS-TOOLING: integrate CWS vcl108ooo/DEV300_m71
-rw-r--r-- | apple_remote/AppleRemote.m | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/apple_remote/AppleRemote.m b/apple_remote/AppleRemote.m index 25a6771..a65cc64 100644 --- a/apple_remote/AppleRemote.m +++ b/apple_remote/AppleRemote.m @@ -42,6 +42,9 @@ const char* AppleRemoteDeviceName = "AppleIRController"; #ifndef NSAppKitVersionNumber10_4 #define NSAppKitVersionNumber10_4 824 #endif +#ifndef NSAppKitVersionNumber10_5 + #define NSAppKitVersionNumber10_5 949 +#endif @implementation AppleRemote @@ -53,6 +56,9 @@ const char* AppleRemoteDeviceName = "AppleIRController"; // TODO : avoid such magics if (floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_4) { + #ifdef DEBUG + NSLog( @"setting 10.4 cookies" ); + #endif // 10.4.x Tiger [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlus] forKey:@"14_12_11_6_"]; [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonMinus] forKey:@"14_13_11_6_"]; @@ -65,7 +71,10 @@ const char* AppleRemoteDeviceName = "AppleIRController"; [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonMenu_Hold] forKey:@"14_6_14_6_"]; [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlay_Hold] forKey:@"18_14_6_18_14_6_"]; [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteControl_Switched] forKey:@"19_"]; - } else { + } else if( floor(NSAppKitVersionNumber) <= NSAppKitVersionNumber10_5 ) { + #ifdef DEBUG + NSLog( @"setting 10.5 cookies" ); + #endif // 10.5.x Leopard [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlus] forKey:@"31_29_28_19_18_"]; [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonMinus] forKey:@"31_30_28_19_18_"]; @@ -79,6 +88,24 @@ const char* AppleRemoteDeviceName = "AppleIRController"; [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlay_Hold] forKey:@"35_31_19_18_35_31_19_18_"]; [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteControl_Switched] forKey:@"19_"]; } + else + { + #ifdef DEBUG + NSLog( @"setting 10.6 cookies" ); + #endif + // 10.6.x Snow Leopard + [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlus] forKey:@"33_31_30_21_20_2_"]; + [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonMinus] forKey:@"33_32_30_21_20_2_"]; + [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonMenu] forKey:@"33_22_21_20_2_33_22_21_20_2_"]; + [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlay] forKey:@"33_23_21_20_2_33_23_21_20_2_"]; + [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonRight] forKey:@"33_24_21_20_2_33_24_21_20_2_"]; + [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonLeft] forKey:@"33_25_21_20_2_33_25_21_20_2_"]; + [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonRight_Hold] forKey:@"33_21_20_14_12_2_"]; + [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonLeft_Hold] forKey:@"33_21_20_13_12_2_"]; + [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonMenu_Hold] forKey:@"33_21_20_2_33_21_20_2_"]; + [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteButtonPlay_Hold] forKey:@"37_33_21_20_2_37_33_21_20_2_"]; + [_cookieToButtonMapping setObject:[NSNumber numberWithInt:kRemoteControl_Switched] forKey:@"19_"]; + } } - (void) sendRemoteButtonEvent: (RemoteControlEventIdentifier) event pressedDown: (BOOL) pressedDown { |