org.rococoa.cocoa.appkit
Class NSWorkspace

java.lang.Object
  extended by org.rococoa.cocoa.foundation.NSObject
      extended by org.rococoa.cocoa.appkit.NSWorkspace
All Implemented Interfaces:
NSObject, ObjCObject

public abstract class NSWorkspace
extends NSObject
implements ObjCObject

This file was autogenerated by JNAerator,
a tool written by Olivier Chafik that uses a few opensource projects..
For help, please visit NativeLibs4Java, Rococoa, or JNA.


Nested Class Summary
static class NSWorkspace._class_
           
 
Nested classes/interfaces inherited from interface org.rococoa.cocoa.foundation.protocols.NSObject
NSObject._static_
 
Constructor Summary
NSWorkspace()
           
 
Method Summary
abstract  NSString absolutePathForAppBundleWithIdentifier(NSString bundleIdentifier)
          Get the path for the application with the given identifier.
abstract  void activateFileViewerSelectingURLs(NSArray fileURLs)
          Activate the Finder, and open one or more windows selecting the files at the given fileURLs.
abstract  NSDictionary activeApplication()
          Get an NSDictionary representing the currently frontmost app, with the above keys.
static NSWorkspace alloc()
           
 NSDeprecated as_NSWorkspace_NSDeprecated()
           
 NSDesktopImages as_NSWorkspace_NSDesktopImages()
           
abstract  NSInteger extendPowerOffBy(NSInteger requested)
          extendPowerOffBy: is currently not implemented.
abstract  NSArray fileLabelColors()
          Get the corresponding array of file label colors.
abstract  NSArray fileLabels()
          Get the array of file labels as NSStrings.
abstract  boolean filenameExtension_isValidForType(NSString filenameExtension, NSString typeName)
          Given a file name extension and a UTI, return YES if the file name extension is a valid tag for the identified type, NO otherwise.
abstract  NSString fullPathForApplication(NSString appName)
          Get the full path for a given application name, which may or may not have the .app extension.
abstract  boolean getFileSystemInfoForPath_isRemovable_isWritable_isUnmountable_description_type(NSString fullPath, boolean removableFlag, boolean writableFlag, boolean unmountableFlag, PointerByReference description, PointerByReference fileSystemType)
          Gets information about the filesystem.
abstract  boolean getInfoForFile_application_type(NSString fullPath, PointerByReference appName, PointerByReference type)
          Get, by reference, the name of the app used to open a file at the given path, and the type of the file.
static NSWorkspace._class_ getNSClass()
           
abstract  void hideOtherApplications()
          Attempt to hide all other applications.
abstract  NSImage iconForFile(NSString fullPath)
          Returns the icon for a file at a given path, or a generic icon if the operation fails.
abstract  NSImage iconForFiles(NSArray fullPaths)
          Returns the icon for a group of files at the given paths.
abstract  NSImage iconForFileType(NSString fileType)
          Get the icon for a given file type.
abstract  boolean isFilePackageAtPath(NSString fullPath)
          Indicates whether a given directory is a package.
abstract  boolean launchApplication_showIcon_autolaunch(NSString appName, boolean showIcon, boolean autolaunch)
          This currently does the same thing as launchApplication:.
abstract  boolean launchApplication(NSString appName)
          Launches an application.
abstract  NSRunningApplication launchApplicationAtURL_options_configuration_error(NSURL url, int options, NSDictionary configuration, PointerByReference error)
          Launches the app at the given URL.
abstract  boolean launchAppWithBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifier(NSString bundleIdentifier, int options, NSAppleEventDescriptor descriptor, PointerByReference identifier)
          The following methods launch an app with the given bundle identifier.
abstract  NSArray launchedApplications()
          Gets an array of NSDictionaries with the above keys.
abstract  NSString localizedDescriptionForType(NSString typeName)
          Given a UTI, return a string that describes the document type and is fit to present to the user, or nil for failure.
abstract  NSArray mountedLocalVolumePaths()
          Get the mount paths of all local volumes, that is, volumes that are backed by a physical device and are not a network mount.
abstract  NSArray mountedRemovableMedia()
          Get the mount paths of all volumes backed by removable media, such as DVDs.
static NSWorkspace new_()
           
abstract  void noteFileSystemChanged(NSString path)
          noteFileSystemChanged: informs listeners of a filesystem change, using the FNNotifyByPath() API.
