comparison dwt/internal/cocoa/NSCalendarDate.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 return result !is null ? new NSCalendarDate(result) : null; 40 return result !is null ? new NSCalendarDate(result) : null;
41 } 41 }
42 42
43 public NSString calendarFormat () 43 public NSString calendarFormat ()
44 { 44 {
45 objc.id result = OS.objc_msgSend(this.id, OS.sel_calendarFormat); 45 objc.id result = OS.objc_msgSend(this.id_, OS.sel_calendarFormat);
46 return result !is null ? new NSString(result) : null; 46 return result !is null ? new NSString(result) : null;
47 } 47 }
48 48
49 public NSCalendarDate dateByAddingYears (NSInteger year, NSInteger month, NSInteger day, NSInteger hour, NSInteger minute, NSInteger second) 49 public NSCalendarDate dateByAddingYears (NSInteger year, NSInteger month, NSInteger day, NSInteger hour, NSInteger minute, NSInteger second)
50 { 50 {
51 objc.id result = OS.objc_msgSend(this.id, OS.sel_dateByAddingYears_1months_1days_1hours_1minutes_1seconds_1, year, month, day, hour, minute, 51 objc.id result = OS.objc_msgSend(this.id_, OS.sel_dateByAddingYears_1months_1days_1hours_1minutes_1seconds_1, year, month, day, hour, minute,
52 second); 52 second);
53 return result is this.id ? this : (result !is null ? new NSCalendarDate(result) : null); 53 return result is this.id_ ? this : (result !is null ? new NSCalendarDate(result) : null);
54 } 54 }
55 55
56 public static id static_dateWithString_calendarFormat_ (NSString description, NSString format) 56 public static id static_dateWithString_calendarFormat_ (NSString description, NSString format)
57 { 57 {
58 objc.id result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_dateWithString_1calendarFormat_1, 58 objc.id result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_dateWithString_1calendarFormat_1,
59 description !is null ? description.id : null, format !is null ? format.id : null); 59 description !is null ? description.id_ : null, format !is null ? format.id_ : null);
60 return result !is null ? new id(result) : null; 60 return result !is null ? new id(result) : null;
61 } 61 }
62 62
63 public static id static_dateWithString_calendarFormat_locale_ (NSString description, NSString format, id locale) 63 public static id static_dateWithString_calendarFormat_locale_ (NSString description, NSString format, id locale)
64 { 64 {
65 objc.id result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_dateWithString_1calendarFormat_1locale_1, 65 objc.id result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_dateWithString_1calendarFormat_1locale_1,
66 description !is null ? description.id : null, format !is null ? format.id : null, locale !is null ? locale.id : null); 66 description !is null ? description.id_ : null, format !is null ? format.id_ : null, locale !is null ? locale.id_ : null);
67 return result !is null ? new id(result) : null; 67 return result !is null ? new id(result) : null;
68 } 68 }
69 69
70 public static NSCalendarDate dateWithYear (NSInteger year, NSInteger month, NSInteger day, NSInteger hour, NSInteger minute, NSInteger second, NSTimeZone aTimeZone) 70 public static NSCalendarDate dateWithYear (NSInteger year, NSInteger month, NSInteger day, NSInteger hour, NSInteger minute, NSInteger second, NSTimeZone aTimeZone)
71 { 71 {
72 objc.id result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_dateWithYear_1month_1day_1hour_1minute_1second_1timeZone_1, year, month, 72 objc.id result = OS.objc_msgSend(OS.class_NSCalendarDate, OS.sel_dateWithYear_1month_1day_1hour_1minute_1second_1timeZone_1, year, month,
73 day, hour, minute, second, aTimeZone !is null ? aTimeZone.id : null); 73 day, hour, minute, second, aTimeZone !is null ? aTimeZone.id_ : null);
74 return result !is null ? new NSCalendarDate(result) : null; 74 return result !is null ? new NSCalendarDate(result) : null;
75 } 75 }
76 76
77 public NSInteger dayOfCommonEra () 77 public NSInteger dayOfCommonEra ()
78 { 78 {
79 return OS.objc_msgSend(this.id, OS.sel_dayOfCommonEra); 79 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_dayOfCommonEra);
80 } 80 }
81 81
82 public NSInteger dayOfMonth () 82 public NSInteger dayOfMonth ()
83 { 83 {
84 return OS.objc_msgSend(this.id, OS.sel_dayOfMonth); 84 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_dayOfMonth);
85 } 85 }
86 86
87 public NSInteger dayOfWeek () 87 public NSInteger dayOfWeek ()
88 { 88 {
89 return OS.objc_msgSend(this.id, OS.sel_dayOfWeek); 89 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_dayOfWeek);
90 } 90 }
91 91
92 public NSInteger dayOfYear () 92 public NSInteger dayOfYear ()
93 { 93 {
94 return OS.objc_msgSend(this.id, OS.sel_dayOfYear); 94 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_dayOfYear);
95 } 95 }
96 96
97 public NSString description () 97 public NSString description ()
98 { 98 {
99 objc.id result = OS.objc_msgSend(this.id, OS.sel_description); 99 objc.id result = OS.objc_msgSend(this.id_, OS.sel_description);
100 return result !is null ? new NSString(result) : null; 100 return result !is null ? new NSString(result) : null;
101 } 101 }
102 102
103 public NSString descriptionWithCalendarFormat_ (NSString format) 103 public NSString descriptionWithCalendarFormat_ (NSString format)
104 { 104 {
105 objc.id result = OS.objc_msgSend(this.id, OS.sel_descriptionWithCalendarFormat_1, format !is null ? format.id : null); 105 objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithCalendarFormat_1, format !is null ? format.id_ : null);
106 return result !is null ? new NSString(result) : null; 106 return result !is null ? new NSString(result) : null;
107 } 107 }
108 108
109 public NSString descriptionWithCalendarFormat_locale_ (NSString format, id locale) 109 public NSString descriptionWithCalendarFormat_locale_ (NSString format, id locale)
110 { 110 {
111 objc.id result = OS.objc_msgSend(this.id, OS.sel_descriptionWithCalendarFormat_1locale_1, format !is null ? format.id : null, 111 objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithCalendarFormat_1locale_1, format !is null ? format.id_ : null,
112 locale !is null ? locale.id : null); 112 locale !is null ? locale.id_ : null);
113 return result !is null ? new NSString(result) : null; 113 return result !is null ? new NSString(result) : null;
114 } 114 }
115 115
116 public NSString descriptionWithLocale (id locale) 116 public NSString descriptionWithLocale (id locale)
117 { 117 {
118 objc.id result = OS.objc_msgSend(this.id, OS.sel_descriptionWithLocale_1, locale !is null ? locale.id : null); 118 objc.id result = OS.objc_msgSend(this.id_, OS.sel_descriptionWithLocale_1, locale !is null ? locale.id_ : null);
119 return result !is null ? new NSString(result) : null; 119 return result !is null ? new NSString(result) : null;
120 } 120 }
121 121
122 public NSInteger hourOfDay () 122 public NSInteger hourOfDay ()
123 { 123 {
124 return OS.objc_msgSend(this.id, OS.sel_hourOfDay); 124 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_hourOfDay);
125 } 125 }
126 126
127 public NSCalendarDate initWithString_ (NSString description) 127 public NSCalendarDate initWithString_ (NSString description)
128 { 128 {
129 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithString_1, description !is null ? description.id : null); 129 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1, description !is null ? description.id_ : null);
130 return result !is null ? this : null; 130 return result !is null ? this : null;
131 } 131 }
132 132
133 public NSCalendarDate initWithString_calendarFormat_ (NSString description, NSString format) 133 public NSCalendarDate initWithString_calendarFormat_ (NSString description, NSString format)
134 { 134 {
135 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithString_1calendarFormat_1, description !is null ? description.id : null, 135 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1calendarFormat_1, description !is null ? description.id_ : null,
136 format !is null ? format.id : null); 136 format !is null ? format.id_ : null);
137 return result !is null ? this : null; 137 return result !is null ? this : null;
138 } 138 }
139 139
140 public NSCalendarDate initWithString_calendarFormat_locale_ (NSString description, NSString format, id locale) 140 public NSCalendarDate initWithString_calendarFormat_locale_ (NSString description, NSString format, id locale)
141 { 141 {
142 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithString_1calendarFormat_1locale_1, description !is null ? description.id : null, 142 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithString_1calendarFormat_1locale_1, description !is null ? description.id_ : null,
143 format !is null ? format.id : null, locale !is null ? locale.id : null); 143 format !is null ? format.id_ : null, locale !is null ? locale.id_ : null);
144 return result !is null ? this : null; 144 return result !is null ? this : null;
145 } 145 }
146 146
147 public id initWithYear (NSInteger year, NSUInteger month, NSUInteger day, NSUInteger hour, NSUInteger minute, NSUInteger second, NSTimeZone aTimeZone) 147 public id initWithYear (NSInteger year, NSUInteger month, NSUInteger day, NSUInteger hour, NSUInteger minute, NSUInteger second, NSTimeZone aTimeZone)
148 { 148 {
149 objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithYear_1month_1day_1hour_1minute_1second_1timeZone_1, year, month, day, hour, minute, 149 objc.id result = OS.objc_msgSend(this.id_, OS.sel_initWithYear_1month_1day_1hour_1minute_1second_1timeZone_1, year, month, day, hour, minute,
150 second, aTimeZone !is null ? aTimeZone.id : null); 150 second, aTimeZone !is null ? aTimeZone.id_ : null);
151 return result !is null ? new id(result) : null; 151 return result !is null ? new id(result) : null;
152 } 152 }
153 153
154 public NSInteger minuteOfHour () 154 public NSInteger minuteOfHour ()
155 { 155 {
156 return OS.objc_msgSend(this.id, OS.sel_minuteOfHour); 156 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_minuteOfHour);
157 } 157 }
158 158
159 public NSInteger monthOfYear () 159 public NSInteger monthOfYear ()
160 { 160 {
161 return OS.objc_msgSend(this.id, OS.sel_monthOfYear); 161 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_monthOfYear);
162 } 162 }
163 163
164 public NSInteger secondOfMinute () 164 public NSInteger secondOfMinute ()
165 { 165 {
166 return OS.objc_msgSend(this.id, OS.sel_secondOfMinute); 166 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_secondOfMinute);
167 } 167 }
168 168
169 public void setCalendarFormat (NSString format) 169 public void setCalendarFormat (NSString format)
170 { 170 {
171 OS.objc_msgSend(this.id, OS.sel_setCalendarFormat_1, format !is null ? format.id : null); 171 OS.objc_msgSend(this.id_, OS.sel_setCalendarFormat_1, format !is null ? format.id_ : null);
172 } 172 }
173 173
174 public void setTimeZone (NSTimeZone aTimeZone) 174 public void setTimeZone (NSTimeZone aTimeZone)
175 { 175 {
176 OS.objc_msgSend(this.id, OS.sel_setTimeZone_1, aTimeZone !is null ? aTimeZone.id : null); 176 OS.objc_msgSend(this.id_, OS.sel_setTimeZone_1, aTimeZone !is null ? aTimeZone.id_ : null);
177 } 177 }
178 178
179 public NSTimeZone timeZone () 179 public NSTimeZone timeZone ()
180 { 180 {
181 objc.id result = OS.objc_msgSend(this.id, OS.sel_timeZone); 181 objc.id result = OS.objc_msgSend(this.id_, OS.sel_timeZone);
182 return result !is null ? new NSTimeZone(result) : null; 182 return result !is null ? new NSTimeZone(result) : null;
183 } 183 }
184 184
185 public NSInteger yearOfCommonEra () 185 public NSInteger yearOfCommonEra ()
186 { 186 {
187 return OS.objc_msgSend(this.id, OS.sel_yearOfCommonEra); 187 return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_yearOfCommonEra);
188 } 188 }
189 189
190 public void years (NSInteger* yp, NSInteger* mop, NSInteger* dp, NSInteger* hp, NSInteger* mip, NSInteger* sp, NSCalendarDate date) 190 public void years (NSInteger* yp, NSInteger* mop, NSInteger* dp, NSInteger* hp, NSInteger* mip, NSInteger* sp, NSCalendarDate date)
191 { 191 {
192 OS.objc_msgSend(this.id, OS.sel_years_1months_1days_1hours_1minutes_1seconds_1sinceDate_1, yp, mop, dp, hp, mip, sp, 192 OS.objc_msgSend(this.id_, OS.sel_years_1months_1days_1hours_1minutes_1seconds_1sinceDate_1, yp, mop, dp, hp, mip, sp,
193 date !is null ? date.id : null); 193 date !is null ? date.id_ : null);
194 } 194 }
195 195
196 } 196 }