Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSGradient.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 |
---|---|
40 super(id); | 40 super(id); |
41 } | 41 } |
42 | 42 |
43 public NSColorSpace colorSpace () | 43 public NSColorSpace colorSpace () |
44 { | 44 { |
45 objc.id result = OS.objc_msgSend(this.id, OS.sel_colorSpace); | 45 objc.id result = OS.objc_msgSend(this.id_, OS.sel_colorSpace); |
46 return result !is null ? new NSColorSpace(result) : null; | 46 return result !is null ? new NSColorSpace(result) : null; |
47 } | 47 } |
48 | 48 |
49 public void drawFromCenter (NSPoint startCenter, CGFloat startRadius, NSPoint endCenter, CGFloat endRadius, NSGradientDrawingOptions options) | 49 public void drawFromCenter (NSPoint startCenter, CGFloat startRadius, NSPoint endCenter, CGFloat endRadius, NSGradientDrawingOptions options) |
50 { | 50 { |
51 OS.objc_msgSend(this.id, OS.sel_drawFromCenter_1radius_1toCenter_1radius_1options_1, startCenter, startRadius, endCenter, endRadius, options); | 51 OS.objc_msgSend(this.id_, OS.sel_drawFromCenter_1radius_1toCenter_1radius_1options_1, startCenter, startRadius, endCenter, endRadius, options); |
52 } | 52 } |
53 | 53 |
54 public void drawFromPoint (NSPoint startingPoint, NSPoint endingPoint, NSGradientDrawingOptions options) | 54 public void drawFromPoint (NSPoint startingPoint, NSPoint endingPoint, NSGradientDrawingOptions options) |
55 { | 55 { |
56 OS.objc_msgSend(this.id, OS.sel_drawFromPoint_1toPoint_1options_1, startingPoint, endingPoint, options); | 56 OS.objc_msgSend(this.id_, OS.sel_drawFromPoint_1toPoint_1options_1, startingPoint, endingPoint, options); |
57 } | 57 } |
58 | 58 |
59 public void drawInBezierPath_angle_ (NSBezierPath path, CGFloat angle) | 59 public void drawInBezierPath_angle_ (NSBezierPath path, CGFloat angle) |
60 { | 60 { |
61 OS.objc_msgSend(this.id, OS.sel_drawInBezierPath_1angle_1, path !is null ? path.id : null, angle); | 61 OS.objc_msgSend(this.id_, OS.sel_drawInBezierPath_1angle_1, path !is null ? path.id_ : null, angle); |
62 } | 62 } |
63 | 63 |
64 public void drawInBezierPath_relativeCenterPosition_ (NSBezierPath path, NSPoint relativeCenterPosition) | 64 public void drawInBezierPath_relativeCenterPosition_ (NSBezierPath path, NSPoint relativeCenterPosition) |
65 { | 65 { |
66 OS.objc_msgSend(this.id, OS.sel_drawInBezierPath_1relativeCenterPosition_1, path !is null ? path.id : null, relativeCenterPosition); | 66 OS.objc_msgSend(this.id_, OS.sel_drawInBezierPath_1relativeCenterPosition_1, path !is null ? path.id_ : null, relativeCenterPosition); |
67 } | 67 } |
68 | 68 |
69 public void drawInRect_angle_ (NSRect rect, CGFloat angle) | 69 public void drawInRect_angle_ (NSRect rect, CGFloat angle) |
70 { | 70 { |
71 OS.objc_msgSend(this.id, OS.sel_drawInRect_1angle_1, rect, angle); | 71 OS.objc_msgSend(this.id_, OS.sel_drawInRect_1angle_1, rect, angle); |
72 } | 72 } |
73 | 73 |
74 public void drawInRect_relativeCenterPosition_ (NSRect rect, NSPoint relativeCenterPosition) | 74 public void drawInRect_relativeCenterPosition_ (NSRect rect, NSPoint relativeCenterPosition) |
75 { | 75 { |
76 OS.objc_msgSend(this.id, OS.sel_drawInRect_1relativeCenterPosition_1, rect, relativeCenterPosition); | 76 OS.objc_msgSend(this.id_, OS.sel_drawInRect_1relativeCenterPosition_1, rect, relativeCenterPosition); |
77 } | 77 } |
78 | 78 |
79 public void getColor (objc.id** color, CGFloat* location, NSInteger index) | 79 public void getColor (objc.id** color, CGFloat* location, NSInteger index) |
80 { | 80 { |
81 OS.objc_msgSend(this.id, OS.sel_getColor_1location_1atIndex_1, color, location, index); | 81 OS.objc_msgSend(this.id_, OS.sel_getColor_1location_1atIndex_1, color, location, index); |
82 } | 82 } |
83 | 83 |
84 public NSGradient initWithColors_ (NSArray colorArray) | 84 public NSGradient initWithColors_ (NSArray colorArray) |
85 { | 85 { |
86 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithColors_1, colorArray !is null ? colorArray.id : null); | 86 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithColors_1, colorArray !is null ? colorArray.id_ : null); |
87 return result !is null ? this : null; | 87 return result !is null ? this : null; |
88 } | 88 } |
89 | 89 |
90 public NSGradient initWithColors_atLocations_colorSpace_ (NSArray colorArray, /*const*/CGFloat* locations, NSColorSpace colorSpace) | 90 public NSGradient initWithColors_atLocations_colorSpace_ (NSArray colorArray, /*const*/CGFloat* locations, NSColorSpace colorSpace) |
91 { | 91 { |
92 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithColors_1atLocations_1colorSpace_1, colorArray !is null ? colorArray.id : null, | 92 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithColors_1atLocations_1colorSpace_1, colorArray !is null ? colorArray.id_ : null, |
93 locations, colorSpace !is null ? colorSpace.id : null); | 93 locations, colorSpace !is null ? colorSpace.id_ : null); |
94 return result !is null ? this : null; | 94 return result !is null ? this : null; |
95 } | 95 } |
96 | 96 |
97 public NSGradient initWithColorsAndLocations (NSColor initWithColorsAndLocations) | 97 public NSGradient initWithColorsAndLocations (NSColor initWithColorsAndLocations) |
98 { | 98 { |
99 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithColorsAndLocations_1, | 99 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithColorsAndLocations_1, |
100 initWithColorsAndLocations !is null ? initWithColorsAndLocations.id : null); | 100 initWithColorsAndLocations !is null ? initWithColorsAndLocations.id_ : null); |
101 return result !is null ? this : null; | 101 return result !is null ? this : null; |
102 } | 102 } |
103 | 103 |
104 public NSGradient initWithStartingColor (NSColor startingColor, NSColor endingColor) | 104 public NSGradient initWithStartingColor (NSColor startingColor, NSColor endingColor) |
105 { | 105 { |
106 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithStartingColor_1endingColor_1, startingColor !is null ? startingColor.id : null, | 106 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithStartingColor_1endingColor_1, startingColor !is null ? startingColor.id_ : null, |
107 endingColor !is null ? endingColor.id : null); | 107 endingColor !is null ? endingColor.id_ : null); |
108 return result !is null ? this : null; | 108 return result !is null ? this : null; |
109 } | 109 } |
110 | 110 |
111 public NSColor interpolatedColorAtLocation (CGFloat location) | 111 public NSColor interpolatedColorAtLocation (CGFloat location) |
112 { | 112 { |
113 objc.id result = OS.objc_msgSend(this.id, OS.sel_interpolatedColorAtLocation_1, location); | 113 objc.id result = OS.objc_msgSend(this.id_, OS.sel_interpolatedColorAtLocation_1, location); |
114 return result !is null ? new NSColor(result) : null; | 114 return result !is null ? new NSColor(result) : null; |
115 } | 115 } |
116 | 116 |
117 public NSInteger numberOfColorStops () | 117 public NSInteger numberOfColorStops () |
118 { | 118 { |
119 return OS.objc_msgSend(this.id, OS.sel_numberOfColorStops); | 119 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_numberOfColorStops); |
120 } | 120 } |
121 | 121 |
122 } | 122 } |