abstract  NSNotificationCenter notificationCenter()
          Returns the NSNotificationCenter for this NSWorkspace.
abstract  boolean openFile_withApplication_andDeactivate(NSString fullPath, NSString appName, boolean flag)
          Original signature : -(BOOL)openFile:(NSString*) withApplication:(NSString*) andDeactivate:(BOOL)
native declaration : NSWorkspace.h:64
abstract  boolean openFile_withApplication(NSString fullPath, NSString appName)
          Original signature : -(BOOL)openFile:(NSString*) withApplication:(NSString*)
native declaration : NSWorkspace.h:63
abstract  boolean openFile(NSString fullPath)
          Open a file at some path.
abstract  boolean openURL(NSURL url)
          Open a URL, using the default handler for the URL's scheme.
abstract  boolean openURLs_withAppBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifiers(NSArray urls, NSString bundleIdentifier, int options, NSAppleEventDescriptor descriptor, PointerByReference identifiers)
          Original signature : -(BOOL)openURLs:(NSArray*) withAppBundleIdentifier:(NSString*) options:(NSWorkspaceLaunchOptions) additionalEventParamDescriptor:(NSAppleEventDescriptor*) launchIdentifiers:(NSArray**)
native declaration : NSWorkspace.h:184
abstract  boolean performFileOperation_source_destination_files_tag(NSString operation, NSString source, NSString destination, NSArray files, NativeSizeByReference tag)
          Performs the given file operation, blocking until complete.
abstract  NSString preferredFilenameExtensionForType(NSString typeName)
          Given a UTI, return the best file name extension to use when creating a file of that type, or nil for failure.
abstract  boolean selectFile_inFileViewerRootedAtPath(NSString fullPath, NSString rootFullPath)
          Activate the Finder and open a window selecting the file at the given path.
abstract  boolean setIcon_forFile_options(NSImage image, NSString fullPath, int options)
          If image is not nil, this sets a custom icon for the file at the given path.
static NSWorkspace sharedWorkspace()
          Get the shared instance of NSWorkspace.
abstract  boolean showSearchResultsForQueryString(NSString queryString)
          Displays a Spotlight search results window in Finder for the specified query string.
abstract  boolean type_conformsToType(NSString firstTypeName, NSString secondTypeName)
          Given two UTIs, return YES if the first "conforms to" to the second in the uniform type identifier hierarchy, NO otherwise.
abstract  NSString typeOfFile_error(NSString absoluteFilePath, PointerByReference outError)
          Given an absolute file path, return the uniform type identifier (UTI) of the file, if one can be determined.
abstract  boolean unmountAndEjectDeviceAtPath(NSString path)
          Attempt to eject the volume mounted at the given path.
abstract  boolean unmountAndEjectDeviceAtURL_error(NSURL url, PointerByReference error)
          Same as unmountAndEjectDeviceAtPath, except it takes an NSURL and returns an NSError.
abstract  NSURL URLForApplicationToOpenURL(NSURL url)
          Returns the URL to the default application that would be used to open the given URL, as if the file were double clicked in the Finder (for file URLs).
abstract  NSURL URLForApplicationWithBundleIdentifier(NSString bundleIdentifier)
          Get the URL for the application with the given identifier.
 
