Mercurial > projects > dwt-mac
view dwt/internal/cocoa/NSDateComponents.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 |
line wrap: on
line source
/******************************************************************************* * 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 cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_day); } public NSInteger era () { return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_era); } public NSInteger hour () { return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_hour); } public NSInteger minute () { return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_minute); } public NSInteger month () { return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_month); } public NSInteger second () { return cast(NSInteger) 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 cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_week); } public NSInteger weekday () { return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_weekday); } public NSInteger weekdayOrdinal () { return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_weekdayOrdinal); } public NSInteger year () { return cast(NSInteger) OS.objc_msgSend(this.id_, OS.sel_year); } }