diff dwt/internal/cocoa/NSWorkspace.d @ 1:8b48be5454ce

The internal cocoa classes compile now
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Tue, 19 Aug 2008 17:35:17 +0200
parents 380af2bdd8e5
children f565d3a95c0a
line wrap: on
line diff
--- a/dwt/internal/cocoa/NSWorkspace.d	Sat Aug 09 17:00:02 2008 +0200
+++ b/dwt/internal/cocoa/NSWorkspace.d	Tue Aug 19 17:35:17 2008 +0200
@@ -78,46 +78,46 @@
 
     public NSString absolutePathForAppBundleWithIdentifier (NSString bundleIdentifier)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_absolutePathForAppBundleWithIdentifier_1,
-                bundleIdentifier !is null ? bundleIdentifier.id : null);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_absolutePathForAppBundleWithIdentifier_1,
+                bundleIdentifier !is null ? bundleIdentifier.id_ : null);
         return result !is null ? new NSString(result) : null;
     }
 
     public NSDictionary activeApplication ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_activeApplication);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_activeApplication);
         return result !is null ? new NSDictionary(result) : null;
     }
 
     public void checkForRemovableMedia ()
     {
-        OS.objc_msgSend(this.id, OS.sel_checkForRemovableMedia);
+        OS.objc_msgSend(this.id_, OS.sel_checkForRemovableMedia);
     }
 
     public NSInteger extendPowerOffBy (NSInteger requested)
     {
-        return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_extendPowerOffBy_1, requested);
+        return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_extendPowerOffBy_1, requested);
     }
 
     public bool fileSystemChanged ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_fileSystemChanged) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_fileSystemChanged) !is null;
     }
 
     public bool filenameExtension (NSString filenameExtension, NSString typeName)
     {
-        return OS.objc_msgSend(this.id, OS.sel_filenameExtension_1isValidForType_1, filenameExtension !is null ? filenameExtension.id : null,
-                typeName !is null ? typeName.id : null) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_filenameExtension_1isValidForType_1, filenameExtension !is null ? filenameExtension.id_ : null,
+                typeName !is null ? typeName.id_ : null) !is null;
     }
 
     public void findApplications ()
     {
-        OS.objc_msgSend(this.id, OS.sel_findApplications);
+        OS.objc_msgSend(this.id_, OS.sel_findApplications);
     }
 
     public NSString fullPathForApplication (NSString appName)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_fullPathForApplication_1, appName !is null ? appName.id : null);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_fullPathForApplication_1, appName !is null ? appName.id_ : null);
         return result !is null ? new NSString(result) : null;
     }
 