Methods inherited from class org.rococoa.cocoa.foundation.NSObject
as_NSObject_NSAccessibility, as_NSObject_NSAccessibilityAdditions, as_NSObject_NSApplicationScriptingDelegation, as_NSObject_NSArchiverCallback, as_NSObject_NSClassDescriptionPrimitives, as_NSObject_NSCoderMethods, as_NSObject_NSColorPanelResponderMethod, as_NSObject_NSComparisonMethods, as_NSObject_NSControlSubclassNotifications, as_NSObject_NSCopyLinkMoveHandler, as_NSObject_NSDelayedPerforming, as_NSObject_NSDeprecatedKeyValueCoding, as_NSObject_NSDeprecatedKeyValueObservingCustomization, as_NSObject_NSDeprecatedMethods, as_NSObject_NSDictionaryControllerKeyValuePair, as_NSObject_NSDistributedObjects, as_NSObject_NSDraggingDestination, as_NSObject_NSDraggingSource, as_NSObject_NSDraggingSourceDeprecated, as_NSObject_NSEditor, as_NSObject_NSEditorRegistration, as_NSObject_NSErrorRecoveryAttempting, as_NSObject_NSFileManagerFileOperationAdditions, as_NSObject_NSFontManagerDelegate, as_NSObject_NSFontManagerResponderMethod, as_NSObject_NSFontPanelValidationAdditions, as_NSObject_NSKeyValueBindingCreation, as_NSObject_NSKeyValueCoding, as_NSObject_NSKeyValueObserverNotification, as_NSObject_NSKeyValueObserverRegistration, as_NSObject_NSKeyValueObserving, as_NSObject_NSKeyValueObservingCustomization, as_NSObject_NSMenuValidation, as_NSObject_NSNibAwaking, as_NSObject_NSPasteboardOwner, as_NSObject_NSPlaceholders, as_NSObject_NSScriptClassDescription, as_NSObject_NSScripting, as_NSObject_NSScriptingComparisonMethods, as_NSObject_NSScriptKeyValueCoding, as_NSObject_NSScriptObjectSpecifiers, as_NSObject_NSThreadPerformAdditions, as_NSObject_NSURLClient, as_NSObject_NSURLConnectionDelegate, as_NSObject_NSURLDownloadDelegate, copy, create, dealloc, description, doesNotRecognizeSelector, finalize, forwardingTargetForSelector, forwardInvocation, init, isKindOfClass, isKindOfClass, methodForSelector, methodSignatureForSelector, mutableCopy, release, retain, retainCount
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.rococoa.ObjCObject
id
 
Methods inherited from interface org.rococoa.cocoa.foundation.protocols.NSObject
autorelease, class_, conformsToProtocol, hash, isEqual, isMemberOfClass, isProxy, performSelector_withObject_withObject, performSelector_withObject, performSelector, respondsToSelector, self, superclass, zone
 

Constructor Detail

NSWorkspace

public NSWorkspace()
Method Detail

as_NSWorkspace_NSDeprecated

public NSDeprecated as_NSWorkspace_NSDeprecated()

as_NSWorkspace_NSDesktopImages

public NSDesktopImages as_NSWorkspace_NSDesktopImages()

sharedWorkspace

public static NSWorkspace sharedWorkspace()
Get the shared instance of NSWorkspace. This method will create an instance of NSWorkspace if it has not been created yet. You should not attempt to instantiate instances of NSWorkspace yourself, and you should not attempt to subclass NSWorkspace.
Original signature : +(NSWorkspace*)sharedWorkspace
native declaration : NSWorkspace.h:55


notificationCenter

public abstract NSNotificationCenter notificationCenter()
Returns the NSNotificationCenter for this NSWorkspace. All notifications in this header file must be registered on this notifcation center. If you register on other notification centers, you will not receive the notifications.
Original signature : -(NSNotificationCenter*)notificationCenter
native declaration : NSWorkspace.h:58


openFile

public abstract boolean openFile(NSString fullPath)
Open a file at some path. If you use the variant without the withApplication: parameter, or if you pass nil for this parameter, the default application is used. The appName parameter may be a full path to an application, or just the application's name, with or without the .app extension. If you pass YES for andDeactivate:, or call a variant without this parameter, the calling app is deactivated before the new app is launched, so that the new app may come to the foreground unless the user switches to another application in the interim. Passing YES for andDeactivate: is generally recommended.
Original signature : -(BOOL)openFile:(NSString*)
native declaration : NSWorkspace.h:62


openFile_withApplication

public abstract boolean openFile_withApplication(NSString fullPath,
                                                 NSString appName)
Original signature : -(BOOL)openFile:(NSString*) withApplication:(NSString*)
native declaration : NSWorkspace.h:63


openFile_withApplication_andDeactivate

public abstract boolean openFile_withApplication_andDeactivate(NSString fullPath,
                                                               NSString appName,
                                                               boolean flag)
Original signature : -(BOOL)openFile:(NSString*) withApplication:(NSString*) andDeactivate:(BOOL)
native declaration : NSWorkspace.h:64


openURL

public abstract boolean openURL(NSURL url)
Open a URL, using the default handler for the URL's scheme.
Original signature : -(BOOL)openURL:(NSURL*)
native declaration : NSWorkspace.h:70


launchApplication

