My favorites | Sign in
Project Home Downloads Wiki Issues Source
Repository:
Checkout   Browse   Changes   Clones  
Changes to /AppKit/NSWorkspace.m
e5277a40a7e8 vs. 2470bd80abf4 Compare: vs.  Format:
Revision 2470bd80abf4
Go to: 
Project members, sign in to write a code review
/AppKit/NSWorkspace.m   e5277a40a7e8 /AppKit/NSWorkspace.m   2470bd80abf4
1 /* Copyright (c) 2006 Christopher J. W. Lloyd 1 /* Copyright (c) 2006-2007 Christopher J. W. Lloyd
2 2
3 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: 3 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:
4 4
5 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 5 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6 6
7 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. */ 7 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. */
8 8
9 // Original - Christopher Lloyd <cjwl@objc.net> 9 // Original - Christopher Lloyd <cjwl@objc.net>
10 #import <AppKit/NSWorkspace.h> 10 #import <AppKit/NSWorkspace.h>
11 #import <AppKit/NSPlatform.h> 11 #import <AppKit/NSPlatform.h>
12 12
13 NSString *NSWorkspaceWillPowerOffNotification=@"NSWorkspaceWillPowerOffNotification"; 13 NSString *NSWorkspaceWillPowerOffNotification=@"NSWorkspaceWillPowerOffNotification";
14 14
15 @implementation NSWorkspace 15 @implementation NSWorkspace
16 16
17 +(NSWorkspace *)sharedWorkspace { 17 +(NSWorkspace *)sharedWorkspace {
18 return NSThreadSharedInstance([[NSPlatform currentPlatform] workspaceClassName]); 18 return NSThreadSharedInstance([[NSPlatform currentPlatform] workspaceClassName]);
19 } 19 }
20 20
21 -init { 21 -init {
22 _notificationCenter=[[NSNotificationCenter alloc] init]; 22 _notificationCenter=[[NSNotificationCenter alloc] init];
23 return self; 23 return self;
24 } 24 }
25 25
26 -(NSNotificationCenter *)notificationCenter { 26 -(NSNotificationCenter *)notificationCenter {
27 return _notificationCenter; 27 return _notificationCenter;
28 } 28 }
29 29
30 -(BOOL)selectFile:(NSString *)path inFileViewerRootedAtPath:(NSString *)rootedAtPath { 30 -(BOOL)selectFile:(NSString *)path inFileViewerRootedAtPath:(NSString *)rootedAtPath {
31 NSInvalidAbstractInvocation(); 31 NSInvalidAbstractInvocation();
32 return NO; 32 return NO;
33 } 33 }
34 34
35 -(BOOL)openFile:(NSString *)path { 35 -(BOOL)openFile:(NSString *)path {
36 NSInvalidAbstractInvocation(); 36 NSInvalidAbstractInvocation();
37 return NO; 37 return NO;
38 } 38 }
39 39
40 -(BOOL)openFile:(NSString *)path withApplication:(NSString *)application { 40 -(BOOL)openFile:(NSString *)path withApplication:(NSString *)application {
41 NSInvalidAbstractInvocation(); 41 NSInvalidAbstractInvocation();
42 return NO; 42 return NO;
43 } 43 }
44 44
45 -(BOOL)openTempFile:(NSString *)path { 45 -(BOOL)openTempFile:(NSString *)path {
46 NSInvalidAbstractInvocation(); 46 NSInvalidAbstractInvocation();
47 return NO; 47 return NO;
48 } 48 }
49 49
50 -(int)extendPowerOffBy:(int)seconds { 50 -(int)extendPowerOffBy:(int)seconds {
51 NSInvalidAbstractInvocation(); 51 NSInvalidAbstractInvocation();
52 return 0; 52 return 0;
53 } 53 }
54 54
55 -(void)slideImage:(NSImage *)image from:(NSPoint)fromPoint to:(NSPoint)toPoint { 55 -(void)slideImage:(NSImage *)image from:(NSPoint)fromPoint to:(NSPoint)toPoint {
56 NSInvalidAbstractInvocation(); 56 NSInvalidAbstractInvocation();
57 } 57 }
58 58
59 @end 59 @end
Powered by Google Project Hosting