@@ -125,173 +125,173 @@
     /*NSString** */objc.id** description,
     /*NSString** */objc.id** fileSystemType)
     {
-        return OS.objc_msgSend(this.id, OS.sel_getFileSystemInfoForPath_1isRemovable_1isWritable_1isUnmountable_1description_1type_1,
-                fullPath !is null ? fullPath.id : null, removableFlag, writableFlag, unmountableFlag, description, fileSystemType) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_getFileSystemInfoForPath_1isRemovable_1isWritable_1isUnmountable_1description_1type_1,
+                fullPath !is null ? fullPath.id_ : null, removableFlag, writableFlag, unmountableFlag, description, fileSystemType) !is null;
     }
 
     public bool getInfoForFile (NSString fullPath, /*NSString** */objc.id** appName, /*NSString** */objc.id** type)
     {
-        return OS.objc_msgSend(this.id, OS.sel_getInfoForFile_1application_1type_1, fullPath !is null ? fullPath.id : null, appName, type) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_getInfoForFile_1application_1type_1, fullPath !is null ? fullPath.id_ : null, appName, type) !is null;
     }
 
     public void hideOtherApplications ()
     {
-        OS.objc_msgSend(this.id, OS.sel_hideOtherApplications);
+        OS.objc_msgSend(this.id_, OS.sel_hideOtherApplications);
     }
 
     public NSImage iconForFile (NSString fullPath)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_iconForFile_1, fullPath !is null ? fullPath.id : null);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_iconForFile_1, fullPath !is null ? fullPath.id_ : null);
         return result !is null ? new NSImage(result) : null;
     }
 
     public NSImage iconForFileType (NSString fileType)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_iconForFileType_1, fileType !is null ? fileType.id : null);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_iconForFileType_1, fileType !is null ? fileType.id_ : null);
         return result !is null ? new NSImage(result) : null;
     }
 
     public NSImage iconForFiles (NSArray fullPaths)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_iconForFiles_1, fullPaths !is null ? fullPaths.id : null);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_iconForFiles_1, fullPaths !is null ? fullPaths.id_ : null);
         return result !is null ? new NSImage(result) : null;
     }
 
     public bool isFilePackageAtPath (NSString fullPath)
     {
-        return OS.objc_msgSend(this.id, OS.sel_isFilePackageAtPath_1, fullPath !is null ? fullPath.id : null) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_isFilePackageAtPath_1, fullPath !is null ? fullPath.id_ : null) !is null;
     }
 
     public bool launchAppWithBundleIdentifier (NSString bundleIdentifier, NSWorkspaceLaunchOptions options, NSAppleEventDescriptor descriptor,
     /*NSNumber** */objc.id** identifier)
     {
-        return OS.objc_msgSend(this.id, OS.sel_launchAppWithBundleIdentifier_1options_1additionalEventParamDescriptor_1launchIdentifier_1,
-                bundleIdentifier !is null ? bundleIdentifier.id : null, options, descriptor !is null ? descriptor.id : null, identifier) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_launchAppWithBundleIdentifier_1options_1additionalEventParamDescriptor_1launchIdentifier_1,
+                bundleIdentifier !is null ? bundleIdentifier.id_ : null, options, descriptor !is null ? descriptor.id_ : null, identifier) !is null;
     }
 
     public bool launchApplication_ (NSString appName)
     {
-        return OS.objc_msgSend(this.id, OS.sel_launchApplication_1, appName !is null ? appName.id : null) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_launchApplication_1, appName !is null ? appName.id_ : null) !is null;
     }
 
     public bool launchApplication_showIcon_autolaunch_ (NSString appName, bool showIcon, bool autolaunch)
     {
-        return OS.objc_msgSend(this.id, OS.sel_launchApplication_1showIcon_1autolaunch_1, appName !is null ? appName.id : null, showIcon, autolaunch) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_launchApplication_1showIcon_1autolaunch_1, appName !is null ? appName.id_ : null, showIcon, autolaunch) !is null;
     }
 
     public NSArray launchedApplications ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_launchedApplications);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_launchedApplications);
         return result !is null ? new NSArray(result) : null;
     }
 
     public NSString localizedDescriptionForType (NSString typeName)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_localizedDescriptionForType_1, typeName !is null ? typeName.id : null);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedDescriptionForType_1, typeName !is null ? typeName.id_ : null);
         return result !is null ? new NSString(result) : null;
     }
 
     public NSArray mountNewRemovableMedia ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_mountNewRemovableMedia);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mountNewRemovableMedia);
         return result !is null ? new NSArray(result) : null;
     }
 
     public NSArray mountedLocalVolumePaths ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_mountedLocalVolumePaths);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mountedLocalVolumePaths);
         return result !is null ? new NSArray(result) : null;
     }
 
     public NSArray mountedRemovableMedia ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_mountedRemovableMedia);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_mountedRemovableMedia);
         return result !is null ? new NSArray(result) : null;
     }
 
     public void noteFileSystemChanged ()
     {
-        OS.objc_msgSend(this.id, OS.sel_noteFileSystemChanged);
+        OS.objc_msgSend(this.id_, OS.sel_noteFileSystemChanged);
     }
 
     public void noteFileSystemChanged_ (NSString path)
     {
-        OS.objc_msgSend(this.id, OS.sel_noteFileSystemChanged_1, path !is null ? path.id : null);
+        OS.objc_msgSend(this.id_, OS.sel_noteFileSystemChanged_1, path !is null ? path.id_ : null);
     }
 
     public void noteUserDefaultsChanged ()
     {
-        OS.objc_msgSend(this.id, OS.sel_noteUserDefaultsChanged);
+        OS.objc_msgSend(this.id_, OS.sel_noteUserDefaultsChanged);
     }
 
     public NSNotificationCenter notificationCenter ()
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_notificationCenter);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_notificationCenter);
         return result !is null ? new NSNotificationCenter(result) : null;
     }
 
     public bool openFile_ (NSString fullPath)
     {
-        return OS.objc_msgSend(this.id, OS.sel_openFile_1, fullPath !is null ? fullPath.id : null) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_openFile_1, fullPath !is null ? fullPath.id_ : null) !is null;
     }
 
     public bool openFile_fromImage_at_inView_ (NSString fullPath, NSImage anImage, NSPoint point, NSView aView)
     {
-        return OS.objc_msgSend(this.id, OS.sel_openFile_1fromImage_1at_1inView_1, fullPath !is null ? fullPath.id : null,
-                anImage !is null ? anImage.id : null, point, aView !is null ? aView.id : null) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_openFile_1fromImage_1at_1inView_1, fullPath !is null ? fullPath.id_ : null,
+                anImage !is null ? anImage.id_ : null, point, aView !is null ? aView.id_ : null) !is null;
     }
 
     public bool openFile_withApplication_ (NSString fullPath, NSString appName)
     {
-        return OS.objc_msgSend(this.id, OS.sel_openFile_1withApplication_1, fullPath !is null ? fullPath.id : null,
-                appName !is null ? appName.id : null) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_openFile_1withApplication_1, fullPath !is null ? fullPath.id_ : null,
+                appName !is null ? appName.id_ : null) !is null;
     }
 
     public bool openFile_withApplication_andDeactivate_ (NSString fullPath, NSString appName, bool flag)
     {
-        return OS.objc_msgSend(this.id, OS.sel_openFile_1withApplication_1andDeactivate_1, fullPath !is null ? fullPath.id : null,
-                appName !is null ? appName.id : null, flag) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_openFile_1withApplication_1andDeactivate_1, fullPath !is null ? fullPath.id_ : null,
+                appName !is null ? appName.id_ : null, flag) !is null;
     }
 
     public bool openTempFile (NSString fullPath)
     {
-        return OS.objc_msgSend(this.id, OS.sel_openTempFile_1, fullPath !is null ? fullPath.id : null) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_openTempFile_1, fullPath !is null ? fullPath.id_ : null) !is null;
     }
 
     public bool openURL (NSURL url)
     {
-        return OS.objc_msgSend(this.id, OS.sel_openURL_1, url !is null ? url.id : null) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_openURL_1, url !is null ? url.id_ : null) !is null;
     }
 
     public bool openURLs (NSArray urls, NSString bundleIdentifier, NSWorkspaceLaunchOptions options, NSAppleEventDescriptor descriptor,
             /*NSArray** */objc.id** identifiers)
     {
-        return OS.objc_msgSend(this.id, OS.sel_openURLs_1withAppBundleIdentifier_1options_1additionalEventParamDescriptor_1launchIdentifiers_1,
-                urls !is null ? urls.id : null, bundleIdentifier !is null ? bundleIdentifier.id : null, options,
-                descriptor !is null ? descriptor.id : null, identifiers) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_openURLs_1withAppBundleIdentifier_1options_1additionalEventParamDescriptor_1launchIdentifiers_1,
+                urls !is null ? urls.id_ : null, bundleIdentifier !is null ? bundleIdentifier.id_ : null, options,
+                descriptor !is null ? descriptor.id_ : null, identifiers) !is null;
     }
 
     public bool performFileOperation (NSString operation, NSString source, NSString destination, NSArray files, NSInteger* tag)
     {
-        return OS.objc_msgSend(this.id, OS.sel_performFileOperation_1source_1destination_1files_1tag_1, operation !is null ? operation.id : null,
-                source !is null ? source.id : null, destination !is null ? destination.id : null, files !is null ? files.id : null, tag) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_performFileOperation_1source_1destination_1files_1tag_1, operation !is null ? operation.id_ : null,
+                source !is null ? source.id_ : null, destination !is null ? destination.id_ : null, files !is null ? files.id_ : null, tag) !is null;
     }
 
     public NSString preferredFilenameExtensionForType (NSString typeName)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_preferredFilenameExtensionForType_1, typeName !is null ? typeName.id : null);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_preferredFilenameExtensionForType_1, typeName !is null ? typeName.id_ : null);
         return result !is null ? new NSString(result) : null;
     }
 
     public bool selectFile (NSString fullPath, NSString rootFullpath)
     {
-        return OS.objc_msgSend(this.id, OS.sel_selectFile_1inFileViewerRootedAtPath_1, fullPath !is null ? fullPath.id : null,
-                rootFullpath !is null ? rootFullpath.id : null) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_selectFile_1inFileViewerRootedAtPath_1, fullPath !is null ? fullPath.id_ : null,
+                rootFullpath !is null ? rootFullpath.id_ : null) !is null;
     }
 
     public bool setIcon (NSImage image, NSString fullPath, NSWorkspaceIconCreationOptions options)
     {
-        return OS.objc_msgSend(this.id, OS.sel_setIcon_1forFile_1options_1, image !is null ? image.id : null, fullPath !is null ? fullPath.id : null,
+        return OS.objc_msgSend(this.id_, OS.sel_setIcon_1forFile_1options_1, image !is null ? image.id_ : null, fullPath !is null ? fullPath.id_ : null,
                 options) !is null;
     }
 
@@ -303,29 +303,29 @@
 
     public void slideImage (NSImage image, NSPoint fromPoint, NSPoint toPoint)
     {
-        OS.objc_msgSend(this.id, OS.sel_slideImage_1from_1to_1, image !is null ? image.id : null, fromPoint, toPoint);
+        OS.objc_msgSend(this.id_, OS.sel_slideImage_1from_1to_1, image !is null ? image.id_ : null, fromPoint, toPoint);
     }
 
     public bool type (NSString firstTypeName, NSString secondTypeName)
     {
-        return OS.objc_msgSend(this.id, OS.sel_type_1conformsToType_1, firstTypeName !is null ? firstTypeName.id : null,
-                secondTypeName !is null ? secondTypeName.id : null) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_type_1conformsToType_1, firstTypeName !is null ? firstTypeName.id_ : null,
+                secondTypeName !is null ? secondTypeName.id_ : null) !is null;
     }
 
     public NSString typeOfFile (NSString absoluteFilePath, /*NSError** */objc.id** outError)
     {
-        objc.id result = OS.objc_msgSend(this.id, OS.sel_typeOfFile_1error_1, absoluteFilePath !is null ? absoluteFilePath.id : null, outError);
+        objc.id result = OS.objc_msgSend(this.id_, OS.sel_typeOfFile_1error_1, absoluteFilePath !is null ? absoluteFilePath.id_ : null, outError);
         return result !is null ? new NSString(result) : null;
     }
 
     public bool unmountAndEjectDeviceAtPath (NSString path)
     {
-        return OS.objc_msgSend(this.id, OS.sel_unmountAndEjectDeviceAtPath_1, path !is null ? path.id : null) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_unmountAndEjectDeviceAtPath_1, path !is null ? path.id_ : null) !is null;
     }
 
     public bool userDefaultsChanged ()
     {
-        return OS.objc_msgSend(this.id, OS.sel_userDefaultsChanged) !is null;
+        return OS.objc_msgSend(this.id_, OS.sel_userDefaultsChanged) !is null;
     }
 
 }