comparison dwt/internal/cocoa/NSStream.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
comparison
equal deleted inserted replaced
0:380af2bdd8e5 1:8b48be5454ce
80 super(id); 80 super(id);
81 } 81 }
82 82
83 public void close () 83 public void close ()
84 { 84 {
85 OS.objc_msgSend(this.id, OS.sel_close); 85 OS.objc_msgSend(this.id_, OS.sel_close);
86 } 86 }
87 87
88 public id delegatee () 88 public id delegatee ()
89 { 89 {
90 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); 90 objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
91 return result !is null ? new id(result) : null; 91 return result !is null ? new id(result) : null;
92 } 92 }
93 93
94 public static void getStreamsToHost (NSHost host, NSInteger port, /*NSInputStream** */objc.id** inputStream, 94 public static void getStreamsToHost (NSHost host, NSInteger port, /*NSInputStream** */objc.id** inputStream,
95 /*NSOutputStream** */objc.id** outputStream) 95 /*NSOutputStream** */objc.id** outputStream)
96 { 96 {
97 OS.objc_msgSend(OS.class_NSStream, OS.sel_getStreamsToHost_1port_1inputStream_1outputStream_1, host !is null ? host.id : null, port, 97 OS.objc_msgSend(OS.class_NSStream, OS.sel_getStreamsToHost_1port_1inputStream_1outputStream_1, host !is null ? host.id_ : null, port,
98 inputStream, outputStream); 98 inputStream, outputStream);
99 } 99 }
100 100
101 public void open () 101 public void open ()
102 { 102 {
103 OS.objc_msgSend(this.id, OS.sel_open); 103 OS.objc_msgSend(this.id_, OS.sel_open);
104 } 104 }
105 105
106 public id propertyForKey (NSString key) 106 public id propertyForKey (NSString key)
107 { 107 {
108 objc.id result = OS.objc_msgSend(this.id, OS.sel_propertyForKey_1, key !is null ? key.id : null); 108 objc.id result = OS.objc_msgSend(this.id_, OS.sel_propertyForKey_1, key !is null ? key.id_ : null);
109 return result !is null ? new id(result) : null; 109 return result !is null ? new id(result) : null;
110 } 110 }
111 111
112 public void removeFromRunLoop (NSRunLoop aRunLoop, NSString mode) 112 public void removeFromRunLoop (NSRunLoop aRunLoop, NSString mode)
113 { 113 {
114 OS.objc_msgSend(this.id, OS.sel_removeFromRunLoop_1forMode_1, aRunLoop !is null ? aRunLoop.id : null, mode !is null ? mode.id : null); 114 OS.objc_msgSend(this.id_, OS.sel_removeFromRunLoop_1forMode_1, aRunLoop !is null ? aRunLoop.id_ : null, mode !is null ? mode.id_ : null);
115 } 115 }
116 116
117 public void scheduleInRunLoop (NSRunLoop aRunLoop, NSString mode) 117 public void scheduleInRunLoop (NSRunLoop aRunLoop, NSString mode)
118 { 118 {
119 OS.objc_msgSend(this.id, OS.sel_scheduleInRunLoop_1forMode_1, aRunLoop !is null ? aRunLoop.id : null, mode !is null ? mode.id : null); 119 OS.objc_msgSend(this.id_, OS.sel_scheduleInRunLoop_1forMode_1, aRunLoop !is null ? aRunLoop.id_ : null, mode !is null ? mode.id_ : null);
120 } 120 }
121 121
122 public void setDelegate (id delegatee) 122 public void setDelegate (id delegatee)
123 { 123 {
124 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id : null); 124 OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, delegatee !is null ? delegatee.id_ : null);
125 } 125 }
126 126
127 public bool setProperty (id property, NSString key) 127 public bool setProperty (id property, NSString key)
128 { 128 {
129 return OS.objc_msgSend(this.id, OS.sel_setProperty_1forKey_1, property !is null ? property.id : null, key !is null ? key.id : null) !is null; 129 return OS.objc_msgSend(this.id_, OS.sel_setProperty_1forKey_1, property !is null ? property.id_ : null, key !is null ? key.id_ : null) !is null;
130 } 130 }
131 131
132 public NSError streamError () 132 public NSError streamError ()
133 { 133 {
134 objc.id result = OS.objc_msgSend(this.id, OS.sel_streamError); 134 objc.id result = OS.objc_msgSend(this.id_, OS.sel_streamError);
135 return result !is null ? new NSError(result) : null; 135 return result !is null ? new NSError(result) : null;
136 } 136 }
137 137
138 public NSStreamStatus streamStatus () 138 public NSStreamStatus streamStatus ()
139 { 139 {
140 return cast(NSStreamStatus) OS.objc_msgSend(this.id, OS.sel_streamStatus); 140 return cast(NSStreamStatus) OS.objc_msgSend(this.id_, OS.sel_streamStatus);
141 } 141 }
142 142
143 } 143 }