diff options
author | Felipe Heidrich <fheidric> | 2007-11-15 17:03:53 +0000 |
---|---|---|
committer | Felipe Heidrich <fheidric> | 2007-11-15 17:03:53 +0000 |
commit | ee37eed09abf2b304605b7bd7be15ba102d37b58 (patch) | |
tree | 5ff8b26c4b049d7c8b7e66827f50afece3bbd7e4 /bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTask.java | |
parent | 4eb84c684bfa237dcce3337cdcdd67ab82c88da5 (diff) | |
download | eclipse.platform.swt-ee37eed09abf2b304605b7bd7be15ba102d37b58.tar.gz eclipse.platform.swt-ee37eed09abf2b304605b7bd7be15ba102d37b58.tar.xz eclipse.platform.swt-ee37eed09abf2b304605b7bd7be15ba102d37b58.zip |
cocoa merge
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTask.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTask.java | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTask.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTask.java new file mode 100644 index 0000000000..b499abc685 --- /dev/null +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTask.java @@ -0,0 +1,117 @@ +package org.eclipse.swt.internal.cocoa; + +public class NSTask extends NSObject { + +public NSTask() { + super(); +} + +public NSTask(int id) { + super(id); +} + +public NSArray arguments() { + int result = OS.objc_msgSend(this.id, OS.sel_arguments); + return result != 0 ? new NSArray(result) : null; +} + +public NSString currentDirectoryPath() { + int result = OS.objc_msgSend(this.id, OS.sel_currentDirectoryPath); + return result != 0 ? new NSString(result) : null; +} + +public NSDictionary environment() { + int result = OS.objc_msgSend(this.id, OS.sel_environment); + return result != 0 ? new NSDictionary(result) : null; +} + +public void interrupt() { + OS.objc_msgSend(this.id, OS.sel_interrupt); +} + +public boolean isRunning() { + return OS.objc_msgSend(this.id, OS.sel_isRunning) != 0; +} + +public void launch() { + OS.objc_msgSend(this.id, OS.sel_launch); +} + +public NSString launchPath() { + int result = OS.objc_msgSend(this.id, OS.sel_launchPath); + return result != 0 ? new NSString(result) : null; +} + +public static NSTask launchedTaskWithLaunchPath(NSString path, NSArray arguments) { + int result = OS.objc_msgSend(OS.class_NSTask, OS.sel_launchedTaskWithLaunchPath_1arguments_1, path != null ? path.id : 0, arguments != null ? arguments.id : 0); + return result != 0 ? new NSTask(result) : null; +} + +public int processIdentifier() { + return OS.objc_msgSend(this.id, OS.sel_processIdentifier); +} + +public boolean resume() { + return OS.objc_msgSend(this.id, OS.sel_resume) != 0; +} + +public void setArguments(NSArray arguments) { + OS.objc_msgSend(this.id, OS.sel_setArguments_1, arguments != null ? arguments.id : 0); +} + +public void setCurrentDirectoryPath(NSString path) { + OS.objc_msgSend(this.id, OS.sel_setCurrentDirectoryPath_1, path != null ? path.id : 0); +} + +public void setEnvironment(NSDictionary dict) { + OS.objc_msgSend(this.id, OS.sel_setEnvironment_1, dict != null ? dict.id : 0); +} + +public void setLaunchPath(NSString path) { + OS.objc_msgSend(this.id, OS.sel_setLaunchPath_1, path != null ? path.id : 0); +} + +public void setStandardError(id error) { + OS.objc_msgSend(this.id, OS.sel_setStandardError_1, error != null ? error.id : 0); +} + +public void setStandardInput(id input) { + OS.objc_msgSend(this.id, OS.sel_setStandardInput_1, input != null ? input.id : 0); +} + +public void setStandardOutput(id output) { + OS.objc_msgSend(this.id, OS.sel_setStandardOutput_1, output != null ? output.id : 0); +} + +public id standardError() { + int result = OS.objc_msgSend(this.id, OS.sel_standardError); + return result != 0 ? new id(result) : null; +} + +public id standardInput() { + int result = OS.objc_msgSend(this.id, OS.sel_standardInput); + return result != 0 ? new id(result) : null; +} + +public id standardOutput() { + int result = OS.objc_msgSend(this.id, OS.sel_standardOutput); + return result != 0 ? new id(result) : null; +} + +public boolean suspend() { + return OS.objc_msgSend(this.id, OS.sel_suspend) != 0; +} + +public void terminate() { + OS.objc_msgSend(this.id, OS.sel_terminate); +} + +public int terminationStatus() { + return OS.objc_msgSend(this.id, OS.sel_terminationStatus); +} + +public void waitUntilExit() { + OS.objc_msgSend(this.id, OS.sel_waitUntilExit); +} + +} |