CFLocale.h
authorPHO <pho@cielonegro.org>
Mon, 18 Oct 2010 15:18:41 +0000 (00:18 +0900)
committerPHO <pho@cielonegro.org>
Mon, 18 Oct 2010 15:18:41 +0000 (00:18 +0900)
Bindings/CoreFoundation/CFLocale.hsc [new file with mode: 0644]
bindings-CoreFoundation.cabal
cbits/helper_CFLocale.c [new file with mode: 0644]

diff --git a/Bindings/CoreFoundation/CFLocale.hsc b/Bindings/CoreFoundation/CFLocale.hsc
new file mode 100644 (file)
index 0000000..88738f4
--- /dev/null
@@ -0,0 +1,60 @@
+#include <bindings.dsl.h>
+#include <CoreFoundation/CFLocale.h>
+
+module Bindings.CoreFoundation.CFLocale where
+#strict_import
+import Bindings.CoreFoundation.CFArray
+import Bindings.CoreFoundation.CFBase
+import Bindings.CoreFoundation.CFDictionary
+
+#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED
+#  opaque_t  __CFLocale
+#  synonym_t CFLocaleRef, Ptr <__CFLocale>
+
+#  ccall CFLocaleGetTypeID  , IO <CFTypeID>
+#  ccall CFLocaleGetSystem  , IO <CFLocaleRef>
+#  ccall CFLocaleCopyCurrent, IO <CFLocaleRef>
+#  ccall CFLocaleCopyAvailableLocaleIdentifiers, IO <CFArrayRef>
+#  ccall CFLocaleCopyISOLanguageCodes          , IO <CFArrayRef>
+#  ccall CFLocaleCopyISOCountryCodes           , IO <CFArrayRef>
+#  ccall CFLocaleCopyISOCurrencyCodes          , IO <CFArrayRef>
+#  ccall CFLocaleCopyCommonISOCurrencyCodes    , IO <CFArrayRef>
+#  ccall CFLocaleCopyPreferredLanguages        , IO <CFArrayRef>
+#  ccall CFLocaleCreateCanonicalLanguageIdentifierFromString, <CFAllocatorRef> -> <CFStringRef> -> IO <CFStringRef>
+#  ccall CFLocaleCreateCanonicalLocaleIdentifierFromString  , <CFAllocatorRef> -> <CFStringRef> -> IO <CFStringRef>
+#  ccall CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes, <CFAllocatorRef> -> <LangCode> -> <RegionCode> -> IO <CFStringRef>
+#  ccall CFLocaleCreateComponentsFromLocaleIdentifier       , <CFAllocatorRef> -> <CFStringRef> -> IO <CFDictionaryRef>
+#  ccall CFLocaleCreateLocaleIdentifierFromComponents       , <CFAllocatorRef> -> <CFDictionaryRef> -> IO <CFStringRef>
+#  ccall CFLocaleCreate       , <CFAllocatorRef> -> <CFStringRef> -> IO <CFLocaleRef>
+#  ccall CFLocaleCreateCopy   , <CFAllocatorRef> -> <CFLocaleRef> -> IO <CFLocaleRef>
+#  ccall CFLocaleGetIdentifier, <CFLocaleRef> -> IO <CFStringRef>
+#  ccall CFLocaleGetValue     , <CFLocaleRef> -> <CFStringRef> -> IO <CFTypeRef>
+#  ccall CFLocaleCopyDisplayNameForPropertyValue, <CFLocaleRef> -> <CFStringRef> -> <CFStringRef> -> IO <CFStringRef>
+
+#  cinline kCFLocaleCurrentLocaleDidChangeNotification, IO <CFStringRef>
+
+#  cinline kCFLocaleIdentifier  , IO <CFStringRef>
+#  cinline kCFLocaleLanguageCode, IO <CFStringRef>
+#  cinline kCFLocaleCountryCode , IO <CFStringRef>
+#  cinline kCFLocaleScriptCode  , IO <CFStringRef>
+#  cinline kCFLocaleVariantCode , IO <CFStringRef>
+
+#  cinline kCFLocaleExemplarCharacterSet, IO <CFStringRef>
+#  cinline kCFLocaleCalendarIdentifier  , IO <CFStringRef>
+#  cinline kCFLocaleCalendar            , IO <CFStringRef>
+#  cinline kCFLocaleCollationIdentifier , IO <CFStringRef>
+#  cinline kCFLocaleUsesMetricSystem    , IO <CFStringRef>
+#  cinline kCFLocaleMeasurementSystem   , IO <CFStringRef>
+#  cinline kCFLocaleDecimalSeparator    , IO <CFStringRef>
+#  cinline kCFLocaleGroupingSeparator   , IO <CFStringRef>
+#  cinline kCFLocaleCurrencySymbol      , IO <CFStringRef>
+#  cinline kCFLocaleCurrencyCode        , IO <CFStringRef>
+
+#  cinline kCFGregorianCalendar   , IO <CFStringRef>
+#  cinline kCFBuddhistCalendar    , IO <CFStringRef>
+#  cinline kCFChineseCalendar     , IO <CFStringRef>
+#  cinline kCFHebrewCalendar      , IO <CFStringRef>
+#  cinline kCFIslamicCalendar     , IO <CFStringRef>
+#  cinline kCFIslamicCivilCalendar, IO <CFStringRef>
+#  cinline kCFJapaneseCalendar    , IO <CFStringRef>
+#endif
index e9ac75ce9997e26714949963032c0565c8282576..8c4b6e457f1fc87caef51fe63f0bd13a66cc7911 100644 (file)
@@ -34,6 +34,7 @@ Library
         Bindings.CoreFoundation.CFCharacterSet
         Bindings.CoreFoundation.CFData
         Bindings.CoreFoundation.CFDictionary
