Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSTimeZone.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 |
---|---|
51 super(id); | 51 super(id); |
52 } | 52 } |
53 | 53 |
54 public NSString abbreviation () | 54 public NSString abbreviation () |
55 { | 55 { |
56 objc.id result = OS.objc_msgSend(this.id, OS.sel_abbreviation); | 56 objc.id result = OS.objc_msgSend(this.id_, OS.sel_abbreviation); |
57 return result !is null ? new NSString(result) : null; | 57 return result !is null ? new NSString(result) : null; |
58 } | 58 } |
59 | 59 |
60 public static NSDictionary abbreviationDictionary () | 60 public static NSDictionary abbreviationDictionary () |
61 { | 61 { |
63 return result !is null ? new NSDictionary(result) : null; | 63 return result !is null ? new NSDictionary(result) : null; |
64 } | 64 } |
65 | 65 |
66 public NSString abbreviationForDate (NSDate aDate) | 66 public NSString abbreviationForDate (NSDate aDate) |
67 { | 67 { |
68 objc.id result = OS.objc_msgSend(this.id, OS.sel_abbreviationForDate_1, aDate !is null ? aDate.id : null); | 68 objc.id result = OS.objc_msgSend(this.id_, OS.sel_abbreviationForDate_1, aDate !is null ? aDate.id_ : null); |
69 return result !is null ? new NSString(result) : null; | 69 return result !is null ? new NSString(result) : null; |
70 } | 70 } |
71 | 71 |
72 public NSData data () | 72 public NSData data () |
73 { | 73 { |
74 objc.id result = OS.objc_msgSend(this.id, OS.sel_data); | 74 objc.id result = OS.objc_msgSend(this.id_, OS.sel_data); |
75 return result !is null ? new NSData(result) : null; | 75 return result !is null ? new NSData(result) : null; |
76 } | 76 } |
77 | 77 |
78 public NSTimeInterval daylightSavingTimeOffset () | 78 public NSTimeInterval daylightSavingTimeOffset () |
79 { | 79 { |
80 return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id, OS.sel_daylightSavingTimeOffset); | 80 return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id_, OS.sel_daylightSavingTimeOffset); |
81 } | 81 } |
82 | 82 |
83 public NSTimeInterval daylightSavingTimeOffsetForDate (NSDate aDate) | 83 public NSTimeInterval daylightSavingTimeOffsetForDate (NSDate aDate) |
84 { | 84 { |
85 return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id, OS.sel_daylightSavingTimeOffsetForDate_1, aDate !is null ? aDate.id : null); | 85 return cast(NSTimeInterval) OS.objc_msgSend_fpret(this.id_, OS.sel_daylightSavingTimeOffsetForDate_1, aDate !is null ? aDate.id_ : null); |
86 } | 86 } |
87 | 87 |
88 public static NSTimeZone defaultTimeZone () | 88 public static NSTimeZone defaultTimeZone () |
89 { | 89 { |
90 objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_defaultTimeZone); | 90 objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_defaultTimeZone); |
91 return result !is null ? new NSTimeZone(result) : null; | 91 return result !is null ? new NSTimeZone(result) : null; |
92 } | 92 } |
93 | 93 |
94 public NSString description () | 94 public NSString description () |
95 { | 95 { |
96 objc.id result = OS.objc_msgSend(this.id, OS.sel_description); | 96 objc.id result = OS.objc_msgSend(this.id_, OS.sel_description); |
97 return result !is null ? new NSString(result) : null; | 97 return result !is null ? new NSString(result) : null; |
98 } | 98 } |
99 | 99 |
100 public id initWithName_ (NSString tzName) | 100 public id initWithName_ (NSString tzName) |
101 { | 101 { |
102 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithName_1, tzName !is null ? tzName.id : null); | 102 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithName_1, tzName !is null ? tzName.id_ : null); |
103 return result !is null ? new id(result) : null; | 103 return result !is null ? new id(result) : null; |
104 } | 104 } |
105 | 105 |
106 public id initWithName_data_ (NSString tzName, NSData aData) | 106 public id initWithName_data_ (NSString tzName, NSData aData) |
107 { | 107 { |
108 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithName_1data_1, tzName !is null ? tzName.id : null, aData !is null ? aData.id : null); | 108 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithName_1data_1, tzName !is null ? tzName.id_ : null, aData !is null ? aData.id_ : null); |
109 return result !is null ? new id(result) : null; | 109 return result !is null ? new id(result) : null; |
110 } | 110 } |
111 | 111 |
112 public bool isDaylightSavingTime () | 112 public bool isDaylightSavingTime () |
113 { | 113 { |
114 return OS.objc_msgSend(this.id, OS.sel_isDaylightSavingTime) !is null; | 114 return OS.objc_msgSend(this.id_, OS.sel_isDaylightSavingTime) !is null; |
115 } | 115 } |
116 | 116 |
117 public bool isDaylightSavingTimeForDate (NSDate aDate) | 117 public bool isDaylightSavingTimeForDate (NSDate aDate) |
118 { | 118 { |
119 return OS.objc_msgSend(this.id, OS.sel_isDaylightSavingTimeForDate_1, aDate !is null ? aDate.id : null) !is null; | 119 return OS.objc_msgSend(this.id_, OS.sel_isDaylightSavingTimeForDate_1, aDate !is null ? aDate.id_ : null) !is null; |
120 } | 120 } |
121 | 121 |
122 public bool isEqualToTimeZone (NSTimeZone aTimeZone) | 122 public bool isEqualToTimeZone (NSTimeZone aTimeZone) |
123 { | 123 { |
124 return OS.objc_msgSend(this.id, OS.sel_isEqualToTimeZone_1, aTimeZone !is null ? aTimeZone.id : null) !is null; | 124 return OS.objc_msgSend(this.id_, OS.sel_isEqualToTimeZone_1, aTimeZone !is null ? aTimeZone.id_ : null) !is null; |
125 } | 125 } |
126 | 126 |
127 public static NSArray knownTimeZoneNames () | 127 public static NSArray knownTimeZoneNames () |
128 { | 128 { |
129 objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_knownTimeZoneNames); | 129 objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_knownTimeZoneNames); |
136 return result !is null ? new NSTimeZone(result) : null; | 136 return result !is null ? new NSTimeZone(result) : null; |
137 } | 137 } |
138 | 138 |
139 public NSString localizedName (NSTimeZoneNameStyle style, NSLocale locale) | 139 public NSString localizedName (NSTimeZoneNameStyle style, NSLocale locale) |
140 { | 140 { |
141 objc.id result = OS.objc_msgSend(this.id, OS.sel_localizedName_1locale_1, style, locale !is null ? locale.id : null); | 141 objc.id result = OS.objc_msgSend(this.id_, OS.sel_localizedName_1locale_1, style, locale !is null ? locale.id_ : null); |
142 return result !is null ? new NSString(result) : null; | 142 return result !is null ? new NSString(result) : null; |
143 } | 143 } |
144 | 144 |
145 public NSString name () | 145 public NSString name () |
146 { | 146 { |
147 objc.id result = OS.objc_msgSend(this.id, OS.sel_name); | 147 objc.id result = OS.objc_msgSend(this.id_, OS.sel_name); |
148 return result !is null ? new NSString(result) : null; | 148 return result !is null ? new NSString(result) : null; |
149 } | 149 } |
150 | 150 |
151 public NSDate nextDaylightSavingTimeTransition () | 151 public NSDate nextDaylightSavingTimeTransition () |
152 { | 152 { |
153 objc.id result = OS.objc_msgSend(this.id, OS.sel_nextDaylightSavingTimeTransition); | 153 objc.id result = OS.objc_msgSend(this.id_, OS.sel_nextDaylightSavingTimeTransition); |
154 return result !is null ? new NSDate(result) : null; | 154 return result !is null ? new NSDate(result) : null; |
155 } | 155 } |
156 | 156 |
157 public NSDate nextDaylightSavingTimeTransitionAfterDate (NSDate aDate) | 157 public NSDate nextDaylightSavingTimeTransitionAfterDate (NSDate aDate) |
158 { | 158 { |
159 objc.id result = OS.objc_msgSend(this.id, OS.sel_nextDaylightSavingTimeTransitionAfterDate_1, aDate !is null ? aDate.id : null); | 159 objc.id result = OS.objc_msgSend(this.id_, OS.sel_nextDaylightSavingTimeTransitionAfterDate_1, aDate !is null ? aDate.id_ : null); |
160 return result !is null ? new NSDate(result) : null; | 160 return result !is null ? new NSDate(result) : null; |
161 } | 161 } |
162 | 162 |
163 public static void resetSystemTimeZone () | 163 public static void resetSystemTimeZone () |
164 { | 164 { |
165 OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_resetSystemTimeZone); | 165 OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_resetSystemTimeZone); |
166 } | 166 } |
167 | 167 |
168 public NSInteger secondsFromGMT () | 168 public NSInteger secondsFromGMT () |
169 { | 169 { |
170 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_secondsFromGMT); | 170 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_secondsFromGMT); |
171 } | 171 } |
172 | 172 |
173 public NSInteger secondsFromGMTForDate (NSDate aDate) | 173 public NSInteger secondsFromGMTForDate (NSDate aDate) |
174 { | 174 { |
175 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_secondsFromGMTForDate_1, aDate !is null ? aDate.id : null); | 175 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_secondsFromGMTForDate_1, aDate !is null ? aDate.id_ : null); |
176 } | 176 } |
177 | 177 |
178 public static void setDefaultTimeZone (NSTimeZone aTimeZone) | 178 public static void setDefaultTimeZone (NSTimeZone aTimeZone) |
179 { | 179 { |
180 OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_setDefaultTimeZone_1, aTimeZone !is null ? aTimeZone.id : null); | 180 OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_setDefaultTimeZone_1, aTimeZone !is null ? aTimeZone.id_ : null); |
181 } | 181 } |
182 | 182 |
183 public static NSTimeZone systemTimeZone () | 183 public static NSTimeZone systemTimeZone () |
184 { | 184 { |
185 objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_systemTimeZone); | 185 objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_systemTimeZone); |
192 return result !is null ? new id(result) : null; | 192 return result !is null ? new id(result) : null; |
193 } | 193 } |
194 | 194 |
195 public static id timeZoneWithAbbreviation (NSString abbreviation) | 195 public static id timeZoneWithAbbreviation (NSString abbreviation) |
196 { | 196 { |
197 objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_timeZoneWithAbbreviation_1, abbreviation !is null ? abbreviation.id : null); | 197 objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_timeZoneWithAbbreviation_1, abbreviation !is null ? abbreviation.id_ : null); |
198 return result !is null ? new id(result) : null; | 198 return result !is null ? new id(result) : null; |
199 } | 199 } |
200 | 200 |
201 public static id static_timeZoneWithName_ (NSString tzName) | 201 public static id static_timeZoneWithName_ (NSString tzName) |
202 { | 202 { |
203 objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_timeZoneWithName_1, tzName !is null ? tzName.id : null); | 203 objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_timeZoneWithName_1, tzName !is null ? tzName.id_ : null); |
204 return result !is null ? new id(result) : null; | 204 return result !is null ? new id(result) : null; |
205 } | 205 } |
206 | 206 |
207 public static id static_timeZoneWithName_data_ (NSString tzName, NSData aData) | 207 public static id static_timeZoneWithName_data_ (NSString tzName, NSData aData) |
208 { | 208 { |
209 objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_timeZoneWithName_1data_1, tzName !is null ? tzName.id : null, | 209 objc.id result = OS.objc_msgSend(OS.class_NSTimeZone, OS.sel_timeZoneWithName_1data_1, tzName !is null ? tzName.id_ : null, |
210 aData !is null ? aData.id : null); | 210 aData !is null ? aData.id_ : null); |
211 return result !is null ? new id(result) : null; | 211 return result !is null ? new id(result) : null; |
212 } | 212 } |
213 | 213 |
214 } | 214 } |