Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSURL.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 |
---|---|
35 super(id); | 35 super(id); |
36 } | 36 } |
37 | 37 |
38 public NSURLHandle URLHandleUsingCache (bool shouldUseCache) | 38 public NSURLHandle URLHandleUsingCache (bool shouldUseCache) |
39 { | 39 { |
40 objc.id result = OS.objc_msgSend(this.id, OS.sel_URLHandleUsingCache_1, shouldUseCache); | 40 objc.id result = OS.objc_msgSend(this.id_, OS.sel_URLHandleUsingCache_1, shouldUseCache); |
41 return result !is null ? new NSURLHandle(result) : null; | 41 return result !is null ? new NSURLHandle(result) : null; |
42 } | 42 } |
43 | 43 |
44 public static NSURL static_URLWithString_ (NSString URLString) | 44 public static NSURL static_URLWithString_ (NSString URLString) |
45 { | 45 { |
46 objc.id result = OS.objc_msgSend(OS.class_NSURL, OS.sel_URLWithString_1, URLString !is null ? URLString.id : null); | 46 objc.id result = OS.objc_msgSend(OS.class_NSURL, OS.sel_URLWithString_1, URLString !is null ? URLString.id_ : null); |
47 return result !is null ? new NSURL(result) : null; | 47 return result !is null ? new NSURL(result) : null; |
48 } | 48 } |
49 | 49 |
50 public static id static_URLWithString_relativeToURL_ (NSString URLString, NSURL baseURL) | 50 public static id static_URLWithString_relativeToURL_ (NSString URLString, NSURL baseURL) |
51 { | 51 { |
52 objc.id result = OS.objc_msgSend(OS.class_NSURL, OS.sel_URLWithString_1relativeToURL_1, URLString !is null ? URLString.id : null, | 52 objc.id result = OS.objc_msgSend(OS.class_NSURL, OS.sel_URLWithString_1relativeToURL_1, URLString !is null ? URLString.id_ : null, |
53 baseURL !is null ? baseURL.id : null); | 53 baseURL !is null ? baseURL.id_ : null); |
54 return result !is null ? new id(result) : null; | 54 return result !is null ? new id(result) : null; |
55 } | 55 } |
56 | 56 |
57 public NSString absoluteString () | 57 public NSString absoluteString () |
58 { | 58 { |
59 objc.id result = OS.objc_msgSend(this.id, OS.sel_absoluteString); | 59 objc.id result = OS.objc_msgSend(this.id_, OS.sel_absoluteString); |
60 return result !is null ? new NSString(result) : null; | 60 return result !is null ? new NSString(result) : null; |
61 } | 61 } |
62 | 62 |
63 public NSURL absoluteURL () | 63 public NSURL absoluteURL () |
64 { | 64 { |
65 objc.id result = OS.objc_msgSend(this.id, OS.sel_absoluteURL); | 65 objc.id result = OS.objc_msgSend(this.id_, OS.sel_absoluteURL); |
66 return result is this.id ? this : (result !is null ? new NSURL(result) : null); | 66 return result is this.id_ ? this : (result !is null ? new NSURL(result) : null); |
67 } | 67 } |
68 | 68 |
69 public NSURL baseURL () | 69 public NSURL baseURL () |
70 { | 70 { |
71 objc.id result = OS.objc_msgSend(this.id, OS.sel_baseURL); | 71 objc.id result = OS.objc_msgSend(this.id_, OS.sel_baseURL); |
72 return result is this.id ? this : (result !is null ? new NSURL(result) : null); | 72 return result is this.id_ ? this : (result !is null ? new NSURL(result) : null); |
73 } | 73 } |
74 | 74 |
75 public static NSURL static_fileURLWithPath_ (NSString path) | 75 public static NSURL static_fileURLWithPath_ (NSString path) |
76 { | 76 { |
77 objc.id result = OS.objc_msgSend(OS.class_NSURL, OS.sel_fileURLWithPath_1, path !is null ? path.id : null); | 77 objc.id result = OS.objc_msgSend(OS.class_NSURL, OS.sel_fileURLWithPath_1, path !is null ? path.id_ : null); |
78 return result !is null ? new NSURL(result) : null; | 78 return result !is null ? new NSURL(result) : null; |
79 } | 79 } |
80 | 80 |
81 public static id static_fileURLWithPath_isDirectory_ (NSString path, bool isDir) | 81 public static id static_fileURLWithPath_isDirectory_ (NSString path, bool isDir) |
82 { | 82 { |
83 objc.id result = OS.objc_msgSend(OS.class_NSURL, OS.sel_fileURLWithPath_1isDirectory_1, path !is null ? path.id : null, isDir); | 83 objc.id result = OS.objc_msgSend(OS.class_NSURL, OS.sel_fileURLWithPath_1isDirectory_1, path !is null ? path.id_ : null, isDir); |
84 return result !is null ? new id(result) : null; | 84 return result !is null ? new id(result) : null; |
85 } | 85 } |
86 | 86 |
87 public NSString fragment () | 87 public NSString fragment () |
88 { | 88 { |
89 objc.id result = OS.objc_msgSend(this.id, OS.sel_fragment); | 89 objc.id result = OS.objc_msgSend(this.id_, OS.sel_fragment); |
90 return result !is null ? new NSString(result) : null; | 90 return result !is null ? new NSString(result) : null; |
91 } | 91 } |
92 | 92 |
93 public NSString host () | 93 public NSString host () |
94 { | 94 { |
95 objc.id result = OS.objc_msgSend(this.id, OS.sel_host); | 95 objc.id result = OS.objc_msgSend(this.id_, OS.sel_host); |
96 return result !is null ? new NSString(result) : null; | 96 return result !is null ? new NSString(result) : null; |
97 } | 97 } |
98 | 98 |
99 public id initFileURLWithPath_ (NSString path) | 99 public id initFileURLWithPath_ (NSString path) |
100 { | 100 { |
101 objc.id result = OS.objc_msgSend(this.id, OS.sel_initFileURLWithPath_1, path !is null ? path.id : null); | 101 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initFileURLWithPath_1, path !is null ? path.id_ : null); |
102 return result !is null ? new id(result) : null; | 102 return result !is null ? new id(result) : null; |
103 } | 103 } |
104 | 104 |
105 public id initFileURLWithPath_isDirectory_ (NSString path, bool isDir) | 105 public id initFileURLWithPath_isDirectory_ (NSString path, bool isDir) |
106 { | 106 { |
107 objc.id result = OS.objc_msgSend(this.id, OS.sel_initFileURLWithPath_1isDirectory_1, path !is null ? path.id : null, isDir); | 107 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initFileURLWithPath_1isDirectory_1, path !is null ? path.id_ : null, isDir); |
108 return result !is null ? new id(result) : null; | 108 return result !is null ? new id(result) : null; |
109 } | 109 } |
110 | 110 |
111 public id initWithScheme (NSString scheme, NSString host, NSString path) | 111 public id initWithScheme (NSString scheme, NSString host, NSString path) |
112 { | 112 { |
113 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithScheme_1host_1path_1, scheme !is null ? scheme.id : null, | 113 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithScheme_1host_1path_1, scheme !is null ? scheme.id_ : null, |
114 host !is null ? host.id : null, path !is null ? path.id : null); | 114 host !is null ? host.id_ : null, path !is null ? path.id_ : null); |
115 return result !is null ? new id(result) : null; | 115 return result !is null ? new id(result) : null; |
116 } | 116 } |
117 | 117 |
118 public id initWithString_ (NSString URLString) | 118 public id initWithString_ (NSString URLString) |
119 { | 119 { |
120 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithString_1, URLString !is null ? URLString.id : null); | 120 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1, URLString !is null ? URLString.id_ : null); |
121 return result !is null ? new id(result) : null; | 121 return result !is null ? new id(result) : null; |
122 } | 122 } |
123 | 123 |
124 public id initWithString_relativeToURL_ (NSString URLString, NSURL baseURL) | 124 public id initWithString_relativeToURL_ (NSString URLString, NSURL baseURL) |
125 { | 125 { |
126 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithString_1relativeToURL_1, URLString !is null ? URLString.id : null, | 126 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1relativeToURL_1, URLString !is null ? URLString.id_ : null, |
127 baseURL !is null ? baseURL.id : null); | 127 baseURL !is null ? baseURL.id_ : null); |
128 return result !is null ? new id(result) : null; | 128 return result !is null ? new id(result) : null; |
129 } | 129 } |
130 | 130 |
131 public bool isFileURL () | 131 public bool isFileURL () |
132 { | 132 { |
133 return OS.objc_msgSend(this.id, OS.sel_isFileURL) !is null; | 133 return OS.objc_msgSend(this.id_, OS.sel_isFileURL) !is null; |
134 } | 134 } |
135 | 135 |
136 public void loadResourceDataNotifyingClient (id client, bool shouldUseCache) | 136 public void loadResourceDataNotifyingClient (id client, bool shouldUseCache) |
137 { | 137 { |
138 OS.objc_msgSend(this.id, OS.sel_loadResourceDataNotifyingClient_1usingCache_1, client !is null ? client.id : null, shouldUseCache); | 138 OS.objc_msgSend(this.id_, OS.sel_loadResourceDataNotifyingClient_1usingCache_1, client !is null ? client.id_ : null, shouldUseCache); |
139 } | 139 } |
140 | 140 |
141 public NSString parameterString () | 141 public NSString parameterString () |
142 { | 142 { |
143 objc.id result = OS.objc_msgSend(this.id, OS.sel_parameterString); | 143 objc.id result = OS.objc_msgSend(this.id_, OS.sel_parameterString); |
144 return result !is null ? new NSString(result) : null; | 144 return result !is null ? new NSString(result) : null; |
145 } | 145 } |
146 | 146 |
147 public NSString password () | 147 public NSString password () |
148 { | 148 { |
149 objc.id result = OS.objc_msgSend(this.id, OS.sel_password); | 149 objc.id result = OS.objc_msgSend(this.id_, OS.sel_password); |
150 return result !is null ? new NSString(result) : null; | 150 return result !is null ? new NSString(result) : null; |
151 } | 151 } |
152 | 152 |
153 public NSString path () | 153 public NSString path () |
154 { | 154 { |
155 objc.id result = OS.objc_msgSend(this.id, OS.sel_path); | 155 objc.id result = OS.objc_msgSend(this.id_, OS.sel_path); |
156 return result !is null ? new NSString(result) : null; | 156 return result !is null ? new NSString(result) : null; |
157 } | 157 } |
158 | 158 |
159 public NSNumber port () | 159 public NSNumber port () |
160 { | 160 { |
161 objc.id result = OS.objc_msgSend(this.id, OS.sel_port); | 161 objc.id result = OS.objc_msgSend(this.id_, OS.sel_port); |
162 return result !is null ? new NSNumber(result) : null; | 162 return result !is null ? new NSNumber(result) : null; |
163 } | 163 } |
164 | 164 |
165 public id propertyForKey (NSString propertyKey) | 165 public id propertyForKey (NSString propertyKey) |
166 { | 166 { |
167 objc.id result = OS.objc_msgSend(this.id, OS.sel_propertyForKey_1, propertyKey !is null ? propertyKey.id : null); | 167 objc.id result = OS.objc_msgSend(this.id_, OS.sel_propertyForKey_1, propertyKey !is null ? propertyKey.id_ : null); |
168 return result !is null ? new id(result) : null; | 168 return result !is null ? new id(result) : null; |
169 } | 169 } |
170 | 170 |
171 public NSString query () | 171 public NSString query () |
172 { | 172 { |
173 objc.id result = OS.objc_msgSend(this.id, OS.sel_query); | 173 objc.id result = OS.objc_msgSend(this.id_, OS.sel_query); |
174 return result !is null ? new NSString(result) : null; | 174 return result !is null ? new NSString(result) : null; |
175 } | 175 } |
176 | 176 |
177 public NSString relativePath () | 177 public NSString relativePath () |
178 { | 178 { |
179 objc.id result = OS.objc_msgSend(this.id, OS.sel_relativePath); | 179 objc.id result = OS.objc_msgSend(this.id_, OS.sel_relativePath); |
180 return result !is null ? new NSString(result) : null; | 180 return result !is null ? new NSString(result) : null; |
181 } | 181 } |
182 | 182 |
183 public NSString relativeString () | 183 public NSString relativeString () |
184 { | 184 { |
185 objc.id result = OS.objc_msgSend(this.id, OS.sel_relativeString); | 185 objc.id result = OS.objc_msgSend(this.id_, OS.sel_relativeString); |
186 return result !is null ? new NSString(result) : null; | 186 return result !is null ? new NSString(result) : null; |
187 } | 187 } |
188 | 188 |
189 public NSData resourceDataUsingCache (bool shouldUseCache) | 189 public NSData resourceDataUsingCache (bool shouldUseCache) |
190 { | 190 { |
191 objc.id result = OS.objc_msgSend(this.id, OS.sel_resourceDataUsingCache_1, shouldUseCache); | 191 objc.id result = OS.objc_msgSend(this.id_, OS.sel_resourceDataUsingCache_1, shouldUseCache); |
192 return result !is null ? new NSData(result) : null; | 192 return result !is null ? new NSData(result) : null; |
193 } | 193 } |
194 | 194 |
195 public NSString resourceSpecifier () | 195 public NSString resourceSpecifier () |
196 { | 196 { |
197 objc.id result = OS.objc_msgSend(this.id, OS.sel_resourceSpecifier); | 197 objc.id result = OS.objc_msgSend(this.id_, OS.sel_resourceSpecifier); |
198 return result !is null ? new NSString(result) : null; | 198 return result !is null ? new NSString(result) : null; |
199 } | 199 } |
200 | 200 |
201 public NSString scheme () | 201 public NSString scheme () |
202 { | 202 { |
203 objc.id result = OS.objc_msgSend(this.id, OS.sel_scheme); | 203 objc.id result = OS.objc_msgSend(this.id_, OS.sel_scheme); |
204 return result !is null ? new NSString(result) : null; | 204 return result !is null ? new NSString(result) : null; |
205 } | 205 } |
206 | 206 |
207 public bool setProperty (id property, NSString propertyKey) | 207 public bool setProperty (id property, NSString propertyKey) |
208 { | 208 { |
209 return OS.objc_msgSend(this.id, OS.sel_setProperty_1forKey_1, property !is null ? property.id : null, | 209 return OS.objc_msgSend(this.id_, OS.sel_setProperty_1forKey_1, property !is null ? property.id_ : null, |
210 propertyKey !is null ? propertyKey.id : null) !is null; | 210 propertyKey !is null ? propertyKey.id_ : null) !is null; |
211 } | 211 } |
212 | 212 |
213 public bool setResourceData (NSData data) | 213 public bool setResourceData (NSData data) |
214 { | 214 { |
215 return OS.objc_msgSend(this.id, OS.sel_setResourceData_1, data !is null ? data.id : null) !is null; | 215 return OS.objc_msgSend(this.id_, OS.sel_setResourceData_1, data !is null ? data.id_ : null) !is null; |
216 } | 216 } |
217 | 217 |
218 public NSURL standardizedURL () | 218 public NSURL standardizedURL () |
219 { | 219 { |
220 objc.id result = OS.objc_msgSend(this.id, OS.sel_standardizedURL); | 220 objc.id result = OS.objc_msgSend(this.id_, OS.sel_standardizedURL); |
221 return result is this.id ? this : (result !is null ? new NSURL(result) : null); | 221 return result is this.id_ ? this : (result !is null ? new NSURL(result) : null); |
222 } | 222 } |
223 | 223 |
224 public NSString user () | 224 public NSString user () |
225 { | 225 { |
226 objc.id result = OS.objc_msgSend(this.id, OS.sel_user); | 226 objc.id result = OS.objc_msgSend(this.id_, OS.sel_user); |
227 return result !is null ? new NSString(result) : null; | 227 return result !is null ? new NSString(result) : null; |
228 } | 228 } |
229 | 229 |
230 } | 230 } |