diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/cocoa/NSDateComponents.d	Sat Aug 09 17:00:02 2008 +0200
@@ -0,0 +1,134 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ * Port to the D Programming language:
+ *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *******************************************************************************/
+module dwt.internal.cocoa.NSDateComponents;
+
+import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.NSInteger;
+import dwt.internal.cocoa.OS;
+import objc = dwt.internal.objc.runtime;
+
+public class NSDateComponents : NSObject
+{
+
+    public this ()
+    {
+        super();
+    }
+
+    public this (objc.id id)
+    {
+        super(id);
+    }
+
+    public NSInteger day ()
+    {
+        return OS.objc_msgSend(this.id, OS.sel_day);
+    }
+
+    public NSInteger era ()
+    {
+        return OS.objc_msgSend(this.id, OS.sel_era);
+    }
+
+    public NSInteger hour ()
+    {
+        return OS.objc_msgSend(this.id, OS.sel_hour);
+    }
+
+    public NSInteger minute ()
+    {
+        return OS.objc_msgSend(this.id, OS.sel_minute);
+    }
+
+    public NSInteger month ()
+    {
+        return OS.objc_msgSend(this.id, OS.sel_month);
+    }
+
+    public NSInteger second ()
+    {
+        return OS.objc_msgSend(this.id, OS.sel_second);
+    }
+
+    public void setDay (NSInteger v)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setDay_1, v);
+    }
+
+    public void setEra (NSInteger v)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setEra_1, v);
+    }
+
+    public void setHour (NSInteger v)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setHour_1, v);
+    }
+
+    public void setMinute (NSInteger v)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setMinute_1, v);
+    }
+
+    public void setMonth (NSInteger v)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setMonth_1, v);
+    }
+
+    public void setSecond (NSInteger v)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setSecond_1, v);
+    }
+
+    public void setWeek (NSInteger v)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setWeek_1, v);
+    }
+
+    public void setWeekday (NSInteger v)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setWeekday_1, v);
+    }
+
+    public void setWeekdayOrdinal (NSInteger v)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setWeekdayOrdinal_1, v);
+    }
+
+    public void setYear (NSInteger v)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setYear_1, v);
+    }
+
+    public NSInteger week ()
+    {
+        return OS.objc_msgSend(this.id, OS.sel_week);
+    }
+
+    public NSInteger weekday ()
+    {
+        return OS.objc_msgSend(this.id, OS.sel_weekday);
+    }
+
+    public NSInteger weekdayOrdinal ()
+    {
+        return OS.objc_msgSend(this.id, OS.sel_weekdayOrdinal);
+    }
+
+    public NSInteger year ()
+    {
+        return OS.objc_msgSend(this.id, OS.sel_year);
+    }
+
+}