Mercurial > projects > dstep
comparison 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 |
comparison
equal
deleted
inserted
replaced
10:27e00625790b | 11:07194b026fa4 |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Jul 12, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.corefoundation.CFCalendar; | |
8 | |
9 import dstep.corefoundation.CFBase; | |
10 import dstep.corefoundation.CFDate; | |
11 import dstep.corefoundation.CFLocale; | |
12 import dstep.corefoundation.CFTimeZone; | |
13 import dstep.objc.bridge.Bridge; | |
14 import dstep.objc.objc : id; | |
15 | |
16 struct __CFCalendar; | |
17 alias __CFCalendar* CFCalendarRef; | |
18 alias uint CFCalendarUnit; | |
19 | |
20 enum | |
21 { | |
22 kCFCalendarUnitEra = (1 << 1), | |
23 kCFCalendarUnitYear = (1 << 2), | |
24 kCFCalendarUnitMonth = (1 << 3), | |
25 kCFCalendarUnitDay = (1 << 4), | |
26 kCFCalendarUnitHour = (1 << 5), | |
27 kCFCalendarUnitMinute = (1 << 6), | |
28 kCFCalendarUnitSecond = (1 << 7), | |
29 kCFCalendarUnitWeek = (1 << 8), | |
30 kCFCalendarUnitWeekday = (1 << 9), | |
31 kCFCalendarUnitWeekdayOrdinal = (1 << 10) | |
32 } | |
33 | |
34 enum | |
35 { | |
36 kCFCalendarComponentsWrap = (1 << 0) | |
37 } | |
38 | |
39 extern (C) | |
40 { | |
41 uint CFCalendarGetTypeID (); | |
42 CFCalendarRef CFCalendarCopyCurrent (); | |
43 CFCalendarRef CFCalendarCreateWithIdentifier (CFAllocatorRef allocator, CFStringRef identifier); | |
44 CFStringRef CFCalendarGetIdentifier (CFCalendarRef calendar); | |
45 CFLocaleRef CFCalendarCopyLocale (CFCalendarRef calendar); | |
46 void CFCalendarSetLocale (CFCalendarRef calendar, CFLocaleRef locale); | |
47 CFTimeZoneRef CFCalendarCopyTimeZone (CFCalendarRef calendar); | |
48 void CFCalendarSetTimeZone (CFCalendarRef calendar, CFTimeZoneRef tz); | |
49 int CFCalendarGetFirstWeekday (CFCalendarRef calendar); | |
50 void CFCalendarSetFirstWeekday (CFCalendarRef calendar, int wkdy); | |
51 int CFCalendarGetMinimumDaysInFirstWeek (CFCalendarRef calendar); | |
52 void CFCalendarSetMinimumDaysInFirstWeek (CFCalendarRef calendar, int mwd); | |
53 CFRange CFCalendarGetMinimumRangeOfUnit (CFCalendarRef calendar, uint unit); | |
54 CFRange CFCalendarGetMaximumRangeOfUnit (CFCalendarRef calendar, uint unit); | |
55 CFRange CFCalendarGetRangeOfUnit (CFCalendarRef calendar, uint smallerUnit, uint biggerUnit, double at); | |
56 int CFCalendarGetOrdinalityOfUnit (CFCalendarRef calendar, uint smallerUnit, uint biggerUnit, double at); | |
57 ubyte CFCalendarGetTimeRangeOfUnit (CFCalendarRef calendar, uint unit, double at, double* startp, double* tip); | |
58 ubyte CFCalendarComposeAbsoluteTime (CFCalendarRef calendar, double* at, char* componentDesc, ...); | |
59 ubyte CFCalendarDecomposeAbsoluteTime (CFCalendarRef calendar, double at, char* componentDesc, ...); | |
60 ubyte CFCalendarAddComponents (CFCalendarRef calendar, double* at, uint options, char* componentDesc, ...); | |
61 ubyte CFCalendarGetComponentDifference (CFCalendarRef calendar, double startingAT, double resultAT, uint options, char* componentDesc, ...); | |
62 } |