Up

NSWorkspace

Authors

Scott Christley( scottc@net-community.com )
Richard Frith-Macdonald( richard@brainstorm.co.uk )
Fred Kiefer( FredKiefer@gmx.de )
Workspace class

Copyright: (C) 1996-1999, 2001 Free Software Foundation, Inc.


Contents -

  1. Software documentation for the NSWorkspace class
  2. Software documentation for the NSWorkspace(GNUstep) category

Software documentation for the NSWorkspace class

NSWorkspace : NSObject

Declared in:
AppKit/NSWorkspace.h
Standards:

Description forthcoming.

Method summary

sharedWorkspace

+ (NSWorkspace*) sharedWorkspace;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


checkForRemovableMedia

- (void) checkForRemovableMedia;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


extendPowerOffBy:

- (int) extendPowerOffBy: (int)requested;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


fileSystemChanged

- (BOOL) fileSystemChanged;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


findApplications

- (void) findApplications;
Standards: GNUstep, MacOS-X, OpenStep

Updates Registered Services and File Types


fullPathForApplication:

- (NSString*) fullPathForApplication: (NSString*)appName;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


getFileSystemInfoForPath:isRemovable:isWritable:isUnmountable:description:type:

- (BOOL) getFileSystemInfoForPath: (NSString*)fullPath isRemovable: (BOOL*)removableFlag isWritable: (BOOL*)writableFlag isUnmountable: (BOOL*)unmountableFlag description: (NSString**)description type: (NSString**)fileSystemType;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


getInfoForFile:application:type:

- (BOOL) getInfoForFile: (NSString*)fullPath application: (NSString**)appName type: (NSString**)type;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


hideOtherApplications

- (void) hideOtherApplications;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


iconForFile:

- (NSImage*) iconForFile: (NSString*)aPath;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


iconForFileType:

- (NSImage*) iconForFileType: (NSString*)fileType;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


iconForFiles:

- (NSImage*) iconForFiles: (NSArray*)pathArray;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


isFilePackageAtPath:

- (BOOL) isFilePackageAtPath: (NSString*)fullPath;
Standards: NotOpenStep, GNUstep, MacOS-X

Description forthcoming.


launchApplication:

- (BOOL) launchApplication: (NSString*)appName;
Standards: GNUstep, MacOS-X, OpenStep

Calls -launchApplication:showIcon:autolaunch: with arguments set to show the icon but not set it up as an autolaunch.


launchApplication:showIcon:autolaunch:

- (BOOL) launchApplication: (NSString*)appName showIcon: (BOOL)showIcon autolaunch: (BOOL)autolaunch;
Standards: GNUstep, MacOS-X, OpenStep

Launches the specified application (unless it is alreeady running)


mountNewRemovableMedia

- (NSArray*) mountNewRemovableMedia;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


mountedLocalVolumePaths

- (NSArray*) mountedLocalVolumePaths;
Standards: NotOpenStep, GNUstep, MacOS-X

Description forthcoming.


mountedRemovableMedia

- (NSArray*) mountedRemovableMedia;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


noteFileSystemChanged

- (void) noteFileSystemChanged;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


noteFileSystemChanged:

- (void) noteFileSystemChanged: (NSString*)path;
Standards: NotOpenStep, GNUstep, MacOS-X

Description forthcoming.


noteUserDefaultsChanged

- (void) noteUserDefaultsChanged;
Standards: GNUstep, MacOS-X, OpenStep

Simply makes a note that the user defaults database has changed.


notificationCenter

- (NSNotificationCenter*) notificationCenter;
Standards: GNUstep, MacOS-X, OpenStep

Returns the workspace notification center


openFile:

- (BOOL) openFile: (NSString*)fullPath;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


openFile:fromImage:at:inView:

- (BOOL) openFile: (NSString*)fullPath fromImage: (NSImage*)anImage at: (NSPoint)point inView: (NSView*)aView;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


openFile:withApplication:

