comparison dwt/internal/cocoa/NSImage.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
20 import dwt.internal.cocoa.NSBitmapImageRep : NSTIFFCompression; 20 import dwt.internal.cocoa.NSBitmapImageRep : NSTIFFCompression;
21 import dwt.internal.cocoa.NSColor; 21 import dwt.internal.cocoa.NSColor;
22 import dwt.internal.cocoa.NSData; 22 import dwt.internal.cocoa.NSData;
23 import dwt.internal.cocoa.NSDictionary; 23 import dwt.internal.cocoa.NSDictionary;
24 import dwt.internal.cocoa.NSImageRep; 24 import dwt.internal.cocoa.NSImageRep;
25 import dwt.internal.cocoa.NSInteger;
25 import dwt.internal.cocoa.NSObject; 26 import dwt.internal.cocoa.NSObject;
26 import dwt.internal.cocoa.NSPasteboard; 27 import dwt.internal.cocoa.NSPasteboard;
27 import dwt.internal.cocoa.NSPoint; 28 import dwt.internal.cocoa.NSPoint;
28 import dwt.internal.cocoa.NSRect; 29 import dwt.internal.cocoa.NSRect;
29 import dwt.internal.cocoa.NSSize; 30 import dwt.internal.cocoa.NSSize;
30 import dwt.internal.cocoa.NSString; 31 import dwt.internal.cocoa.NSString;
31 import dwt.internal.cocoa.NSURL; 32 import dwt.internal.cocoa.NSURL;
32 import dwt.internal.cocoa.OS; 33 import dwt.internal.cocoa.OS;
33 import objc = dwt.internal.objc.runtime; 34 import objc = dwt.internal.objc.runtime;
34 35
35 enum NSCompositingOperation 36 enum NSCompositingOperation : NSUInteger
36 { 37 {
37 NSCompositeClear = 0, 38 NSCompositeClear = 0,
38 NSCompositeCopy = 1, 39 NSCompositeCopy = 1,
39 NSCompositeSourceOver = 2, 40 NSCompositeSourceOver = 2,
40 NSCompositeSourceIn = 3, 41 NSCompositeSourceIn = 3,
48 NSCompositePlusDarker = 11, 49 NSCompositePlusDarker = 11,
49 NSCompositeHighlight = 12, 50 NSCompositeHighlight = 12,
50 NSCompositePlusLighter = 13 51 NSCompositePlusLighter = 13
51 } 52 }
52 53
53 enum NSImageCacheMode 54 alias NSCompositingOperation.NSCompositeClear NSCompositeClear;
55 alias NSCompositingOperation.NSCompositeCopy NSCompositeCopy;
56 alias NSCompositingOperation.NSCompositeSourceOver NSCompositeSourceOver;
57 alias NSCompositingOperation.NSCompositeSourceIn NSCompositeSourceIn;
58 alias NSCompositingOperation.NSCompositeSourceOut NSCompositeSourceOut;
59 alias NSCompositingOperation.NSCompositeSourceAtop NSCompositeSourceAtop;
60 alias NSCompositingOperation.NSCompositeDestinationOver NSCompositeDestinationOver;
61 alias NSCompositingOperation.NSCompositeDestinationIn NSCompositeDestinationIn;
62 alias NSCompositingOperation.NSCompositeDestinationOut NSCompositeDestinationOut;
63 alias NSCompositingOperation.NSCompositeDestinationAtop NSCompositeDestinationAtop;
64 alias NSCompositingOperation.NSCompositeXOR NSCompositeXOR;
65 alias NSCompositingOperation.NSCompositePlusDarker NSCompositePlusDarker;
66 alias NSCompositingOperation.NSCompositeHighlight NSCompositeHighlight;
67 alias NSCompositingOperation.NSCompositePlusLighter NSCompositePlusLighter;
68
69 enum NSImageCacheMode : NSUInteger
54 { 70 {
55 NSImageCacheDefault, 71 NSImageCacheDefault,
56 NSImageCacheAlways, 72 NSImageCacheAlways,
57 NSImageCacheBySize, 73 NSImageCacheBySize,
58 NSImageCacheNever 74 NSImageCacheNever
59 } 75 }
60 76
77 alias NSImageCacheMode.NSImageCacheDefault NSImageCacheDefault;
78 alias NSImageCacheMode.NSImageCacheAlways NSImageCacheAlways;
79 alias NSImageCacheMode.NSImageCacheBySize NSImageCacheBySize;
80 alias NSImageCacheMode.NSImageCacheNever NSImageCacheNever;
81
61 public class NSImage : NSObject 82 public class NSImage : NSObject
62 { 83 {
63 84
64 public this () 85 public this ()
65 { 86 {
71 super(id); 92 super(id);
72 } 93 }
73 94
74 public NSData TIFFRepresentation () 95 public NSData TIFFRepresentation ()
75 { 96 {
76 objc.id result = OS.objc_msgSend(this.id, OS.sel_TIFFRepresentation); 97 objc.id result = OS.objc_msgSend(this.id_, OS.sel_TIFFRepresentation);
77 return result !is null ? new NSData(result) : null; 98 return result !is null ? new NSData(result) : null;
78 } 99 }
79 100
80 public NSData TIFFRepresentationUsingCompression (NSTIFFCompression comp, float aFloat) 101 public NSData TIFFRepresentationUsingCompression (NSTIFFCompression comp, float aFloat)
81 { 102 {
82 objc.id result = OS.objc_msgSend(this.id, OS.sel_TIFFRepresentationUsingCompression_1factor_1, comp, aFloat); 103 objc.id result = OS.objc_msgSend(this.id_, OS.sel_TIFFRepresentationUsingCompression_1factor_1, comp, aFloat);
83 return result !is null ? new NSData(result) : null; 104 return result !is null ? new NSData(result) : null;
84 } 105 }
85 106
86 public void addRepresentation (NSImageRep imageRep) 107 public void addRepresentation (NSImageRep imageRep)
87 { 108 {
88 OS.objc_msgSend(this.id, OS.sel_addRepresentation_1, imageRep !is null ? imageRep.id : null); 109 OS.objc_msgSend(this.id_, OS.sel_addRepresentation_1, imageRep !is null ? imageRep.id_ : null);
89 } 110 }
90 111
91 public void addRepresentations (NSArray imageReps) 112 public void addRepresentations (NSArray imageReps)
92 { 113 {
93 OS.objc_msgSend(this.id, OS.sel_addRepresentations_1, imageReps !is null ? imageReps.id : null); 114 OS.objc_msgSend(this.id_, OS.sel_addRepresentations_1, imageReps !is null ? imageReps.id_ : null);
94 } 115 }
95 116
96 public NSRect alignmentRect () 117 public NSRect alignmentRect ()
97 { 118 {
98 NSRect result; 119 NSRect result;
99 OS.objc_msgSend_stret(result, this.id, OS.sel_alignmentRect); 120 OS.objc_msgSend_stret(&result, this.id_, OS.sel_alignmentRect);
100 return result; 121 return result;
101 } 122 }
102 123
103 public NSColor backgroundColor () 124 public NSColor backgroundColor ()
104 { 125 {
105 objc.id result = OS.objc_msgSend(this.id, OS.sel_backgroundColor); 126 objc.id result = OS.objc_msgSend(this.id_, OS.sel_backgroundColor);
106 return result !is null ? new NSColor(result) : null; 127 return result !is null ? new NSColor(result) : null;
107 } 128 }
108 129
109 public NSImageRep bestRepresentationForDevice (NSDictionary deviceDescription) 130 public NSImageRep bestRepresentationForDevice (NSDictionary deviceDescription)
110 { 131 {
111 objc.id result = OS.objc_msgSend(this.id, OS.sel_bestRepresentationForDevice_1, deviceDescription !is null ? deviceDescription.id : null); 132 objc.id result = OS.objc_msgSend(this.id_, OS.sel_bestRepresentationForDevice_1, deviceDescription !is null ? deviceDescription.id_ : null);
112 return result !is null ? new NSImageRep(result) : null; 133 return result !is null ? new NSImageRep(result) : null;
113 } 134 }
114 135
115 public bool cacheDepthMatchesImageDepth () 136 public bool cacheDepthMatchesImageDepth ()
116 { 137 {
117 return OS.objc_msgSend(this.id, OS.sel_cacheDepthMatchesImageDepth) !is null; 138 return OS.objc_msgSend(this.id_, OS.sel_cacheDepthMatchesImageDepth) !is null;
118 } 139 }
119 140
120 public NSImageCacheMode cacheMode () 141 public NSImageCacheMode cacheMode ()
121 { 142 {
122 return OS.objc_msgSend(this.id, OS.sel_cacheMode); 143 return cast(NSImageCacheMode) OS.objc_msgSend(this.id_, OS.sel_cacheMode);
123 } 144 }
124 145
125 public static bool canInitWithPasteboard (NSPasteboard pasteboard) 146 public static bool canInitWithPasteboard (NSPasteboard pasteboard)
126 { 147 {
127 return OS.objc_msgSend(OS.class_NSImage, OS.sel_canInitWithPasteboard_1, pasteboard !is null ? pasteboard.id : null) !is null; 148 return OS.objc_msgSend(OS.class_NSImage, OS.sel_canInitWithPasteboard_1, pasteboard !is null ? pasteboard.id_ : null) !is null;
128 } 149 }
129 150
130 public void cancelIncrementalLoad () 151 public void cancelIncrementalLoad ()
131 { 152 {
132 OS.objc_msgSend(this.id, OS.sel_cancelIncrementalLoad); 153 OS.objc_msgSend(this.id_, OS.sel_cancelIncrementalLoad);
133 } 154 }
134 155
135 public void compositeToPoint_fromRect_operation_ (NSPoint point, NSRect rect, NSCompositingOperation op) 156 public void compositeToPoint_fromRect_operation_ (NSPoint point, NSRect rect, NSCompositingOperation op)
136 { 157 {
137 OS.objc_msgSend(this.id, OS.sel_compositeToPoint_1fromRect_1operation_1, point, rect, op); 158 OS.objc_msgSend(this.id_, OS.sel_compositeToPoint_1fromRect_1operation_1, point, rect, op);
138 } 159 }
139 160
140 public void compositeToPoint_fromRect_operation_fraction_ (NSPoint point, NSRect rect, NSCompositingOperation op, CGFloat delta) 161 public void compositeToPoint_fromRect_operation_fraction_ (NSPoint point, NSRect rect, NSCompositingOperation op, CGFloat delta)
141 { 162 {
142 OS.objc_msgSend(this.id, OS.sel_compositeToPoint_1fromRect_1operation_1fraction_1, point, rect, op, delta); 163 OS.objc_msgSend(this.id_, OS.sel_compositeToPoint_1fromRect_1operation_1fraction_1, point, rect, op, delta);
143 } 164 }
144 165
145 public void compositeToPoint_operation_ (NSPoint point, NSCompositingOperation op) 166 public void compositeToPoint_operation_ (NSPoint point, NSCompositingOperation op)
146 { 167 {
147 OS.objc_msgSend(this.id, OS.sel_compositeToPoint_1operation_1, point, op); 168 OS.objc_msgSend(this.id_, OS.sel_compositeToPoint_1operation_1, point, op);
148 } 169 }
149 170
150 public void compositeToPoint_operation_fraction_ (NSPoint point, NSCompositingOperation op, CGFloat delta) 171 public void compositeToPoint_operation_fraction_ (NSPoint point, NSCompositingOperation op, CGFloat delta)
151 { 172 {
152 OS.objc_msgSend(this.id, OS.sel_compositeToPoint_1operation_1fraction_1, point, op, delta); 173 OS.objc_msgSend(this.id_, OS.sel_compositeToPoint_1operation_1fraction_1, point, op, delta);
153 } 174 }
154 175
155 public id delegatee () 176 public id delegatee ()
156 { 177 {
157 objc.id result = OS.objc_msgSend(this.id, OS.sel_delegate); 178 objc.id result = OS.objc_msgSend(this.id_, OS.sel_delegate);
158 return result !is null ? new id(result) : null; 179 return result !is null ? new id(result) : null;
159 } 180 }
160 181
161 public void dissolveToPoint_fraction_ (NSPoint point, CGFloat aFloat) 182 public void dissolveToPoint_fraction_ (NSPoint point, CGFloat aFloat)
162 { 183 {
163 OS.objc_msgSend(this.id, OS.sel_dissolveToPoint_1fraction_1, point, aFloat); 184 OS.objc_msgSend(this.id_, OS.sel_dissolveToPoint_1fraction_1, point, aFloat);
164 } 185 }
165 186
166 public void dissolveToPoint_fromRect_fraction_ (NSPoint point, NSRect rect, CGFloat aFloat) 187 public void dissolveToPoint_fromRect_fraction_ (NSPoint point, NSRect rect, CGFloat aFloat)
167 { 188 {
168 OS.objc_msgSend(this.id, OS.sel_dissolveToPoint_1fromRect_1fraction_1, point, rect, aFloat); 189 OS.objc_msgSend(this.id_, OS.sel_dissolveToPoint_1fromRect_1fraction_1, point, rect, aFloat);
169 } 190 }
170 191
171 public void drawAtPoint (NSPoint point, NSRect fromRect, NSCompositingOperation op, CGFloat delta) 192 public void drawAtPoint (NSPoint point, NSRect fromRect, NSCompositingOperation op, CGFloat delta)
172 { 193 {
173 OS.objc_msgSend(this.id, OS.sel_drawAtPoint_1fromRect_1operation_1fraction_1, point, fromRect, op, delta); 194 OS.objc_msgSend(this.id_, OS.sel_drawAtPoint_1fromRect_1operation_1fraction_1, point, fromRect, op, delta);
174 } 195 }
175 196
176 public void drawInRect (NSRect rect, NSRect fromRect, NSCompositingOperation op, CGFloat delta) 197 public void drawInRect (NSRect rect, NSRect fromRect, NSCompositingOperation op, CGFloat delta)
177 { 198 {
178 OS.objc_msgSend(this.id, OS.sel_drawInRect_1fromRect_1operation_1fraction_1, rect, fromRect, op, delta); 199 OS.objc_msgSend(this.id_, OS.sel_drawInRect_1fromRect_1operation_1fraction_1, rect, fromRect, op, delta);
179 } 200 }
180 201
181 public bool drawRepresentation (NSImageRep imageRep, NSRect rect) 202 public bool drawRepresentation (NSImageRep imageRep, NSRect rect)
182 { 203 {
183 return OS.objc_msgSend(this.id, OS.sel_drawRepresentation_1inRect_1, imageRep !is null ? imageRep.id : null, rect) !is null; 204 return OS.objc_msgSend(this.id_, OS.sel_drawRepresentation_1inRect_1, imageRep !is null ? imageRep.id_ : null, rect) !is null;
184 } 205 }
185 206
186 public static NSArray imageFileTypes () 207 public static NSArray imageFileTypes ()
187 { 208 {
188 objc.id result = OS.objc_msgSend(OS.class_NSImage, OS.sel_imageFileTypes); 209 objc.id result = OS.objc_msgSend(OS.class_NSImage, OS.sel_imageFileTypes);
189 return result !is null ? new NSArray(result) : null; 210 return result !is null ? new NSArray(result) : null;
190 } 211 }
191 212
192 public static id imageNamed (NSString name) 213 public static id imageNamed (NSString name)
193 { 214 {
194 objc.id result = OS.objc_msgSend(OS.class_NSImage, OS.sel_imageNamed_1, name !is null ? name.id : null); 215 objc.id result = OS.objc_msgSend(OS.class_NSImage, OS.sel_imageNamed_1, name !is null ? name.id_ : null);
195 return result !is null ? new id(result) : null; 216 return result !is null ? new id(result) : null;
196 } 217 }
197 218
198 public static NSArray imagePasteboardTypes () 219 public static NSArray imagePasteboardTypes ()
199 { 220 {
225 return result !is null ? new NSArray(result) : null; 246 return result !is null ? new NSArray(result) : null;
226 } 247 }
227 248
228 public NSImage initByReferencingFile (NSString fileName) 249 public NSImage initByReferencingFile (NSString fileName)
229 { 250 {
230 objc.id result = OS.objc_msgSend(this.id, OS.sel_initByReferencingFile_1, fileName !is null ? fileName.id : null); 251 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initByReferencingFile_1, fileName !is null ? fileName.id_ : null);
231 return result !is null ? this : null; 252 return result !is null ? this : null;
232 } 253 }
233 254
234 public NSImage initByReferencingURL (NSURL url) 255 public NSImage initByReferencingURL (NSURL url)
235 { 256 {
236 objc.id result = OS.objc_msgSend(this.id, OS.sel_initByReferencingURL_1, url !is null ? url.id : null); 257 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initByReferencingURL_1, url !is null ? url.id_ : null);
237 return result !is null ? this : null; 258 return result !is null ? this : null;
238 } 259 }
239 260
240 public NSImage initWithContentsOfFile (NSString fileName) 261 public NSImage initWithContentsOfFile (NSString fileName)
241 { 262 {
242 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentsOfFile_1, fileName !is null ? fileName.id : null); 263 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfFile_1, fileName !is null ? fileName.id_ : null);
243 return result !is null ? this : null; 264 return result !is null ? this : null;
244 } 265 }
245 266
246 public NSImage initWithContentsOfURL (NSURL url) 267 public NSImage initWithContentsOfURL (NSURL url)
247 { 268 {
248 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContentsOfURL_1, url !is null ? url.id : null); 269 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithContentsOfURL_1, url !is null ? url.id_ : null);
249 return result !is null ? this : null; 270 return result !is null ? this : null;
250 } 271 }
251 272
252 public NSImage initWithData (NSData data) 273 public NSImage initWithData (NSData data)
253 { 274 {
254 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithData_1, data !is null ? data.id : null); 275 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithData_1, data !is null ? data.id_ : null);
255 return result !is null ? this : null; 276 return result !is null ? this : null;
256 } 277 }
257 278
258 public NSImage initWithIconRef (IconRef iconRef) 279 public NSImage initWithIconRef (IconRef iconRef)
259 { 280 {
260 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithIconRef_1, iconRef); 281 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithIconRef_1, iconRef);
261 return result !is null ? this : null; 282 return result !is null ? this : null;
262 } 283 }
263 284
264 public NSImage initWithPasteboard (NSPasteboard pasteboard) 285 public NSImage initWithPasteboard (NSPasteboard pasteboard)
265 { 286 {
266 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithPasteboard_1, pasteboard !is null ? pasteboard.id : null); 287 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithPasteboard_1, pasteboard !is null ? pasteboard.id_ : null);
267 return result !is null ? this : null; 288 return result !is null ? this : null;
268 } 289 }
269 290
270 public NSImage initWithSize (NSSize aSize) 291 public NSImage initWithSize (NSSize aSize)
271 { 292 {
272 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithSize_1, aSize); 293 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithSize_1, aSize);
273 return result !is null ? this : null; 294 return result !is null ? this : null;
274 } 295 }
275 296
276 public bool isCachedSeparately () 297 public bool isCachedSeparately ()
277 { 298 {
278 return OS.objc_msgSend(this.id, OS.sel_isCachedSeparately) !is null; 299 return OS.objc_msgSend(this.id_, OS.sel_isCachedSeparately) !is null;
279 } 300 }
280 301
281 public bool isDataRetained () 302 public bool isDataRetained ()
282 { 303 {
283 return OS.objc_msgSend(this.id, OS.sel_isDataRetained) !is null; 304 return OS.objc_msgSend(this.id_, OS.sel_isDataRetained) !is null;
284 } 305 }
285 306
286 public bool isFlipped () 307 public bool isFlipped ()
287 { 308 {
288 return OS.objc_msgSend(this.id, OS.sel_isFlipped) !is null; 309 return OS.objc_msgSend(this.id_, OS.sel_isFlipped) !is null;
289 } 310 }
290 311
291 public bool isTemplate () 312 public bool isTemplate ()
292 { 313 {
293 return OS.objc_msgSend(this.id, OS.sel_isTemplate) !is null; 314 return OS.objc_msgSend(this.id_, OS.sel_isTemplate) !is null;
294 } 315 }
295 316
296 public bool isValid () 317 public bool isValid ()
297 { 318 {
298 return OS.objc_msgSend(this.id, OS.sel_isValid) !is null; 319 return OS.objc_msgSend(this.id_, OS.sel_isValid) !is null;
299 } 320 }
300 321
301 public void lockFocus () 322 public void lockFocus ()
302 { 323 {
303 OS.objc_msgSend(this.id, OS.sel_lockFocus); 324 OS.objc_msgSend(this.id_, OS.sel_lockFocus);
304 } 325 }
305 326
306 public void lockFocusOnRepresentation (NSImageRep imageRepresentation) 327 public void lockFocusOnRepresentation (NSImageRep imageRepresentation)
307 { 328 {
308 OS.objc_msgSend(this.id, OS.sel_lockFocusOnRepresentation_1, imageRepresentation !is null ? imageRepresentation.id : null); 329 OS.objc_msgSend(this.id_, OS.sel_lockFocusOnRepresentation_1, imageRepresentation !is null ? imageRepresentation.id_ : null);
309 } 330 }
310 331
311 public bool matchesOnMultipleResolution () 332 public bool matchesOnMultipleResolution ()
312 { 333 {
313 return OS.objc_msgSend(this.id, OS.sel_matchesOnMultipleResolution) !is null; 334 return OS.objc_msgSend(this.id_, OS.sel_matchesOnMultipleResolution) !is null;
314 } 335 }
315 336
316 public NSString name () 337 public NSString name ()
317 { 338 {
318 objc.id result = OS.objc_msgSend(this.id, OS.sel_name); 339 objc.id result = OS.objc_msgSend(this.id_, OS.sel_name);
319 return result !is null ? new NSString(result) : null; 340 return result !is null ? new NSString(result) : null;
320 } 341 }
321 342
322 public bool prefersColorMatch () 343 public bool prefersColorMatch ()
323 { 344 {
324 return OS.objc_msgSend(this.id, OS.sel_prefersColorMatch) !is null; 345 return OS.objc_msgSend(this.id_, OS.sel_prefersColorMatch) !is null;
325 } 346 }
326 347
327 public void recache () 348 public void recache ()
328 { 349 {
329 OS.objc_msgSend(this.id, OS.sel_recache); 350 OS.objc_msgSend(this.id_, OS.sel_recache);
330 } 351 }
331 352
332 public void removeRepresentation (NSImageRep imageRep) 353 public void removeRepresentation (NSImageRep imageRep)
333 { 354 {
334 OS.objc_msgSend(this.id, OS.sel_removeRepresentation_1, imageRep !is null ? imageRep.id : null); 355 OS.objc_msgSend(this.id_, OS.sel_removeRepresentation_1, imageRep !is null ? imageRep.id_ : null);
335 } 356 }
336 357
337 public NSArray representations () 358 public NSArray representations ()
338 { 359 {
339 objc.id result = OS.objc_msgSend(this.id, OS.sel_representations); 360 objc.id result = OS.objc_msgSend(this.id_, OS.sel_representations);
340 return result !is null ? new NSArray(result) : null; 361 return result !is null ? new NSArray(result) : null;
341 } 362 }
342 363
343 public bool scalesWhenResized () 364 public bool scalesWhenResized ()
344 { 365 {
345 return OS.objc_msgSend(this.id, OS.sel_scalesWhenResized) !is null; 366 return OS.objc_msgSend(this.id_, OS.sel_scalesWhenResized) !is null;
346 } 367 }
347 368
348 public void setAlignmentRect (NSRect rect) 369 public void setAlignmentRect (NSRect rect)
349 { 370 {
350 OS.objc_msgSend(this.id, OS.sel_setAlignmentRect_1, rect); 371 OS.objc_msgSend(this.id_, OS.sel_setAlignmentRect_1, rect);
351 } 372 }
352 373
353 public void setBackgroundColor (NSColor aColor) 374 public void setBackgroundColor (NSColor aColor)
354 { 375 {
355 OS.objc_msgSend(this.id, OS.sel_setBackgroundColor_1, aColor !is null ? aColor.id : null); 376 OS.objc_msgSend(this.id_, OS.sel_setBackgroundColor_1, aColor !is null ? aColor.id_ : null);
356 } 377 }
357 378
358 public void setCacheDepthMatchesImageDepth (bool flag) 379 public void setCacheDepthMatchesImageDepth (bool flag)
359 { 380 {
360 OS.objc_msgSend(this.id, OS.sel_setCacheDepthMatchesImageDepth_1, flag); 381 OS.objc_msgSend(this.id_, OS.sel_setCacheDepthMatchesImageDepth_1, flag);
361 } 382 }
362 383
363 public void setCacheMode (NSImageCacheMode mode) 384 public void setCacheMode (NSImageCacheMode mode)
364 { 385 {
365 OS.objc_msgSend(this.id, OS.sel_setCacheMode_1, mode); 386 OS.objc_msgSend(this.id_, OS.sel_setCacheMode_1, mode);
366 } 387 }
367 388
368 public void setCachedSeparately (bool flag) 389 public void setCachedSeparately (bool flag)
369 { 390 {
370 OS.objc_msgSend(this.id, OS.sel_setCachedSeparately_1, flag); 391 OS.objc_msgSend(this.id_, OS.sel_setCachedSeparately_1, flag);
371 } 392 }
372 393
373 public void setDataRetained (bool flag) 394 public void setDataRetained (bool flag)
374 { 395 {
375 OS.objc_msgSend(this.id, OS.sel_setDataRetained_1, flag); 396 OS.objc_msgSend(this.id_, OS.sel_setDataRetained_1, flag);
376 } 397 }
377 398
378 public void setDelegate (id anObject) 399 public void setDelegate (id anObject)
379 { 400 {
380 OS.objc_msgSend(this.id, OS.sel_setDelegate_1, anObject !is null ? anObject.id : null); 401 OS.objc_msgSend(this.id_, OS.sel_setDelegate_1, anObject !is null ? anObject.id_ : null);
381 } 402 }
382 403
383 public void setFlipped (bool flag) 404 public void setFlipped (bool flag)
384 { 405 {
385 OS.objc_msgSend(this.id, OS.sel_setFlipped_1, flag); 406 OS.objc_msgSend(this.id_, OS.sel_setFlipped_1, flag);
386 } 407 }
387 408
388 public void setMatchesOnMultipleResolution (bool flag) 409 public void setMatchesOnMultipleResolution (bool flag)
389 { 410 {
390 OS.objc_msgSend(this.id, OS.sel_setMatchesOnMultipleResolution_1, flag); 411 OS.objc_msgSend(this.id_, OS.sel_setMatchesOnMultipleResolution_1, flag);
391 } 412 }
392 413
393 public bool setName (NSString string) 414 public bool setName (NSString string)
394 { 415 {
395 return OS.objc_msgSend(this.id, OS.sel_setName_1, string !is null ? string.id : null) !is null; 416 return OS.objc_msgSend(this.id_, OS.sel_setName_1, string !is null ? string.id_ : null) !is null;
396 } 417 }
397 418
398 public void setPrefersColorMatch (bool flag) 419 public void setPrefersColorMatch (bool flag)
399 { 420 {
400 OS.objc_msgSend(this.id, OS.sel_setPrefersColorMatch_1, flag); 421 OS.objc_msgSend(this.id_, OS.sel_setPrefersColorMatch_1, flag);
401 } 422 }
402 423
403 public void setScalesWhenResized (bool flag) 424 public void setScalesWhenResized (bool flag)
404 { 425 {
405 OS.objc_msgSend(this.id, OS.sel_setScalesWhenResized_1, flag); 426 OS.objc_msgSend(this.id_, OS.sel_setScalesWhenResized_1, flag);
406 } 427 }
407 428
408 public void setSize (NSSize aSize) 429 public void setSize (NSSize aSize)
409 { 430 {
410 OS.objc_msgSend(this.id, OS.sel_setSize_1, aSize); 431 OS.objc_msgSend(this.id_, OS.sel_setSize_1, aSize);
411 } 432 }
412 433
413 public void setTemplate (bool isTemplate) 434 public void setTemplate (bool isTemplate)
414 { 435 {
415 OS.objc_msgSend(this.id, OS.sel_setTemplate_1, isTemplate); 436 OS.objc_msgSend(this.id_, OS.sel_setTemplate_1, isTemplate);
416 } 437 }
417 438
418 public void setUsesEPSOnResolutionMismatch (bool flag) 439 public void setUsesEPSOnResolutionMismatch (bool flag)
419 { 440 {
420 OS.objc_msgSend(this.id, OS.sel_setUsesEPSOnResolutionMismatch_1, flag); 441 OS.objc_msgSend(this.id_, OS.sel_setUsesEPSOnResolutionMismatch_1, flag);
421 } 442 }
422 443
423 public NSSize size () 444 public NSSize size ()
424 { 445 {
425 NSSize result; 446 NSSize result;
426 OS.objc_msgSend_struct(result, this.id, OS.sel_size); 447 OS.objc_msgSend_struct(&result, this.id_, OS.sel_size);
427 return result; 448 return result;
428 } 449 }
429 450
430 public void unlockFocus () 451 public void unlockFocus ()
431 { 452 {
432 OS.objc_msgSend(this.id, OS.sel_unlockFocus); 453 OS.objc_msgSend(this.id_, OS.sel_unlockFocus);
433 } 454 }
434 455
435 public bool usesEPSOnResolutionMismatch () 456 public bool usesEPSOnResolutionMismatch ()
436 { 457 {
437 return OS.objc_msgSend(this.id, OS.sel_usesEPSOnResolutionMismatch) !is null; 458 return OS.objc_msgSend(this.id_, OS.sel_usesEPSOnResolutionMismatch) !is null;
438 } 459 }
439 460
440 } 461 }