Revision: 3188
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3188&view=rev
Author:   hofman
Date:     2007-11-09 14:18:42 -0800 (Fri, 09 Nov 2007)

Log Message:
-----------
Replace apple remote source for Leopard compatibility.

Modified Paths:
--------------
    trunk/SKApplicationController.h
    trunk/SKApplicationController.m
    trunk/Skim.xcodeproj/project.pbxproj

Added Paths:
-----------
    trunk/vendorsrc/martinkahr/RemoteControlWrapper/
    trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControl.h
    trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControl.m
    trunk/vendorsrc/martinkahr/RemoteControlWrapper/license.txt

Removed Paths:
-------------
    trunk/vendorsrc/martinkahr/AppleRemoteSource_R80/

Modified: trunk/SKApplicationController.h
===================================================================
--- trunk/SKApplicationController.h     2007-11-09 22:06:34 UTC (rev 3187)
+++ trunk/SKApplicationController.h     2007-11-09 22:18:42 UTC (rev 3188)
@@ -43,8 +43,11 @@
 extern NSString *SKDocumentSetupAliasKey;
 extern NSString *SKDocumentSetupFileNameKey;
 
[EMAIL PROTECTED] RemoteControl;
+
 @interface SKApplicationController : NSObject {
     NSTimer *currentDocumentsTimer;
+    RemoteControl *remoteControl;
     BOOL remoteScrolling;
 }
 

Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m     2007-11-09 22:06:34 UTC (rev 3187)
+++ trunk/SKApplicationController.m     2007-11-09 22:18:42 UTC (rev 3188)
@@ -51,7 +51,7 @@
 #import "NSUserDefaultsController_SKExtensions.h"
 #import <Quartz/Quartz.h>
 #import <Sparkle/Sparkle.h>
-#import "AppleRemote.h"
+#import "RemoteControl.h"
 #import "NSBezierPath_BDSKExtensions.h"
 #import "SKLine.h"
 #import "NSImage_SKExtensions.h"
@@ -166,8 +166,9 @@
         [[NSUserDefaults standardUserDefaults] setObject:versionString 
forKey:SKLastVersionLaunchedKey];
     }
        
-    if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKEnableAppleRemoteKey])
-        [[AppleRemote sharedRemote] setDelegate:self];
+    if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKEnableAppleRemoteKey]) {
+        remoteControl = [[RemoteControl alloc] initWithDelegate:self];
+    }
     
     [self doSpotlightImportIfNeeded];
     
@@ -176,12 +177,12 @@
 
 - (void)applicationDidBecomeActive:(NSNotification *)aNotification {
        if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKEnableAppleRemoteKey])
-        [[AppleRemote sharedRemote] setListeningToRemote:YES];
+        [remoteControl setListeningToRemote:YES];
 }
 
 - (void)applicationWillResignActive:(NSNotification *)aNotification {
        if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKEnableAppleRemoteKey])
-        [[AppleRemote sharedRemote] setListeningToRemote:NO];
+        [remoteControl setListeningToRemote:NO];
 }
 
 - (void)applicationStartsTerminating:(NSNotification *)aNotification {
@@ -193,8 +194,9 @@
 
 - (void)applicationWillTerminate:(NSNotification *)aNotification {
        if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKEnableAppleRemoteKey]) {
-        [[AppleRemote sharedRemote] setListeningToRemote:NO];
-        [[AppleRemote sharedRemote] setDelegate:nil];
+        [remoteControl setListeningToRemote:NO];
+        [remoteControl release];
+        remoteControl = nil;
     }
 }
 
@@ -316,7 +318,7 @@
     [self addMenuItemsForBookmarks:bookmarks toMenu:menu];
 }
 
