]> gitweb @ CieloNegro.org - bindings-CarbonCore.git/blobdiff - Bindings/CoreServices/CarbonCore/UTCUtils.hsc
UTCUtils.h
[bindings-CarbonCore.git] / Bindings / CoreServices / CarbonCore / UTCUtils.hsc
diff --git a/Bindings/CoreServices/CarbonCore/UTCUtils.hsc b/Bindings/CoreServices/CarbonCore/UTCUtils.hsc
new file mode 100644 (file)
index 0000000..0115a52
--- /dev/null
@@ -0,0 +1,35 @@
+#include <bindings.dsl.h>
+#include <CoreServices/CoreServices.h>
+
+module Bindings.CoreServices.CarbonCore.UTCUtils where
+#strict_import
+import Bindings.CoreServices.CarbonCore.MacTypes
+
+#num kUTCDefaultOptions
+
+#starttype struct UTCDateTime
+#  field highSeconds, <UInt16>
+#  field lowSeconds , <UInt32>
+#  field fraction   , <UInt16>
+#stoptype
+#synonym_t UTCDateTimePtr   , Ptr <UTCDateTime>
+#synonym_t UTCDateTimeHandle, Ptr <UTCDateTimePtr>
+
+#starttype struct LocalDateTime
+#  field highSeconds, <UInt16>
+#  field lowSeconds , <UInt32>
+#  field fraction   , <UInt16>
+#stoptype
+#synonym_t LocalDateTimePtr   , Ptr <LocalDateTime>
+#synonym_t LocalDateTimeHandle, Ptr <LocalDateTimePtr>
+
+#if !__LP64__
+#  ccall ConvertLocalTimeToUTC    , <UInt32> -> Ptr <UInt32> -> IO <OSStatus>
+#  ccall ConvertUTCToLocalTime    , <UInt32> -> Ptr <UInt32> -> IO <OSStatus>
+#  ccall ConvertUTCToLocalDateTime, Ptr <UTCDateTime> -> Ptr <LocalDateTime> -> IO <OSStatus>
+#  ccall ConvertLocalToUTCDateTime, Ptr <LocalDateTime> -> Ptr <UTCDateTime> -> IO <OSStatus>
+#  ccall GetUTCDateTime           , Ptr <UTCDateTime> -> <OptionBits> -> IO <OSStatus>
+#  ccall SetUTCDateTime           , Ptr <UTCDateTime> -> <OptionBits> -> IO <OSStatus>
+#  ccall GetLocalDateTime         , Ptr <LocalDateTime> -> <OptionBits> -> IO <OSStatus>
+#  ccall SetLocalDateTime         , Ptr <LocalDateTime> -> <OptionBits> -> IO <OSStatus>
+#endif
\ No newline at end of file