public abstract boolean launchApplication(NSString appName)
Launches an application. The appName may be a full path to the app, or the name alone, with or without the .app extension.
Original signature : -(BOOL)launchApplication:(NSString*)
native declaration : NSWorkspace.h:73


launchApplicationAtURL_options_configuration_error

public abstract NSRunningApplication launchApplicationAtURL_options_configuration_error(NSURL url,
                                                                                        int options,
                                                                                        NSDictionary configuration,
                                                                                        PointerByReference error)
Launches the app at the given URL. If the app is successfully launched, a reference to the new running app is returned. If the app is already running, and NSWorkspaceLaunchNewInstance is not specified, then a reference to the existing app is returned. If the app could not be launched, nil is returned and an NSError is returned by reference.
The configuration dictionary can be used to pass additional options to the app. Possible keys are listed later in this file (search for NSWorkspaceLaunchConfiguration). The configuration dictionary may be nil, in which case default behavior applies.
Original signature : -(NSRunningApplication*)launchApplicationAtURL:(NSURL*) options:(NSWorkspaceLaunchOptions) configuration:(NSDictionary*) error:(NSError**)
native declaration : NSWorkspace.h:79

Parameters:
options - @see org.rococoa.cocoa.appkit.AppKitLibrary#NSWorkspaceLaunchOptions

launchApplication_showIcon_autolaunch

public abstract boolean launchApplication_showIcon_autolaunch(NSString appName,
                                                              boolean showIcon,
                                                              boolean autolaunch)
This currently does the same thing as launchApplication:. Its use is discouraged.
Original signature : -(BOOL)launchApplication:(NSString*) showIcon:(BOOL) autolaunch:(BOOL)
native declaration : NSWorkspace.h:82


fullPathForApplication

public abstract NSString fullPathForApplication(NSString appName)
Get the full path for a given application name, which may or may not have the .app extension. This indicates the application that will be opened by methods such as launchApplication:. If the application could not be found, returns nil.
Original signature : -(NSString*)fullPathForApplication:(NSString*)
native declaration : NSWorkspace.h:85


selectFile_inFileViewerRootedAtPath

public abstract boolean selectFile_inFileViewerRootedAtPath(NSString fullPath,
                                                            NSString rootFullPath)
Activate the Finder and open a window selecting the file at the given path. If fullPath is nil, this will instead open the directory specified by rootFullPath, and not select any file.
Original signature : -(BOOL)selectFile:(NSString*) inFileViewerRootedAtPath:(NSString*)
native declaration : NSWorkspace.h:88


activateFileViewerSelectingURLs

public abstract void activateFileViewerSelectingURLs(NSArray fileURLs)
Activate the Finder, and open one or more windows selecting the files at the given fileURLs.
Original signature : -(void)activateFileViewerSelectingURLs:(NSArray*)
native declaration : NSWorkspace.h:91


showSearchResultsForQueryString

public abstract boolean showSearchResultsForQueryString(NSString queryString)
Displays a Spotlight search results window in Finder for the specified query string. Finder becomes the active application, if possible. The user can further refine the search via the Finder UI. Returns YES if the communication with Finder was successful.
Original signature : -(BOOL)showSearchResultsForQueryString:(NSString*)
native declaration : NSWorkspace.h:95


noteFileSystemChanged

public abstract void noteFileSystemChanged(NSString path)
noteFileSystemChanged: informs listeners of a filesystem change, using the FNNotifyByPath() API. As the FNNotify API has been supplanted by the FSEvents API, the use of this method is discouraged.
Original signature : -(void)noteFileSystemChanged:(NSString*)
native declaration : NSWorkspace.h:98


getInfoForFile_application_type

public abstract boolean getInfoForFile_application_type(NSString fullPath,
                                                        PointerByReference appName,
                                                        PointerByReference type)
Get, by reference, the name of the app used to open a file at the given path, and the type of the file. The type of the file will either be a filename extension or an HFS type encoded with NSFileTypeForHFSTypeCode(). Both strings are returned autoreleased. The method returns YES if successful, NO if not.
Original signature : -(BOOL)getInfoForFile:(NSString*) application:(NSString**) type:(NSString**)
native declaration : NSWorkspace.h:101


isFilePackageAtPath

