comparison dwt/internal/cocoa/NSColor.d @ 60:62202ce0039f

Updated and fixed many modules to 3.514
author Jacob Carlborg <doob@me.com>
date Mon, 22 Dec 2008 15:10:19 +0100
parents d8635bb48c7c
children
comparison
equal deleted inserted replaced
59:83b0ad9d9238 60:62202ce0039f
70 objc.id result = OS.objc_msgSend(this.id, OS.sel_colorUsingColorSpaceName_, colorSpace !is null ? colorSpace.id : null); 70 objc.id result = OS.objc_msgSend(this.id, OS.sel_colorUsingColorSpaceName_, colorSpace !is null ? colorSpace.id : null);
71 return result is this.id ? this : (result !is null ? new NSColor(result) : null); 71 return result is this.id ? this : (result !is null ? new NSColor(result) : null);
72 } 72 }
73 73
74 public static NSColor colorWithDeviceRed(CGFloat red, CGFloat green, CGFloat blue, CGFloat alpha) { 74 public static NSColor colorWithDeviceRed(CGFloat red, CGFloat green, CGFloat blue, CGFloat alpha) {
75 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithDeviceRed_green_blue_alpha_, red, green, blue, alpha); 75 objc.id result = objc.objc_msgSend(OS.class_NSColor, OS.sel_colorWithDeviceRed_green_blue_alpha_, red, green, blue, alpha);
76 return result !is null ? new NSColor(result) : null; 76 return result !is null ? new NSColor(result) : null;
77 } 77 }
78 78
79 public static NSColor colorWithPatternImage(NSImage image) { 79 public static NSColor colorWithPatternImage(NSImage image) {
80 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithPatternImage_, image !is null ? image.id : null); 80 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_colorWithPatternImage_, image !is null ? image.id : null);
109 public static NSColor disabledControlTextColor() { 109 public static NSColor disabledControlTextColor() {
110 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_disabledControlTextColor); 110 objc.id result = OS.objc_msgSend(OS.class_NSColor, OS.sel_disabledControlTextColor);
111 return result !is null ? new NSColor(result) : null; 111 return result !is null ? new NSColor(result) : null;
112 } 112 }
113 113
114 public void getComponents(float[] /*double[]*/ components) { 114 public void getComponents(CGFloat* components) {
115 OS.objc_msgSend(this.id, OS.sel_getComponents_, components); 115 OS.objc_msgSend(this.id, OS.sel_getComponents_, components);
116 } 116 }
117 117
118 public CGFloat greenComponent() { 118 public CGFloat greenComponent() {
119 return cast(CGFloat)OS.objc_msgSend_fpret(this.id, OS.sel_greenComponent); 119 return cast(CGFloat)OS.objc_msgSend_fpret(this.id, OS.sel_greenComponent);