Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSDateComponents.d @ 0:380af2bdd8e5
Upload of whole dwt tree
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Sat, 09 Aug 2008 17:00:02 +0200 |
parents | |
children | 8b48be5454ce |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:380af2bdd8e5 |
---|---|
1 /******************************************************************************* | |
2 * Copyright (c) 2007 IBM Corporation and others. | |
3 * All rights reserved. This program and the accompanying materials | |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
10 * | |
11 * Port to the D Programming language: | |
12 * Jacob Carlborg <jacob.carlborg@gmail.com> | |
13 *******************************************************************************/ | |
14 module dwt.internal.cocoa.NSDateComponents; | |
15 | |
16 import dwt.internal.cocoa.NSObject; | |
17 import dwt.internal.cocoa.NSInteger; | |
18 import dwt.internal.cocoa.OS; | |
19 import objc = dwt.internal.objc.runtime; | |
20 | |
21 public class NSDateComponents : NSObject | |
22 { | |
23 | |
24 public this () | |
25 { | |
26 super(); | |
27 } | |
28 | |
29 public this (objc.id id) | |
30 { | |
31 super(id); | |
32 } | |
33 | |
34 public NSInteger day () | |
35 { | |
36 return OS.objc_msgSend(this.id, OS.sel_day); | |
37 } | |
38 | |
39 public NSInteger era () | |
40 { | |
41 return OS.objc_msgSend(this.id, OS.sel_era); | |
42 } | |
43 | |
44 public NSInteger hour () | |
45 { | |
46 return OS.objc_msgSend(this.id, OS.sel_hour); | |
47 } | |
48 | |
49 public NSInteger minute () | |
50 { | |
51 return OS.objc_msgSend(this.id, OS.sel_minute); | |
52 } | |
53 | |
54 public NSInteger month () | |
55 { | |
56 return OS.objc_msgSend(this.id, OS.sel_month); | |
57 } | |
58 | |
59 public NSInteger second () | |
60 { | |
61 return OS.objc_msgSend(this.id, OS.sel_second); | |
62 } | |
63 | |
64 public void setDay (NSInteger v) | |
65 { | |
66 OS.objc_msgSend(this.id, OS.sel_setDay_1, v); | |
67 } | |
68 | |
69 public void setEra (NSInteger v) | |
70 { | |
71 OS.objc_msgSend(this.id, OS.sel_setEra_1, v); | |
72 } | |
73 | |
74 public void setHour (NSInteger v) | |
75 { | |
76 OS.objc_msgSend(this.id, OS.sel_setHour_1, v); | |
77 } | |
78 | |
79 public void setMinute (NSInteger v) | |
80 { | |
81 OS.objc_msgSend(this.id, OS.sel_setMinute_1, v); | |
82 } | |
83 | |
84 public void setMonth (NSInteger v) | |
85 { | |
86 OS.objc_msgSend(this.id, OS.sel_setMonth_1, v); | |
87 } | |
88 | |
89 public void setSecond (NSInteger v) | |
90 { | |
91 OS.objc_msgSend(this.id, OS.sel_setSecond_1, v); | |
92 } | |
93 | |
94 public void setWeek (NSInteger v) | |
95 { | |
96 OS.objc_msgSend(this.id, OS.sel_setWeek_1, v); | |
97 } | |
98 | |
99 public void setWeekday (NSInteger v) | |
100 { | |
101 OS.objc_msgSend(this.id, OS.sel_setWeekday_1, v); | |
102 } | |
103 | |
104 public void setWeekdayOrdinal (NSInteger v) | |
105 { | |
106 OS.objc_msgSend(this.id, OS.sel_setWeekdayOrdinal_1, v); | |
107 } | |
108 | |
109 public void setYear (NSInteger v) | |
110 { | |
111 OS.objc_msgSend(this.id, OS.sel_setYear_1, v); | |
112 } | |
113 | |
114 public NSInteger week () | |
115 { | |
116 return OS.objc_msgSend(this.id, OS.sel_week); | |
117 } | |
118 | |
119 public NSInteger weekday () | |
120 { | |
121 return OS.objc_msgSend(this.id, OS.sel_weekday); | |
122 } | |
123 | |
124 public NSInteger weekdayOrdinal () | |
125 { | |
126 return OS.objc_msgSend(this.id, OS.sel_weekdayOrdinal); | |
127 } | |
128 | |
129 public NSInteger year () | |
130 { | |
131 return OS.objc_msgSend(this.id, OS.sel_year); | |
132 } | |
133 | |
134 } |