public abstract boolean isFilePackageAtPath(NSString fullPath)
Indicates whether a given directory is a package. Returns YES if the file is a package, NO if not, or if the file does not exist or the operation otherwise failed. A file may be a package because its filename extension indicates so (for example, .framework) or because it has the package bit set.
Original signature : -(BOOL)isFilePackageAtPath:(NSString*)
native declaration : NSWorkspace.h:104


iconForFile

public abstract NSImage iconForFile(NSString fullPath)
Returns the icon for a file at a given path, or a generic icon if the operation fails.
Original signature : -(NSImage*)iconForFile:(NSString*)
native declaration : NSWorkspace.h:107


iconForFiles

public abstract NSImage iconForFiles(NSArray fullPaths)
Returns the icon for a group of files at the given paths.
Original signature : -(NSImage*)iconForFiles:(NSArray*)
native declaration : NSWorkspace.h:110


iconForFileType

public abstract NSImage iconForFileType(NSString fileType)
Get the icon for a given file type. The file type may be a filename extension, or a HFS code encoded via NSFileTypeForHFSTypeCode, or a Universal Type Identifier (UTI). Returns a default icon if the operation fails.
Original signature : -(NSImage*)iconForFileType:(NSString*)
native declaration : NSWorkspace.h:113


setIcon_forFile_options

public abstract boolean setIcon_forFile_options(NSImage image,
                                                NSString fullPath,
                                                int options)
If image is not nil, this sets a custom icon for the file at the given path. If image is nil, this removes any custom icon at the given path. Returns YES if successful, NO if not.
Original signature : -(BOOL)setIcon:(NSImage*) forFile:(NSString*) options:(NSWorkspaceIconCreationOptions)
native declaration : NSWorkspace.h:118

Parameters:
options - @see org.rococoa.cocoa.appkit.AppKitLibrary#NSWorkspaceIconCreationOptions

fileLabels

public abstract NSArray fileLabels()
Get the array of file labels as NSStrings. The file label index for a particular file is available as a property on the URL. You may listen for NSWorkspaceDidChangeFileLabelsNotification to be notified when these change.
Original signature : -(NSArray*)fileLabels
native declaration : NSWorkspace.h:122


fileLabelColors

public abstract NSArray fileLabelColors()
Get the corresponding array of file label colors. This array has the same number of elements as fileLabels, and the color at a given index corresponds to the label at the same index . You may listen for NSWorkspaceDidChangeFileLabelsNotification to be notified when these change.
Original signature : -(NSArray*)fileLabelColors
native declaration : NSWorkspace.h:125


getFileSystemInfoForPath_isRemovable_isWritable_isUnmountable_description_type

public abstract boolean getFileSystemInfoForPath_isRemovable_isWritable_isUnmountable_description_type(NSString fullPath,
                                                                                                       boolean removableFlag,
                                                                                                       boolean writableFlag,
                                                                                                       boolean unmountableFlag,
                                                                                                       PointerByReference description,
                                                                                                       PointerByReference fileSystemType)
Gets information about the filesystem. fullPath is the path to any file or directory on the filesystem, including the filesystem's mount point. The returned values have the following significance:
- isRemovable: whether the filesytem is backed by removable media, such as a CD or floppy disk.
- isWritable: whether the filesystem can be written to
- isUnmountable: whether the filesystem can be unmounted.
- description: typically the type of the volume or the name of the filesystem
- the file system type, for example, 'hfs'
Original signature : -(BOOL)getFileSystemInfoForPath:(NSString*) isRemovable:(BOOL*) isWritable:(BOOL*) isUnmountable:(BOOL*) description:(NSString**) type:(NSString**)
native declaration : NSWorkspace.h:145


performFileOperation_source_destination_files_tag

public abstract boolean performFileOperation_source_destination_files_tag(NSString operation,
                                                                          NSString source,
                                                                          NSString destination,
                                                                          NSArray files,
                                                                          NativeSizeByReference tag)
Performs the given file operation, blocking until complete. source should be the directory containing the file(s). For operations that require a destination, such as Move and Copy, destination should be the destination directory; otherwise it should be nil. files is an array of file names that are in the source directory.
A value is returned by reference in the tag parameter, either 0 for success, or -1 for failure. tag may be NULL.
Original signature : -(BOOL)performFileOperation:(NSString*) source:(NSString*) destination:(NSString*) files:(NSArray*) tag:(NSInteger*)
native declaration : NSWorkspace.h:150


