comparison dwt/internal/cocoa/NSProgressIndicator.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
11 * Port to the D Programming language: 11 * Port to the D Programming language:
12 * Jacob Carlborg <jacob.carlborg@gmail.com> 12 * Jacob Carlborg <jacob.carlborg@gmail.com>
13 *******************************************************************************/ 13 *******************************************************************************/
14 module dwt.internal.cocoa.NSProgressIndicator; 14 module dwt.internal.cocoa.NSProgressIndicator;
15 15
16 import dwt.internal.cocoa.id;
16 import dwt.internal.cocoa.NSDate : NSTimeInterval; 17 import dwt.internal.cocoa.NSDate : NSTimeInterval;
17 import dwt.internal.cocoa.NSCell : NSControlTint, NSControlSize; 18 import dwt.internal.cocoa.NSCell : NSControlTint, NSControlSize;
18 import dwt.internal.cocoa.NSView; 19 import dwt.internal.cocoa.NSView;
19 import dwt.internal.cocoa.OS; 20 import dwt.internal.cocoa.OS;
20 import objc = dwt.internal.objc.runtime; 21 import objc = dwt.internal.objc.runtime;
41 super(id); 42 super(id);
42 } 43 }
43 44
44 public void animate (id sender) 45 public void animate (id sender)
45 { 46 {
46 OS.objc_msgSend(this.id, OS.sel_animate_1, sender !is null ? sender.id : null); 47 OS.objc_msgSend(this.id_, OS.sel_animate_1, sender !is null ? sender.id_ : null);
47 } 48 }
48 49
49 public NSTimeInterval animationDelay () 50 public NSTimeInterval animationDelay ()
50 { 51 {
51 return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id, OS.sel_animationDelay); 52 return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id_, OS.sel_animationDelay);
52 } 53 }
53 54
54 public NSControlSize controlSize () 55 public NSControlSize controlSize ()
55 { 56 {
56 return cast(NSControlSize) OS.objc_msgSend(this.id, OS.sel_controlSize); 57 return cast(NSControlSize) OS.objc_msgSend(this.id_, OS.sel_controlSize);
57 } 58 }
58 59
59 public NSControlTint controlTint () 60 public NSControlTint controlTint ()
60 { 61 {
61 return OS.objc_msgSend(this.id, OS.sel_controlTint); 62 return cast(NSControlTint) OS.objc_msgSend(this.id_, OS.sel_controlTint);
62 } 63 }
63 64
64 public double doubleValue () 65 public double doubleValue ()
65 { 66 {
66 return OS.objc_msgSend_fpret(this.id, OS.sel_doubleValue); 67 return OS.objc_msgSend_fpret(this.id_, OS.sel_doubleValue);
67 } 68 }
68 69
69 public void incrementBy (double delta) 70 public void incrementBy (double delta)
70 { 71 {
71 OS.objc_msgSend(this.id, OS.sel_incrementBy_1, delta); 72 OS.objc_msgSend(this.id_, OS.sel_incrementBy_1, delta);
72 } 73 }
73 74
74 public bool isBezeled () 75 public bool isBezeled ()
75 { 76 {
76 return OS.objc_msgSend(this.id, OS.sel_isBezeled) !is null; 77 return OS.objc_msgSend(this.id_, OS.sel_isBezeled) !is null;
77 } 78 }
78 79
79 public bool isDisplayedWhenStopped () 80 public bool isDisplayedWhenStopped ()
80 { 81 {
81 return OS.objc_msgSend(this.id, OS.sel_isDisplayedWhenStopped) !is null; 82 return OS.objc_msgSend(this.id_, OS.sel_isDisplayedWhenStopped) !is null;
82 } 83 }
83 84
84 public bool isIndeterminate () 85 public bool isIndeterminate ()
85 { 86 {
86 return OS.objc_msgSend(this.id, OS.sel_isIndeterminate) !is null; 87 return OS.objc_msgSend(this.id_, OS.sel_isIndeterminate) !is null;
87 } 88 }
88 89
89 public double maxValue () 90 public double maxValue ()
90 { 91 {
91 return OS.objc_msgSend_fpret(this.id, OS.sel_maxValue); 92 return OS.objc_msgSend_fpret(this.id_, OS.sel_maxValue);
92 } 93 }
93 94
94 public double minValue () 95 public double minValue ()
95 { 96 {
96 return OS.objc_msgSend_fpret(this.id, OS.sel_minValue); 97 return OS.objc_msgSend_fpret(this.id_, OS.sel_minValue);
97 } 98 }
98 99
99 public void setAnimationDelay (NSTimeInterval delay) 100 public void setAnimationDelay (NSTimeInterval delay)
100 { 101 {
101 OS.objc_msgSend(this.id, OS.sel_setAnimationDelay_1, delay); 102 OS.objc_msgSend(this.id_, OS.sel_setAnimationDelay_1, delay);
102 } 103 }
103 104
104 public void setBezeled (bool flag) 105 public void setBezeled (bool flag)
105 { 106 {
106 OS.objc_msgSend(this.id, OS.sel_setBezeled_1, flag); 107 OS.objc_msgSend(this.id_, OS.sel_setBezeled_1, flag);
107 } 108 }
108 109
109 public void setControlSize (NSControlSize size) 110 public void setControlSize (NSControlSize size)
110 { 111 {
111 OS.objc_msgSend(this.id, OS.sel_setControlSize_1, size); 112 OS.objc_msgSend(this.id_, OS.sel_setControlSize_1, size);
112 } 113 }
113 114
114 public void setControlTint (NSControlSize tint) 115 public void setControlTint (NSControlSize tint)
115 { 116 {
116 OS.objc_msgSend(this.id, OS.sel_setControlTint_1, tint); 117 OS.objc_msgSend(this.id_, OS.sel_setControlTint_1, tint);
117 } 118 }
118 119
119 public void setDisplayedWhenStopped (bool isDisplayed) 120 public void setDisplayedWhenStopped (bool isDisplayed)
120 { 121 {
121 OS.objc_msgSend(this.id, OS.sel_setDisplayedWhenStopped_1, isDisplayed); 122 OS.objc_msgSend(this.id_, OS.sel_setDisplayedWhenStopped_1, isDisplayed);
122 } 123 }
123 124
124 public void setDoubleValue (double doubleValue) 125 public void setDoubleValue (double doubleValue)
125 { 126 {
126 OS.objc_msgSend(this.id, OS.sel_setDoubleValue_1, doubleValue); 127 OS.objc_msgSend(this.id_, OS.sel_setDoubleValue_1, doubleValue);
127 } 128 }
128 129
129 public void setIndeterminate (bool flag) 130 public void setIndeterminate (bool flag)
130 { 131 {
131 OS.objc_msgSend(this.id, OS.sel_setIndeterminate_1, flag); 132 OS.objc_msgSend(this.id_, OS.sel_setIndeterminate_1, flag);
132 } 133 }
133 134
134 public void setMaxValue (double newMaximum) 135 public void setMaxValue (double newMaximum)
135 { 136 {
136 OS.objc_msgSend(this.id, OS.sel_setMaxValue_1, newMaximum); 137 OS.objc_msgSend(this.id_, OS.sel_setMaxValue_1, newMaximum);
137 } 138 }
138 139
139 public void setMinValue (double newMinimum) 140 public void setMinValue (double newMinimum)
140 { 141 {
141 OS.objc_msgSend(this.id, OS.sel_setMinValue_1, newMinimum); 142 OS.objc_msgSend(this.id_, OS.sel_setMinValue_1, newMinimum);
142 } 143 }
143 144
144 public void setStyle (NSProgressIndicatorStyle style) 145 public void setStyle (NSProgressIndicatorStyle style)
145 { 146 {
146 OS.objc_msgSend(this.id, OS.sel_setStyle_1, style); 147 OS.objc_msgSend(this.id_, OS.sel_setStyle_1, style);
147 } 148 }
148 149
149 public void setUsesThreadedAnimation (bool threadedAnimation) 150 public void setUsesThreadedAnimation (bool threadedAnimation)
150 { 151 {
151 OS.objc_msgSend(this.id, OS.sel_setUsesThreadedAnimation_1, threadedAnimation); 152 OS.objc_msgSend(this.id_, OS.sel_setUsesThreadedAnimation_1, threadedAnimation);
152 } 153 }
153 154
154 public void sizeToFit () 155 public void sizeToFit ()
155 { 156 {
156 OS.objc_msgSend(this.id, OS.sel_sizeToFit); 157 OS.objc_msgSend(this.id_, OS.sel_sizeToFit);
157 } 158 }
158 159
159 public void startAnimation (id sender) 160 public void startAnimation (id sender)
160 { 161 {
161 OS.objc_msgSend(this.id, OS.sel_startAnimation_1, sender !is null ? sender.id : null); 162 OS.objc_msgSend(this.id_, OS.sel_startAnimation_1, sender !is null ? sender.id_ : null);
162 } 163 }
163 164
164 public void stopAnimation (id sender) 165 public void stopAnimation (id sender)
165 { 166 {
166 OS.objc_msgSend(this.id, OS.sel_stopAnimation_1, sender !is null ? sender.id : null); 167 OS.objc_msgSend(this.id_, OS.sel_stopAnimation_1, sender !is null ? sender.id_ : null);
167 } 168 }
168 169
169 public NSProgressIndicatorStyle style () 170 public NSProgressIndicatorStyle style ()
170 { 171 {
171 return cast(NSProgressIndicatorStyle) OS.objc_msgSend(this.id, OS.sel_style); 172 return cast(NSProgressIndicatorStyle) OS.objc_msgSend(this.id_, OS.sel_style);
172 } 173 }
173 174
174 public bool usesThreadedAnimation () 175 public bool usesThreadedAnimation ()
175 { 176 {
176 return OS.objc_msgSend(this.id, OS.sel_usesThreadedAnimation) !is null; 177 return OS.objc_msgSend(this.id_, OS.sel_usesThreadedAnimation) !is null;
177 } 178 }
178 179
179 } 180 }