Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSColor.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 |
---|---|
12 * Jacob Carlborg <jacob.carlborg@gmail.com> | 12 * Jacob Carlborg <jacob.carlborg@gmail.com> |
13 *******************************************************************************/ | 13 *******************************************************************************/ |
14 module dwt.internal.cocoa.NSColor; | 14 module dwt.internal.cocoa.NSColor; |
15 | 15 |
16 import dwt.internal.cocoa.CGFloat; | 16 import dwt.internal.cocoa.CGFloat; |
17 import dwt.internal.cocoa.CIColor; | |
17 import dwt.internal.cocoa.NSArray; | 18 import dwt.internal.cocoa.NSArray; |
18 import dwt.internal.cocoa.NSColorSpace; | 19 import dwt.internal.cocoa.NSColorSpace; |
19 import dwt.internal.cocoa.NSDictionary; | 20 import dwt.internal.cocoa.NSDictionary; |
20 import dwt.internal.cocoa.NSImage; | 21 import dwt.internal.cocoa.NSImage; |
21 import dwt.internal.cocoa.NSInteger; | 22 import dwt.internal.cocoa.NSInteger; |
39 super(id); | 40 super(id); |
40 } | 41 } |
41 | 42 |
42 public CGFloat alphaComponent () | 43 public CGFloat alphaComponent () |
43 { | 44 { |
44 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_alphaComponent); | 45 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_alphaComponent); |
45 } | 46 } |
46 | 47 |
47 public static NSColor alternateSelectedControlColor () | 48 public static NSColor alternateSelectedControlColor () |
48 { | 49 { |
49 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_alternateSelectedControlColor); | 50 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_alternateSelectedControlColor); |
62 return result !is null ? new NSColor(result) : null; | 63 return result !is null ? new NSColor(result) : null; |
63 } | 64 } |
64 | 65 |
65 public CGFloat blackComponent () | 66 public CGFloat blackComponent () |
66 { | 67 { |
67 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_blackComponent); | 68 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_blackComponent); |
68 } | 69 } |
69 | 70 |
70 public NSColor blendedColorWithFraction (CGFloat fraction, NSColor color) | 71 public NSColor blendedColorWithFraction (CGFloat fraction, NSColor color) |
71 { | 72 { |
72 objc.id result = OS.objc_msgSend(this.id, OS.sel_blendedColorWithFraction_1ofColor_1, fraction, color !is null ? color.id : null); | 73 objc.id result = OS.objc_msgSend(this.id_, OS.sel_blendedColorWithFraction_1ofColor_1, fraction, color !is null ? color.id_ : null); |
73 return result is this.id ? this : (result !is null ? new NSColor(result) : null); | 74 return result is this.id_ ? this : (result !is null ? new NSColor(result) : null); |
74 } | 75 } |
75 | 76 |
76 public static NSColor blueColor () | 77 public static NSColor blueColor () |
77 { | 78 { |
78 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_blueColor); | 79 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_blueColor); |
79 return result !is null ? new NSColor(result) : null; | 80 return result !is null ? new NSColor(result) : null; |
80 } | 81 } |
81 | 82 |
82 public CGFloat blueComponent () | 83 public CGFloat blueComponent () |
83 { | 84 { |
84 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_blueComponent); | 85 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_blueComponent); |
85 } | 86 } |
86 | 87 |
87 public CGFloat brightnessComponent () | 88 public CGFloat brightnessComponent () |
88 { | 89 { |
89 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_brightnessComponent); | 90 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_brightnessComponent); |
90 } | 91 } |
91 | 92 |
92 public static NSColor brownColor () | 93 public static NSColor brownColor () |
93 { | 94 { |
94 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_brownColor); | 95 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_brownColor); |
95 return result !is null ? new NSColor(result) : null; | 96 return result !is null ? new NSColor(result) : null; |
96 } | 97 } |
97 | 98 |
98 public NSString catalogNameComponent () | 99 public NSString catalogNameComponent () |
99 { | 100 { |
100 objc.id result = OS.objc_msgSend(this.id, OS.sel_catalogNameComponent); | 101 objc.id result = OS.objc_msgSend(this.id_, OS.sel_catalogNameComponent); |
101 return result !is null ? new NSString(result) : null; | 102 return result !is null ? new NSString(result) : null; |
102 } | 103 } |
103 | 104 |
104 public static NSColor clearColor () | 105 public static NSColor clearColor () |
105 { | 106 { |
113 return result !is null ? new NSColor(result) : null; | 114 return result !is null ? new NSColor(result) : null; |
114 } | 115 } |
115 | 116 |
116 public static NSColor colorFromPasteboard (NSPasteboard pasteBoard) | 117 public static NSColor colorFromPasteboard (NSPasteboard pasteBoard) |
117 { | 118 { |
118 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorFromPasteboard_1, pasteBoard !is null ? pasteBoard.id : null); | 119 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorFromPasteboard_1, pasteBoard !is null ? pasteBoard.id_ : null); |
119 return result !is null ? new NSColor(result) : null; | 120 return result !is null ? new NSColor(result) : null; |
120 } | 121 } |
121 | 122 |
122 public NSString colorNameComponent () | 123 public NSString colorNameComponent () |
123 { | 124 { |
124 objc.id result = OS.objc_msgSend(this.id, OS.sel_colorNameComponent); | 125 objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorNameComponent); |
125 return result !is null ? new NSString(result) : null; | 126 return result !is null ? new NSString(result) : null; |
126 } | 127 } |
127 | 128 |
128 public NSColorSpace colorSpace () | 129 public NSColorSpace colorSpace () |
129 { | 130 { |
130 objc.id result = OS.objc_msgSend(this.id, OS.sel_colorSpace); | 131 objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorSpace); |
131 return result !is null ? new NSColorSpace(result) : null; | 132 return result !is null ? new NSColorSpace(result) : null; |
132 } | 133 } |
133 | 134 |
134 public NSString colorSpaceName () | 135 public NSString colorSpaceName () |
135 { | 136 { |
136 objc.id result = OS.objc_msgSend(this.id, OS.sel_colorSpaceName); | 137 objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorSpaceName); |
137 return result !is null ? new NSString(result) : null; | 138 return result !is null ? new NSString(result) : null; |
138 } | 139 } |
139 | 140 |
140 public NSColor colorUsingColorSpace (NSColorSpace space) | 141 public NSColor colorUsingColorSpace (NSColorSpace space) |
141 { | 142 { |
142 objc.id result = OS.objc_msgSend(this.id, OS.sel_colorUsingColorSpace_1, space !is null ? space.id : null); | 143 objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorUsingColorSpace_1, space !is null ? space.id_ : null); |
143 return result is this.id ? this : (result !is null ? new NSColor(result) : null); | 144 return result is this.id_ ? this : (result !is null ? new NSColor(result) : null); |
144 } | 145 } |
145 | 146 |
146 public NSColor colorUsingColorSpaceName_ (NSString colorSpace) | 147 public NSColor colorUsingColorSpaceName_ (NSString colorSpace) |
147 { | 148 { |
148 objc.id result = OS.objc_msgSend(this.id, OS.sel_colorUsingColorSpaceName_1, colorSpace !is null ? colorSpace.id : null); | 149 objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorUsingColorSpaceName_1, colorSpace !is null ? colorSpace.id_ : null); |
149 return result is this.id ? this : (result !is null ? new NSColor(result) : null); | 150 return result is this.id_ ? this : (result !is null ? new NSColor(result) : null); |
150 } | 151 } |
151 | 152 |
152 public NSColor colorUsingColorSpaceName_device_ (NSString colorSpace, NSDictionary deviceDescription) | 153 public NSColor colorUsingColorSpaceName_device_ (NSString colorSpace, NSDictionary deviceDescription) |
153 { | 154 { |
154 objc.id result = OS.objc_msgSend(this.id, OS.sel_colorUsingColorSpaceName_1device_1, colorSpace !is null ? colorSpace.id : null, | 155 objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorUsingColorSpaceName_1device_1, colorSpace !is null ? colorSpace.id_ : null, |
155 deviceDescription !is null ? deviceDescription.id : null); | 156 deviceDescription !is null ? deviceDescription.id_ : null); |
156 return result is this.id ? this : (result !is null ? new NSColor(result) : null); | 157 return result is this.id_ ? this : (result !is null ? new NSColor(result) : null); |
157 } | 158 } |
158 | 159 |
159 public NSColor colorWithAlphaComponent (CGFloat alpha) | 160 public NSColor colorWithAlphaComponent (CGFloat alpha) |
160 { | 161 { |
161 objc.id result = OS.objc_msgSend(this.id, OS.sel_colorWithAlphaComponent_1, alpha); | 162 objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorWithAlphaComponent_1, alpha); |
162 return result is this.id ? this : (result !is null ? new NSColor(result) : null); | 163 return result is this.id_ ? this : (result !is null ? new NSColor(result) : null); |
163 } | 164 } |
164 | 165 |
165 public static NSColor colorWithCIColor (CIColor color) | 166 public static NSColor colorWithCIColor (CIColor color) |
166 { | 167 { |
167 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithCIColor_1, color !is null ? color.id : null); | 168 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithCIColor_1, color !is null ? color.id_ : null); |
168 return result !is null ? new NSColor(result) : null; | 169 return result !is null ? new NSColor(result) : null; |
169 } | 170 } |
170 | 171 |
171 public static NSColor colorWithCalibratedHue (CGFloat hue, CGFloat saturation, CGFloat brightness, CGFloat alpha) | 172 public static NSColor colorWithCalibratedHue (CGFloat hue, CGFloat saturation, CGFloat brightness, CGFloat alpha) |
172 { | 173 { |
187 return result !is null ? new NSColor(result) : null; | 188 return result !is null ? new NSColor(result) : null; |
188 } | 189 } |
189 | 190 |
190 public static NSColor colorWithCatalogName (NSString listName, NSString colorName) | 191 public static NSColor colorWithCatalogName (NSString listName, NSString colorName) |
191 { | 192 { |
192 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithCatalogName_1colorName_1, listName !is null ? listName.id : null, | 193 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithCatalogName_1colorName_1, listName !is null ? listName.id_ : null, |
193 colorName !is null ? colorName.id : null); | 194 colorName !is null ? colorName.id_ : null); |
194 return result !is null ? new NSColor(result) : null; | 195 return result !is null ? new NSColor(result) : null; |
195 } | 196 } |
196 | 197 |
197 public static NSColor colorWithColorSpace (NSColorSpace space, /*const*/CGFloat* components, NSInteger numberOfComponents) | 198 public static NSColor colorWithColorSpace (NSColorSpace space, /*const*/CGFloat* components, NSInteger numberOfComponents) |
198 { | 199 { |
199 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithColorSpace_1components_1count_1, space !is null ? space.id : null, | 200 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithColorSpace_1components_1count_1, space !is null ? space.id_ : null, |
200 components, numberOfComponents); | 201 components, numberOfComponents); |
201 return result !is null ? new NSColor(result) : null; | 202 return result !is null ? new NSColor(result) : null; |
202 } | 203 } |
203 | 204 |
204 public static NSColor colorWithDeviceCyan (CGFloat cyan, CGFloat magenta, CGFloat yellow, CGFloat black, CGFloat alpha) | 205 public static NSColor colorWithDeviceCyan (CGFloat cyan, CGFloat magenta, CGFloat yellow, CGFloat black, CGFloat alpha) |
227 return result !is null ? new NSColor(result) : null; | 228 return result !is null ? new NSColor(result) : null; |
228 } | 229 } |
229 | 230 |
230 public static NSColor colorWithPatternImage (NSImage image) | 231 public static NSColor colorWithPatternImage (NSImage image) |
231 { | 232 { |
232 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithPatternImage_1, image !is null ? image.id : null); | 233 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithPatternImage_1, image !is null ? image.id_ : null); |
233 return result !is null ? new NSColor(result) : null; | 234 return result !is null ? new NSColor(result) : null; |
234 } | 235 } |
235 | 236 |
236 public static NSArray controlAlternatingRowBackgroundColors () | 237 public static NSArray controlAlternatingRowBackgroundColors () |
237 { | 238 { |
292 return result !is null ? new NSColor(result) : null; | 293 return result !is null ? new NSColor(result) : null; |
293 } | 294 } |
294 | 295 |
295 public CGFloat cyanComponent () | 296 public CGFloat cyanComponent () |
296 { | 297 { |
297 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_cyanComponent); | 298 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_cyanComponent); |
298 } | 299 } |
299 | 300 |
300 public static NSColor darkGrayColor () | 301 public static NSColor darkGrayColor () |
301 { | 302 { |
302 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_darkGrayColor); | 303 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_darkGrayColor); |
309 return result !is null ? new NSColor(result) : null; | 310 return result !is null ? new NSColor(result) : null; |
310 } | 311 } |
311 | 312 |
312 public void drawSwatchInRect (NSRect rect) | 313 public void drawSwatchInRect (NSRect rect) |
313 { | 314 { |
314 OS.objc_msgSend(this.id, OS.sel_drawSwatchInRect_1, rect); | 315 OS.objc_msgSend(this.id_, OS.sel_drawSwatchInRect_1, rect); |
315 } | 316 } |
316 | 317 |
317 public void getComponents (CGFloat[] components) | 318 public void getComponents (CGFloat[] components) |
318 { | 319 { |
319 OS.objc_msgSend(this.id, OS.sel_getComponents_1, components); | 320 OS.objc_msgSend(this.id_, OS.sel_getComponents_1, components); |
320 } | 321 } |
321 | 322 |
322 public void getCyan (CGFloat* cyan, CGFloat* magenta, CGFloat* yellow, CGFloat* black, CGFloat* alpha) | 323 public void getCyan (CGFloat* cyan, CGFloat* magenta, CGFloat* yellow, CGFloat* black, CGFloat* alpha) |
323 { | 324 { |
324 OS.objc_msgSend(this.id, OS.sel_getCyan_1magenta_1yellow_1black_1alpha_1, cyan, magenta, yellow, black, alpha); | 325 OS.objc_msgSend(this.id_, OS.sel_getCyan_1magenta_1yellow_1black_1alpha_1, cyan, magenta, yellow, black, alpha); |
325 } | 326 } |
326 | 327 |
327 public void getHue (CGFloat* hue, CGFloat* saturation, CGFloat* brightness, CGFloat* alpha) | 328 public void getHue (CGFloat* hue, CGFloat* saturation, CGFloat* brightness, CGFloat* alpha) |
328 { | 329 { |
329 OS.objc_msgSend(this.id, OS.sel_getHue_1saturation_1brightness_1alpha_1, hue, saturation, brightness, alpha); | 330 OS.objc_msgSend(this.id_, OS.sel_getHue_1saturation_1brightness_1alpha_1, hue, saturation, brightness, alpha); |
330 } | 331 } |
331 | 332 |
332 public void getRed (CGFloat* red, CGFloat* green, CGFloat* blue, CGFloat* alpha) | 333 public void getRed (CGFloat* red, CGFloat* green, CGFloat* blue, CGFloat* alpha) |
333 { | 334 { |
334 OS.objc_msgSend(this.id, OS.sel_getRed_1green_1blue_1alpha_1, red, green, blue, alpha); | 335 OS.objc_msgSend(this.id_, OS.sel_getRed_1green_1blue_1alpha_1, red, green, blue, alpha); |
335 } | 336 } |
336 | 337 |
337 public void getWhite (CGFloat* white, CGFloat* alpha) | 338 public void getWhite (CGFloat* white, CGFloat* alpha) |
338 { | 339 { |
339 OS.objc_msgSend(this.id, OS.sel_getWhite_1alpha_1, white, alpha); | 340 OS.objc_msgSend(this.id_, OS.sel_getWhite_1alpha_1, white, alpha); |
340 } | 341 } |
341 | 342 |
342 public static NSColor grayColor () | 343 public static NSColor grayColor () |
343 { | 344 { |
344 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_grayColor); | 345 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_grayColor); |
351 return result !is null ? new NSColor(result) : null; | 352 return result !is null ? new NSColor(result) : null; |
352 } | 353 } |
353 | 354 |
354 public CGFloat greenComponent () | 355 public CGFloat greenComponent () |
355 { | 356 { |
356 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_greenComponent); | 357 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_greenComponent); |
357 } | 358 } |
358 | 359 |
359 public static NSColor gridColor () | 360 public static NSColor gridColor () |
360 { | 361 { |
361 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_gridColor); | 362 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_gridColor); |
380 return result !is null ? new NSColor(result) : null; | 381 return result !is null ? new NSColor(result) : null; |
381 } | 382 } |
382 | 383 |
383 public NSColor highlightWithLevel (CGFloat val) | 384 public NSColor highlightWithLevel (CGFloat val) |
384 { | 385 { |
385 objc.id result = OS.objc_msgSend(this.id, OS.sel_highlightWithLevel_1, val); | 386 objc.id result = OS.objc_msgSend(this.id_, OS.sel_highlightWithLevel_1, val); |
386 return result is this.id ? this : (result !is null ? new NSColor(result) : null); | 387 return result is this.id_ ? this : (result !is null ? new NSColor(result) : null); |
387 } | 388 } |
388 | 389 |
389 public CGFloat hueComponent () | 390 public CGFloat hueComponent () |
390 { | 391 { |
391 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_hueComponent); | 392 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_hueComponent); |
392 } | 393 } |
393 | 394 |
394 public static bool ignoresAlpha () | 395 public static bool ignoresAlpha () |
395 { | 396 { |
396 return OS.objc_msgSend(OS.class_NSColor, OS.sel_ignoresAlpha) !is null; | 397 return OS.objc_msgSend(OS.class_NSColor, OS.sel_ignoresAlpha) !is null; |
414 return result !is null ? new NSColor(result) : null; | 415 return result !is null ? new NSColor(result) : null; |
415 } | 416 } |
416 | 417 |
417 public NSString localizedCatalogNameComponent () | 418 public NSString localizedCatalogNameComponent () |
418 { | 419 { |
419 objc.id result = OS.objc_msgSend(this.id, OS.sel_localizedCatalogNameComponent); | 420 objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedCatalogNameComponent); |
420 return result !is null ? new NSString(result) : null; | 421 return result !is null ? new NSString(result) : null; |
421 } | 422 } |
422 | 423 |
423 public NSString localizedColorNameComponent () | 424 public NSString localizedColorNameComponent () |
424 { | 425 { |
425 objc.id result = OS.objc_msgSend(this.id, OS.sel_localizedColorNameComponent); | 426 objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedColorNameComponent); |
426 return result !is null ? new NSString(result) : null; | 427 return result !is null ? new NSString(result) : null; |
427 } | 428 } |
428 | 429 |
429 public static NSColor magentaColor () | 430 public static NSColor magentaColor () |
430 { | 431 { |
432 return result !is null ? new NSColor(result) : null; | 433 return result !is null ? new NSColor(result) : null; |
433 } | 434 } |
434 | 435 |
435 public CGFloat magentaComponent () | 436 public CGFloat magentaComponent () |
436 { | 437 { |
437 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_magentaComponent); | 438 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_magentaComponent); |
438 } | 439 } |
439 | 440 |
440 public NSInteger numberOfComponents () | 441 public NSInteger numberOfComponents () |
441 { | 442 { |
442 return OS.objc_msgSend(this.id, OS.sel_numberOfComponents); | 443 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfComponents); |
443 } | 444 } |
444 | 445 |
445 public static NSColor orangeColor () | 446 public static NSColor orangeColor () |
446 { | 447 { |
447 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_orangeColor); | 448 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_orangeColor); |
448 return result !is null ? new NSColor(result) : null; | 449 return result !is null ? new NSColor(result) : null; |
449 } | 450 } |
450 | 451 |
451 public NSImage patternImage () | 452 public NSImage patternImage () |
452 { | 453 { |
453 objc.id result = OS.objc_msgSend(this.id, OS.sel_patternImage); | 454 objc.id result = OS.objc_msgSend(this.id_, OS.sel_patternImage); |
454 return result !is null ? new NSImage(result) : null; | 455 return result !is null ? new NSImage(result) : null; |
455 } | 456 } |
456 | 457 |
457 public static NSColor purpleColor () | 458 public static NSColor purpleColor () |
458 { | 459 { |
466 return result !is null ? new NSColor(result) : null; | 467 return result !is null ? new NSColor(result) : null; |
467 } | 468 } |
468 | 469 |
469 public CGFloat redComponent () | 470 public CGFloat redComponent () |
470 { | 471 { |
471 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_redComponent); | 472 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_redComponent); |
472 } | 473 } |
473 | 474 |
474 public CGFloat saturationComponent () | 475 public CGFloat saturationComponent () |
475 { | 476 { |
476 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_saturationComponent); | 477 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_saturationComponent); |
477 } | 478 } |
478 | 479 |
479 public static NSColor scrollBarColor () | 480 public static NSColor scrollBarColor () |
480 { | 481 { |
481 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_scrollBarColor); | 482 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_scrollBarColor); |
530 return result !is null ? new NSColor(result) : null; | 531 return result !is null ? new NSColor(result) : null; |
531 } | 532 } |
532 | 533 |
533 public void set () | 534 public void set () |
534 { | 535 { |
535 OS.objc_msgSend(this.id, OS.sel_set); | 536 OS.objc_msgSend(this.id_, OS.sel_set); |
536 } | 537 } |
537 | 538 |
538 public void setFill () | 539 public void setFill () |
539 { | 540 { |
540 OS.objc_msgSend(this.id, OS.sel_setFill); | 541 OS.objc_msgSend(this.id_, OS.sel_setFill); |
541 } | 542 } |
542 | 543 |
543 public static void setIgnoresAlpha (bool flag) | 544 public static void setIgnoresAlpha (bool flag) |
544 { | 545 { |
545 OS.objc_msgSend(OS.class_NSColor, OS.sel_setIgnoresAlpha_1, flag); | 546 OS.objc_msgSend(OS.class_NSColor, OS.sel_setIgnoresAlpha_1, flag); |
546 } | 547 } |
547 | 548 |
548 public void setStroke () | 549 public void setStroke () |
549 { | 550 { |
550 OS.objc_msgSend(this.id, OS.sel_setStroke); | 551 OS.objc_msgSend(this.id_, OS.sel_setStroke); |
551 } | 552 } |
552 | 553 |
553 public static NSColor shadowColor () | 554 public static NSColor shadowColor () |
554 { | 555 { |
555 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_shadowColor); | 556 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_shadowColor); |
556 return result !is null ? new NSColor(result) : null; | 557 return result !is null ? new NSColor(result) : null; |
557 } | 558 } |
558 | 559 |
559 public NSColor shadowWithLevel (CGFloat val) | 560 public NSColor shadowWithLevel (CGFloat val) |
560 { | 561 { |
561 objc.id result = OS.objc_msgSend(this.id, OS.sel_shadowWithLevel_1, val); | 562 objc.id result = OS.objc_msgSend(this.id_, OS.sel_shadowWithLevel_1, val); |
562 return result is this.id ? this : (result !is null ? new NSColor(result) : null); | 563 return result is this.id_ ? this : (result !is null ? new NSColor(result) : null); |
563 } | 564 } |
564 | 565 |
565 public static NSColor textBackgroundColor () | 566 public static NSColor textBackgroundColor () |
566 { | 567 { |
567 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_textBackgroundColor); | 568 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_textBackgroundColor); |
580 return result !is null ? new NSColor(result) : null; | 581 return result !is null ? new NSColor(result) : null; |
581 } | 582 } |
582 | 583 |
583 public CGFloat whiteComponent () | 584 public CGFloat whiteComponent () |
584 { | 585 { |
585 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_whiteComponent); | 586 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_whiteComponent); |
586 } | 587 } |
587 | 588 |
588 public static NSColor windowBackgroundColor () | 589 public static NSColor windowBackgroundColor () |
589 { | 590 { |
590 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_windowBackgroundColor); | 591 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_windowBackgroundColor); |
603 return result !is null ? new NSColor(result) : null; | 604 return result !is null ? new NSColor(result) : null; |
604 } | 605 } |
605 | 606 |
606 public void writeToPasteboard (NSPasteboard pasteBoard) | 607 public void writeToPasteboard (NSPasteboard pasteBoard) |
607 { | 608 { |
608 OS.objc_msgSend(this.id, OS.sel_writeToPasteboard_1, pasteBoard !is null ? pasteBoard.id : null); | 609 OS.objc_msgSend(this.id_, OS.sel_writeToPasteboard_1, pasteBoard !is null ? pasteBoard.id_ : null); |
609 } | 610 } |
610 | 611 |
611 public static NSColor yellowColor () | 612 public static NSColor yellowColor () |
612 { | 613 { |
613 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_yellowColor); | 614 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_yellowColor); |
614 return result !is null ? new NSColor(result) : null; | 615 return result !is null ? new NSColor(result) : null; |
615 } | 616 } |
616 | 617 |
617 public CGFloat yellowComponent () | 618 public CGFloat yellowComponent () |
618 { | 619 { |
619 return cast(CGFloat) OS.objc_msgSend_fpret(this.id, OS.sel_yellowComponent); | 620 return cast(CGFloat) OS.objc_msgSend_fpret(this.id_, OS.sel_yellowComponent); |
620 } | 621 } |
621 | 622 |
622 } | 623 } |