blob: 4c24e52fc7abc78bdb0a29b5c65e5ab10b2c7fd1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/*******************************************************************************
* Copyright (c) 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.swt.internal.cocoa;
public class NSPipe extends NSObject {
public NSPipe() {
super();
}
public NSPipe(int id) {
super(id);
}
public NSFileHandle fileHandleForReading() {
int result = OS.objc_msgSend(this.id, OS.sel_fileHandleForReading);
return result != 0 ? new NSFileHandle(result) : null;
}
public NSFileHandle fileHandleForWriting() {
int result = OS.objc_msgSend(this.id, OS.sel_fileHandleForWriting);
return result != 0 ? new NSFileHandle(result) : null;
}
public static id pipe() {
int result = OS.objc_msgSend(OS.class_NSPipe, OS.sel_pipe);
return result != 0 ? new id(result) : null;
}
}
|