- (BOOL) openFile: (NSString*)fullPath withApplication: (NSString*)appName;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


openFile:withApplication:andDeactivate:

- (BOOL) openFile: (NSString*)fullPath withApplication: (NSString*)appName andDeactivate: (BOOL)flag;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


openTempFile:

- (BOOL) openTempFile: (NSString*)fullPath;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


openURL:

- (BOOL) openURL: (NSURL*)url;
Standards: NotOpenStep, GNUstep, MacOS-X

Description forthcoming.


performFileOperation:source:destination:files:tag:

- (BOOL) performFileOperation: (NSString*)operation source: (NSString*)source destination: (NSString*)destination files: (NSArray*)files tag: (int*)tag;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


selectFile:inFileViewerRootedAtPath:

- (BOOL) selectFile: (NSString*)fullPath inFileViewerRootedAtPath: (NSString*)rootFullpath;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


slideImage:from:to:

- (void) slideImage: (NSImage*)image from: (NSPoint)fromPoint to: (NSPoint)toPoint;
Standards: GNUstep, MacOS-X, OpenStep

Animating an Image- slides it from one point on the screen to another.


unmountAndEjectDeviceAtPath:

- (BOOL) unmountAndEjectDeviceAtPath: (NSString*)path;
Standards: GNUstep, MacOS-X, OpenStep

Description forthcoming.


userDefaultsChanged

- (BOOL) userDefaultsChanged;
Standards: GNUstep, MacOS-X, OpenStep

Returns a flag to say if the defaults database has changed since the last time this method was called.


Software documentation for the NSWorkspace(GNUstep) category

NSWorkspace(GNUstep)

Declared in:
AppKit/NSWorkspace.h
Standards:

Description forthcoming.

Method summary

appIconForApp:

- (NSImage*) appIconForApp: (NSString*)appName;
Standards: NotOpenStep, NotMacOS-X, GNUstep

Returns the application icon for the given app. Or null if none defined or appName is not a valid application name.


bundleForApp:

- (NSBundle*) bundleForApp: (NSString*)appName;
Standards: NotOpenStep, NotMacOS-X, GNUstep

Returns the application bundle for the named application.


getBestAppInRole:forExtension:

- (NSString*) getBestAppInRole: (NSString*)role forExtension: (NSString*)ext;
Standards: NotOpenStep, NotMacOS-X, GNUstep

Returns the 'best' application to open a file with the specified extension using the given role . If the role is nil then apps which can edit are preferred but viewers are also acceptable. Uses a user preferred app or picks any good match.


getBestIconForExtension:

- (NSString*) getBestIconForExtension: (NSString*)ext;
Standards: NotOpenStep, NotMacOS-X, GNUstep

Returns the path set for the icon matching the image by -setBestIcon:forExtension:


infoForExtension:

- (NSDictionary*) infoForExtension: (NSString*)ext;
Standards: NotOpenStep, NotMacOS-X, GNUstep

Gets the applications cache (generated by the make_services tool) and looks up the special entry that contains a dictionary of all file extensions recognised by GNUstep applications. Then finds the dictionary of applications that can handle our file and returns it.


locateApplicationBinary:

- (NSString*) locateApplicationBinary: (NSString*)appName;
Standards: NotOpenStep, NotMacOS-X, GNUstep

Requires the path to an application wrapper as an argument, and returns the full path to the executable.


setBestApp:inRole:forExtension:

- (void) setBestApp: (NSString*)appName inRole: (NSString*)role forExtension: (NSString*)ext;
Standards: NotOpenStep, NotMacOS-X, GNUstep

Sets up a user preference for which app should be used to open files of the specified extension.


setBestIcon:forExtension:

- (void) setBestIcon: (NSString*)iconPath forExtension: (NSString*)ext;
Standards: NotOpenStep, NotMacOS-X, GNUstep

Sets up a user preference for which icon should be used to represent the specified file extension.



Up