unmountAndEjectDeviceAtPath

public abstract boolean unmountAndEjectDeviceAtPath(NSString path)
Attempt to eject the volume mounted at the given path. Returns YES if successful, NO if not, for example, if the volume is not ejectable.
Original signature : -(BOOL)unmountAndEjectDeviceAtPath:(NSString*)
native declaration : NSWorkspace.h:153


unmountAndEjectDeviceAtURL_error

public abstract boolean unmountAndEjectDeviceAtURL_error(NSURL url,
                                                         PointerByReference error)
Same as unmountAndEjectDeviceAtPath, except it takes an NSURL and returns an NSError.
Original signature : -(BOOL)unmountAndEjectDeviceAtURL:(NSURL*) error:(NSError**)
native declaration : NSWorkspace.h:156


extendPowerOffBy

public abstract NSInteger extendPowerOffBy(NSInteger requested)
extendPowerOffBy: is currently not implemented. Do not use it.
Original signature : -(NSInteger)extendPowerOffBy:(NSInteger)
native declaration : NSWorkspace.h:159


hideOtherApplications

public abstract void hideOtherApplications()
Attempt to hide all other applications.
Original signature : -(void)hideOtherApplications
native declaration : NSWorkspace.h:162


mountedLocalVolumePaths

public abstract NSArray mountedLocalVolumePaths()
Get the mount paths of all local volumes, that is, volumes that are backed by a physical device and are not a network mount.
Original signature : -(NSArray*)mountedLocalVolumePaths
native declaration : NSWorkspace.h:165


mountedRemovableMedia

public abstract NSArray mountedRemovableMedia()
Get the mount paths of all volumes backed by removable media, such as DVDs.
Original signature : -(NSArray*)mountedRemovableMedia
native declaration : NSWorkspace.h:168


URLForApplicationWithBundleIdentifier

public abstract NSURL URLForApplicationWithBundleIdentifier(NSString bundleIdentifier)
Get the URL for the application with the given identifier. This uses various heuristics in case multiple apps have the same bundle ID. This returns nil if no app has the bundle identifier.
Original signature : -(NSURL*)URLForApplicationWithBundleIdentifier:(NSString*)
native declaration : NSWorkspace.h:171


URLForApplicationToOpenURL

public abstract NSURL URLForApplicationToOpenURL(NSURL url)
Returns the URL to the default application that would be used to open the given URL, as if the file were double clicked in the Finder (for file URLs). This returns nil if no app can open it, or if the file does not exist.
Original signature : -(NSURL*)URLForApplicationToOpenURL:(NSURL*)
native declaration : NSWorkspace.h:174


absolutePathForAppBundleWithIdentifier

public abstract NSString absolutePathForAppBundleWithIdentifier(NSString bundleIdentifier)
Get the path for the application with the given identifier. This uses various heuristics in case multiple apps have the same bundle ID.
Original signature : -(NSString*)absolutePathForAppBundleWithIdentifier:(NSString*)
native declaration : NSWorkspace.h:178


launchAppWithBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifier

public abstract boolean launchAppWithBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifier(NSString bundleIdentifier,
                                                                                                              int options,
                                                                                                              NSAppleEventDescriptor descriptor,
                                                                                                              PointerByReference identifier)
The following methods launch an app with the given bundle identifier. The descriptor describes the first AppleEvent to be sent to the process. The launchIdentifier is currently of no significance.
If the application is already running, and NSWorkspaceLaunchNewInstance is not specified in the options, then the descriptor is delivered to the currently running app, and YES is returned.
Original signature : -(BOOL)launchAppWithBundleIdentifier:(NSString*) options:(NSWorkspaceLaunchOptions) additionalEventParamDescriptor:(NSAppleEventDescriptor*) launchIdentifier:(NSNumber**)
native declaration : NSWorkspace.h:183

Parameters:
options - @see org.rococoa.cocoa.appkit.AppKitLibrary#NSWorkspaceLaunchOptions

openURLs_withAppBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifiers

public abstract boolean openURLs_withAppBundleIdentifier_options_additionalEventParamDescriptor_launchIdentifiers(NSArray urls,
                                                                                                                  NSString bundleIdentifier,
                                                                                                                  int options,
                                                                                                                  NSAppleEventDescriptor descriptor,
                                                                                                                  PointerByReference identifiers)