-- (void)appleRemoteButton:(AppleRemoteEventIdentifier)buttonIdentifier 
pressedDown:(BOOL)pressedDown {
+- (void)sendRemoteButtonEvent:(RemoteControlEventIdentifier)event 
pressedDown:(BOOL)pressedDown remoteControl:(RemoteControl *)remoteControl {
     NSArray *docs = [NSApp orderedDocuments];
     id document = [docs count] ? [docs objectAtIndex:0] : nil;
     SKMainWindowController *controller = [document 
respondsToSelector:@selector(mainWindowController)]? [document 
mainWindowController] : nil;
@@ -324,8 +326,8 @@
     if (controller == nil)
         return;
     
-    switch (buttonIdentifier) {
-        case kRemoteButtonVolume_Plus:
+    switch (event) {
+        case kRemoteButtonPlus:
             if (pressedDown == NO)
                 break;
             if (remoteScrolling)
@@ -335,7 +337,7 @@
             else
                 [controller doZoomIn:nil];
             break;
-        case kRemoteButtonVolume_Minus:
+        case kRemoteButtonMinus:
             if (remoteScrolling)
                 [[[controller pdfView] documentView] scrollLineDown];
             else if (pressedDown == NO)

Modified: trunk/Skim.xcodeproj/project.pbxproj
===================================================================
--- trunk/Skim.xcodeproj/project.pbxproj        2007-11-09 22:06:34 UTC (rev 
3187)
+++ trunk/Skim.xcodeproj/project.pbxproj        2007-11-09 22:18:42 UTC (rev 
3188)
@@ -67,6 +67,8 @@
                CE20B1600C9EFC29007C72F9 /* notesTemplate.rtfd in CopyFiles */ 
= {isa = PBXBuildFile; fileRef = CE20AC990C9EF2F9007C72F9 /* notesTemplate.rtfd 
*/; };
                CE20B1950C9F23CC007C72F9 /* NSView_SKExtensions.m in Sources */ 
= {isa = PBXBuildFile; fileRef = CE20B1930C9F23CC007C72F9 /* 
NSView_SKExtensions.m */; };
                CE2A11670CE3B51600A0499B /* archivedmg.sh in Resources */ = 
{isa = PBXBuildFile; fileRef = CE2A11660CE3B51600A0499B /* archivedmg.sh */; };
+               CE2A1E620CE513E400A0499B /* RemoteControl.h in CopyFiles */ = 
{isa = PBXBuildFile; fileRef = CE2A1E600CE513E300A0499B /* RemoteControl.h */; 
};
+               CE2A1E630CE513E400A0499B /* RemoteControl.m in Sources */ = 
{isa = PBXBuildFile; fileRef = CE2A1E610CE513E300A0499B /* RemoteControl.m */; 
};
                CE2BD83E0BD4132B00A5F4DB /* Sparkle.framework in Frameworks */ 
= {isa = PBXBuildFile; fileRef = CE2BD82A0BD4132B00A5F4DB /* Sparkle.framework 
*/; };
                CE2BD8450BD4135600A5F4DB /* Sparkle.framework in CopyFiles */ = 
{isa = PBXBuildFile; fileRef = CE2BD82A0BD4132B00A5F4DB /* Sparkle.framework 
*/; };
                CE2DE4920B85D48F00D0DA12 /* SKThumbnail.m in Sources */ = {isa 
= PBXBuildFile; fileRef = CE2DE4910B85D48F00D0DA12 /* SKThumbnail.m */; };
@@ -134,7 +136,6 @@
                CE5BEA190C7C635400EBDCF7 /* NSGeometry_SKExtensions.m in 
Sources */ = {isa = PBXBuildFile; fileRef = CE5BEA170C7C635400EBDCF7 /* 
NSGeometry_SKExtensions.m */; };
                CE5BF8010C7CBF6300EBDCF7 /* SKTableView.m in Sources */ = {isa 
= PBXBuildFile; fileRef = CE5BF7FF0C7CBF6300EBDCF7 /* SKTableView.m */; };
                CE5BF8430C7CC24A00EBDCF7 /* SKOutlineView.m in Sources */ = 
{isa = PBXBuildFile; fileRef = CE5BF8410C7CC24A00EBDCF7 /* SKOutlineView.m */; 
};
-               CE5F42AF0BF89FE00069D89C /* AppleRemote.m in Sources */ = {isa 
= PBXBuildFile; fileRef = CE5F42AD0BF89FE00069D89C /* AppleRemote.m */; };
                CE5F43730BF8A3410069D89C /* IOKit.framework in Frameworks */ = 
{isa = PBXBuildFile; fileRef = CE5F42D30BF8A3400069D89C /* IOKit.framework */; 
};
                CE5F71560C8CDF9A008BE480 /* NSCell_SKExtensions.m in Sources */ 
= {isa = PBXBuildFile; fileRef = CE5F71540C8CDF9A008BE480 /* 
NSCell_SKExtensions.m */; };
                CE5FA1680C909886008BE480 /* SKFDFParser.m in Sources */ = {isa 
= PBXBuildFile; fileRef = CE5FA1660C909886008BE480 /* SKFDFParser.m */; };
@@ -288,6 +289,7 @@
                        files = (
                                CE2BD8450BD4135600A5F4DB /* Sparkle.framework 
in CopyFiles */,
                                CEAE39060CA43E7300849B0F /* SKSheetController.h 
in CopyFiles */,
+                               CE2A1E620CE513E400A0499B /* RemoteControl.h in 
CopyFiles */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
@@ -404,6 +406,8 @@
                CE20B1920C9F23CC007C72F9 /* NSView_SKExtensions.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
NSView_SKExtensions.h; sourceTree = "<group>"; };
                CE20B1930C9F23CC007C72F9 /* NSView_SKExtensions.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= NSView_SKExtensions.m; sourceTree = "<group>"; };
                CE2A11660CE3B51600A0499B /* archivedmg.sh */ = {isa = 
PBXFileReference; fileEncoding = 30; lastKnownFileType = text.script.sh; path = 
archivedmg.sh; sourceTree = "<group>"; };
+               CE2A1E600CE513E300A0499B /* RemoteControl.h */ = {isa = 
PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = 
RemoteControl.h; path = 
vendorsrc/martinkahr/RemoteControlWrapper/RemoteControl.h; sourceTree = 
"<group>"; };
+               CE2A1E610CE513E300A0499B /* RemoteControl.m */ = {isa = 
PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; 
name = RemoteControl.m; path = 
vendorsrc/martinkahr/RemoteControlWrapper/RemoteControl.m; sourceTree = 
"<group>"; };
                CE2BD8170BD4127A00A5F4DB /* Sparkle.xcodeproj */ = {isa = 
PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = 
Sparkle.xcodeproj; path = vendorsrc/andymatuschak/Sparkle/Sparkle.xcodeproj; 
sourceTree = "<group>"; };
                CE2BD82A0BD4132B00A5F4DB /* Sparkle.framework */ = {isa = 
PBXFileReference; lastKnownFileType = wrapper.framework; path = 
Sparkle.framework; sourceTree = BUILT_PRODUCTS_DIR; };
                CE2DE4900B85D48F00D0DA12 /* SKThumbnail.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
SKThumbnail.h; sourceTree = "<group>"; };
@@ -527,8 +531,6 @@
                CE5BF7FF0C7CBF6300EBDCF7 /* SKTableView.m */ = {isa = 
PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; 
path = SKTableView.m; sourceTree = "<group>"; };
                CE5BF8400C7CC24A00EBDCF7 /* SKOutlineView.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
SKOutlineView.h; sourceTree = "<group>"; };
                CE5BF8410C7CC24A00EBDCF7 /* SKOutlineView.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= SKOutlineView.m; sourceTree = "<group>"; };
-               CE5F42AC0BF89FE00069D89C /* AppleRemote.h */ = {isa = 
PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = 
AppleRemote.h; path = vendorsrc/martinkahr/AppleRemoteSource_R80/AppleRemote.h; 
sourceTree = "<group>"; };
-               CE5F42AD0BF89FE00069D89C /* AppleRemote.m */ = {isa = 
PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; 
name = AppleRemote.m; path = 
vendorsrc/martinkahr/AppleRemoteSource_R80/AppleRemote.m; sourceTree = 
"<group>"; };
                CE5F42D30BF8A3400069D89C /* IOKit.framework */ = {isa = 
PBXFileReference; lastKnownFileType = wrapper.framework; name = 
IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree 
= "<absolute>"; };
                CE5F71530C8CDF9A008BE480 /* NSCell_SKExtensions.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
NSCell_SKExtensions.h; sourceTree = "<group>"; };
                CE5F71540C8CDF9A008BE480 /* NSCell_SKExtensions.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= NSCell_SKExtensions.m; sourceTree = "<group>"; };
@@ -884,8 +886,8 @@
                453DC2740B4F23E500A72509 /* 3rd-party Sources */ = {
                        isa = PBXGroup;
                        children = (
-                               CE5F42AC0BF89FE00069D89C /* AppleRemote.h */,
-                               CE5F42AD0BF89FE00069D89C /* AppleRemote.m */,
+                               CE2A1E600CE513E300A0499B /* RemoteControl.h */,
+                               CE2A1E610CE513E300A0499B /* RemoteControl.m */,
                                453DC2750B4F242200A72509 /* BDAlias.m */,
                                453DC2760B4F242200A72509 /* BDAlias.h */,
                                F9F220840C14BD9C00041284 /* UKFileWatcher.h */,
@@ -1626,7 +1628,6 @@
                                CE49726D0BDE8A7400D7F1D2 /* 
PDFSelection_SKExtensions.m in Sources */,
                                CE49728B0BDE8B2900D7F1D2 /* SKToolbarItem.m in 
Sources */,
                                CE6C03F10BEDF759007BF0B5 /* 
NSParagraphStyle_SKExtensions.m in Sources */,
-                               CE5F42AF0BF89FE00069D89C /* AppleRemote.m in 
Sources */,
                                CE31A6180C01FC45003612A9 /* 
SKDocumentController.m in Sources */,
                                F968C5A30C036E9D000BD1B2 /* 
NSBitmapImageRep_SKExtensions.m in Sources */,
                                CE48BAD80C089EA300A166C6 /* SKTemplateParser.m 
in Sources */,
@@ -1667,6 +1668,7 @@
                                CE8978CE0CBFC70B00EA2D98 /* SKTag.m in Sources 
*/,
                                CEBF85E20CCE2DE70057A050 /* 
NSAffineTransform_SKExtensions.m in Sources */,
                                CE6C96B20CD925550022D69F /* 
SKNotesPanelController.m in Sources */,
+                               CE2A1E630CE513E400A0499B /* RemoteControl.m in 
Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };

Added: trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControl.h
===================================================================
--- trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControl.h             
                (rev 0)
+++ trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControl.h     
2007-11-09 22:18:42 UTC (rev 3188)
@@ -0,0 +1,102 @@
+/*****************************************************************************
+ * RemoteControl.h
+ * RemoteControlWrapper
+ *
+ * Created by Martin Kahr on 11.03.06 under a MIT-style license. 
+ * Copyright (c) 2006 martinkahr.com. All rights reserved.
+ *
+ * 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 <Cocoa/Cocoa.h>
+
+// notifaction names that are being used to signal that an application wants 
to 
+// have access to the remote control device or if the application has finished
+// using the remote control device
+extern NSString* REQUEST_FOR_REMOTE_CONTROL_NOTIFCATION;
+extern NSString* FINISHED_USING_REMOTE_CONTROL_NOTIFICATION;
+
+// keys used in user objects for distributed notifications
+extern NSString* kRemoteControlDeviceName;
+extern NSString* kApplicationIdentifier;
+extern NSString* kTargetApplicationIdentifier;
+
+// we have a 6 bit offset to make a hold event out of a normal event
+#define EVENT_TO_HOLD_EVENT_OFFSET 6 
+
[EMAIL PROTECTED] RemoteControl;
+
+typedef enum _RemoteControlEventIdentifier {
+       // normal events
+       kRemoteButtonPlus                               =1<<1,
+       kRemoteButtonMinus                              =1<<2,
+       kRemoteButtonMenu                               =1<<3,
+       kRemoteButtonPlay                               =1<<4,
+       kRemoteButtonRight                              =1<<5,
+       kRemoteButtonLeft                               =1<<6,
+       
+       // hold events
+       kRemoteButtonPlus_Hold                  =1<<7,
+       kRemoteButtonMinus_Hold                 =1<<8,  
+       kRemoteButtonMenu_Hold                  =1<<9,  
+       kRemoteButtonPlay_Hold                  =1<<10, 
+       kRemoteButtonRight_Hold                 =1<<11,
+       kRemoteButtonLeft_Hold                  =1<<12,
+       
+       // special events (not supported by all devices)        
+       kRemoteControl_Switched                 =1<<13,
+} RemoteControlEventIdentifier;
+
[EMAIL PROTECTED] NSObject(RemoteControlDelegate)
+
+- (void) sendRemoteButtonEvent: (RemoteControlEventIdentifier) event 
pressedDown: (BOOL) pressedDown remoteControl: (RemoteControl*) remoteControl;
+
[EMAIL PROTECTED]
+
+/*
+       Base Interface for Remote Control devices
+*/
[EMAIL PROTECTED] RemoteControl : NSObject {
+       id delegate;
+}
+
+// returns nil if the remote control device is not available
+- (id) initWithDelegate: (id) remoteControlDelegate;
+
+- (void) setListeningToRemote: (BOOL) value;
+- (BOOL) isListeningToRemote;
+
+- (BOOL) isOpenInExclusiveMode;
+- (void) setOpenInExclusiveMode: (BOOL) value;
+
+- (IBAction) startListening: (id) sender;
+- (IBAction) stopListening: (id) sender;
+
+// is this remote control sending the given event?
+- (BOOL) sendsEventForButtonIdentifier: (RemoteControlEventIdentifier) 
identifier;
+
+// sending of notifications between applications
++ (void) sendFinishedNotifcationForAppIdentifier: (NSString*) identifier;
++ (void) sendRequestForRemoteControlNotification;
+
+// name of the device
++ (const char*) remoteControlDeviceName;
+
[EMAIL PROTECTED]

Added: trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControl.m
===================================================================
--- trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControl.m             
                (rev 0)
+++ trunk/vendorsrc/martinkahr/RemoteControlWrapper/RemoteControl.m     
2007-11-09 22:18:42 UTC (rev 3188)
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ * RemoteControl.m
+ * RemoteControlWrapper
+ *
+ * Created by Martin Kahr on 11.03.06 under a MIT-style license. 
+ * Copyright (c) 2006 martinkahr.com. All rights reserved.
+ *
+ * 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 "RemoteControl.h"
+
+// notifaction names that are being used to signal that an application wants 
to 
+// have access to the remote control device or if the application has finished
+// using the remote control device
+NSString* REQUEST_FOR_REMOTE_CONTROL_NOTIFCATION     = 
@"mac.remotecontrols.RequestForRemoteControl";
+NSString* FINISHED_USING_REMOTE_CONTROL_NOTIFICATION = 
@"mac.remotecontrols.FinishedUsingRemoteControl";
+
+// keys used in user objects for distributed notifications
+NSString* kRemoteControlDeviceName = @"RemoteControlDeviceName";
+NSString* kApplicationIdentifier   = @"CFBundleIdentifier";
+// bundle identifier of the application that should get access to the remote 
control
+// this key is being used in the FINISHED notification only
+NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier";
+
+
[EMAIL PROTECTED] RemoteControl
+
+// returns nil if the remote control device is not available
+- (id) initWithDelegate: (id) _remoteControlDelegate { 
+       if (self = [super init]) {
+               delegate = [_remoteControlDelegate retain];
+       }
+       return self;
+}
+
+- (void) dealloc {
+       [delegate release];
+       [super dealloc];
+}
+
+- (void) setListeningToRemote: (BOOL) value {
+}
+- (BOOL) isListeningToRemote {
+       return NO;
+}
+
+- (IBAction) startListening: (id) sender {
+}
+- (IBAction) stopListening: (id) sender {
+       
+}
+
+- (BOOL) isOpenInExclusiveMode {
+       return YES;
+}
+- (void) setOpenInExclusiveMode: (BOOL) value {
+}
+
+- (BOOL) sendsEventForButtonIdentifier: (RemoteControlEventIdentifier) 
identifier {
+       return YES;
+}
+
++ (void) sendDistributedNotification: (NSString*) notificationName 
targetBundleIdentifier: (NSString*) targetIdentifier {
+       NSDictionary* userInfo = [NSDictionary dictionaryWithObjectsAndKeys: 
[NSString stringWithCString:[self remoteControlDeviceName] 
encoding:NSASCIIStringEncoding],
+               kRemoteControlDeviceName, [[NSBundle mainBundle] 
bundleIdentifier], kApplicationIdentifier, 
+               targetIdentifier, kTargetApplicationIdentifier, nil];
+       
+       [[NSDistributedNotificationCenter defaultCenter] 
postNotificationName:notificationName
+                                                                               
                                                   object:nil
+                                                                               
                                                 userInfo:userInfo
+                                                                               
                           deliverImmediately:YES];     
+}
+
++ (void) sendFinishedNotifcationForAppIdentifier: (NSString*) identifier {
+       [self 
sendDistributedNotification:FINISHED_USING_REMOTE_CONTROL_NOTIFICATION 
targetBundleIdentifier:identifier];
+}
++ (void) sendRequestForRemoteControlNotification {
+       [self 
sendDistributedNotification:REQUEST_FOR_REMOTE_CONTROL_NOTIFCATION 
targetBundleIdentifier:nil];
+}
+
++ (const char*) remoteControlDeviceName {
+       return NULL;
+}
+
[EMAIL PROTECTED]

Added: trunk/vendorsrc/martinkahr/RemoteControlWrapper/license.txt
===================================================================
--- trunk/vendorsrc/martinkahr/RemoteControlWrapper/license.txt                 
        (rev 0)
+++ trunk/vendorsrc/martinkahr/RemoteControlWrapper/license.txt 2007-11-09 
22:18:42 UTC (rev 3188)
@@ -0,0 +1,20 @@
+Created by Martin Kahr under a MIT-style license. 
+Copyright (c) 2006/2007 martinkahr.com. All rights reserved.
+
+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 \xD2AS IS\xD3, 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.


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to