Mercurial > projects > dstep
diff dstep/corefoundation/CFCalendar.d @ 11:07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sat, 01 Aug 2009 15:03:28 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dstep/corefoundation/CFCalendar.d Sat Aug 01 15:03:28 2009 +0200 @@ -0,0 +1,62 @@ +/** + * Copyright: Copyright (c) 2009 Jacob Carlborg. + * Authors: Jacob Carlborg + * Version: Initial created: Jul 12, 2009 + * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) + */ +module dstep.corefoundation.CFCalendar; + +import dstep.corefoundation.CFBase; +import dstep.corefoundation.CFDate; +import dstep.corefoundation.CFLocale; +import dstep.corefoundation.CFTimeZone; +import dstep.objc.bridge.Bridge; +import dstep.objc.objc : id; + +struct __CFCalendar; +alias __CFCalendar* CFCalendarRef; +alias uint CFCalendarUnit; + +enum +{ + kCFCalendarUnitEra = (1 << 1), + kCFCalendarUnitYear = (1 << 2), + kCFCalendarUnitMonth = (1 << 3), + kCFCalendarUnitDay = (1 << 4), + kCFCalendarUnitHour = (1 << 5), + kCFCalendarUnitMinute = (1 << 6), + kCFCalendarUnitSecond = (1 << 7), + kCFCalendarUnitWeek = (1 << 8), + kCFCalendarUnitWeekday = (1 << 9), + kCFCalendarUnitWeekdayOrdinal = (1 << 10) +} + +enum +{ + kCFCalendarComponentsWrap = (1 << 0) +} + +extern (C) +{ + uint CFCalendarGetTypeID (); + CFCalendarRef CFCalendarCopyCurrent (); + CFCalendarRef CFCalendarCreateWithIdentifier (CFAllocatorRef allocator, CFStringRef identifier); + CFStringRef CFCalendarGetIdentifier (CFCalendarRef calendar); + CFLocaleRef CFCalendarCopyLocale (CFCalendarRef calendar); + void CFCalendarSetLocale (CFCalendarRef calendar, CFLocaleRef locale); + CFTimeZoneRef CFCalendarCopyTimeZone (CFCalendarRef calendar); + void CFCalendarSetTimeZone (CFCalendarRef calendar, CFTimeZoneRef tz); + int CFCalendarGetFirstWeekday (CFCalendarRef calendar); + void CFCalendarSetFirstWeekday (CFCalendarRef calendar, int wkdy); + int CFCalendarGetMinimumDaysInFirstWeek (CFCalendarRef calendar); + void CFCalendarSetMinimumDaysInFirstWeek (CFCalendarRef calendar, int mwd); + CFRange CFCalendarGetMinimumRangeOfUnit (CFCalendarRef calendar, uint unit); + CFRange CFCalendarGetMaximumRangeOfUnit (CFCalendarRef calendar, uint unit); + CFRange CFCalendarGetRangeOfUnit (CFCalendarRef calendar, uint smallerUnit, uint biggerUnit, double at); + int CFCalendarGetOrdinalityOfUnit (CFCalendarRef calendar, uint smallerUnit, uint biggerUnit, double at); + ubyte CFCalendarGetTimeRangeOfUnit (CFCalendarRef calendar, uint unit, double at, double* startp, double* tip); + ubyte CFCalendarComposeAbsoluteTime (CFCalendarRef calendar, double* at, char* componentDesc, ...); + ubyte CFCalendarDecomposeAbsoluteTime (CFCalendarRef calendar, double at, char* componentDesc, ...); + ubyte CFCalendarAddComponents (CFCalendarRef calendar, double* at, uint options, char* componentDesc, ...); + ubyte CFCalendarGetComponentDifference (CFCalendarRef calendar, double startingAT, double resultAT, uint options, char* componentDesc, ...); +} \ No newline at end of file