Original signature : -(BOOL)openURLs:(NSArray*) withAppBundleIdentifier:(NSString*) options:(NSWorkspaceLaunchOptions) additionalEventParamDescriptor:(NSAppleEventDescriptor*) launchIdentifiers:(NSArray**)
native declaration : NSWorkspace.h:184

Parameters:
options - @see org.rococoa.cocoa.appkit.AppKitLibrary#NSWorkspaceLaunchOptions

launchedApplications

public abstract NSArray launchedApplications()
Gets an array of NSDictionaries with the above keys. In addition, the NSWorkspaceApplicationKey is provided, and vends an instance of NSRunningApplication. This method does not return applications that are UIElement or BackgroundOnly. To access the entire list of running applications, use the -[NSWorkspace runningApplications] method, declared in NSRunningApplication.h.
Original signature : -(NSArray*)launchedApplications
native declaration : NSWorkspace.h:200


activeApplication

public abstract NSDictionary activeApplication()
Get an NSDictionary representing the currently frontmost app, with the above keys. The NSWorkspaceApplicationKey is also provided.
Original signature : -(NSDictionary*)activeApplication
native declaration : NSWorkspace.h:203


typeOfFile_error

public abstract NSString typeOfFile_error(NSString absoluteFilePath,
                                          PointerByReference outError)
Given an absolute file path, return the uniform type identifier (UTI) of the file, if one can be determined. Otherwise, return nil after setting *outError to an NSError that encapsulates the reason why the file's type could not be determined. If the file at the end of the path is a symbolic link the type of the symbolic link will be returned.
You can invoke this method to get the UTI of an existing file. To get the UTI of a URL, use the NSURLTypeIdentifierKey file system resource key from NSURL.h.
Original signature : -(NSString*)typeOfFile:(NSString*) error:(NSError**)
native declaration : NSWorkspace.h:213


localizedDescriptionForType

public abstract NSString localizedDescriptionForType(NSString typeName)
Given a UTI, return a string that describes the document type and is fit to present to the user, or nil for failure.
You can invoke this method to get the name of a type that must be shown to the user, in an alert about your application's inability to handle the type, for instance.
Original signature : -(NSString*)localizedDescriptionForType:(NSString*)
native declaration : NSWorkspace.h:219


preferredFilenameExtensionForType

public abstract NSString preferredFilenameExtensionForType(NSString typeName)
Given a UTI, return the best file name extension to use when creating a file of that type, or nil for failure.
You can invoke this method when your application has only the base name of a file that's being written and it has to append a file name extension so that the file's type can be reliably identified later on.
Original signature : -(NSString*)preferredFilenameExtensionForType:(NSString*)
native declaration : NSWorkspace.h:225


filenameExtension_isValidForType

public abstract boolean filenameExtension_isValidForType(NSString filenameExtension,
                                                         NSString typeName)
Given a file name extension and a UTI, return YES if the file name extension is a valid tag for the identified type, NO otherwise.
You can invoke this method when your application needs to check if a file name extension can be used to reliably identify the type later on. For example, NSSavePanel uses this method to validate any extension that the user types in the panel's file name field.
Original signature : -(BOOL)filenameExtension:(NSString*) isValidForType:(NSString*)
native declaration : NSWorkspace.h:231


type_conformsToType

public abstract boolean type_conformsToType(NSString firstTypeName,
                                            NSString secondTypeName)
Given two UTIs, return YES if the first "conforms to" to the second in the uniform type identifier hierarchy, NO otherwise. This method will always return YES if the two strings are equal, so you can also use it with other kinds of type name, including those declared in CFBundleTypeName Info.plist entries in apps that don't take advantage of the support for UTIs that was added to Cocoa in Mac OS 10.5.
You can invoke this method when your application must determine whether it can handle a file of a known type, returned by -typeOfFile:error: for instance.
Use this method instead of merely comparing UTIs for equality.
Original signature : -(BOOL)type:(NSString*) conformsToType:(NSString*)
native declaration : NSWorkspace.h:239


alloc

public static NSWorkspace alloc()

new_

public static NSWorkspace new_()

getNSClass

public static NSWorkspace._class_ getNSClass()


Copyright © 2009. All Rights Reserved.