+        Bindings.CoreFoundation.CFLocale
 
     C-Sources:
         cbits/helper_CFArray.c
@@ -41,6 +42,7 @@ Library
         cbits/helper_CFCharacterSet.c
         cbits/helper_CFData.c
         cbits/helper_CFDictionary.c
+        cbits/helper_CFLocale.c
 
     Extensions:
         ForeignFunctionInterface
diff --git a/cbits/helper_CFLocale.c b/cbits/helper_CFLocale.c
new file mode 100644 (file)
index 0000000..43ee91c
--- /dev/null
@@ -0,0 +1,31 @@
+#include <bindings.cmacros.h>
+#include <CoreFoundation/CFLocale.h>
+
+#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED
+BC_INLINE_(kCFLocaleCurrentLocaleDidChangeNotification, CFStringRef)
+
+BC_INLINE_(kCFLocaleIdentifier  , CFStringRef)
+BC_INLINE_(kCFLocaleLanguageCode, CFStringRef)
+BC_INLINE_(kCFLocaleCountryCode , CFStringRef)
+BC_INLINE_(kCFLocaleScriptCode  , CFStringRef)
+BC_INLINE_(kCFLocaleVariantCode , CFStringRef)
+
+BC_INLINE_(kCFLocaleExemplarCharacterSet, CFStringRef)
+BC_INLINE_(kCFLocaleCalendarIdentifier  , CFStringRef)
+BC_INLINE_(kCFLocaleCalendar            , CFStringRef)
+BC_INLINE_(kCFLocaleCollationIdentifier , CFStringRef)
+BC_INLINE_(kCFLocaleUsesMetricSystem    , CFStringRef)
+BC_INLINE_(kCFLocaleMeasurementSystem   , CFStringRef)
+BC_INLINE_(kCFLocaleDecimalSeparator    , CFStringRef)
+BC_INLINE_(kCFLocaleGroupingSeparator   , CFStringRef)
+BC_INLINE_(kCFLocaleCurrencySymbol      , CFStringRef)
+BC_INLINE_(kCFLocaleCurrencyCode        , CFStringRef)
+
+BC_INLINE_(kCFGregorianCalendar   , CFStringRef)
+BC_INLINE_(kCFBuddhistCalendar    , CFStringRef)
+BC_INLINE_(kCFChineseCalendar     , CFStringRef)
+BC_INLINE_(kCFHebrewCalendar      , CFStringRef)
+BC_INLINE_(kCFIslamicCalendar     , CFStringRef)
+BC_INLINE_(kCFIslamicCivilCalendar, CFStringRef)
+BC_INLINE_(kCFJapaneseCalendar    , CFStringRef)
+#endif