CFString.h master
authorPHO <pho@cielonegro.org>
Tue, 19 Oct 2010 12:34:17 +0000 (21:34 +0900)
committerPHO <pho@cielonegro.org>
Tue, 19 Oct 2010 12:34:17 +0000 (21:34 +0900)
Bindings/CoreFoundation/CFString.hsc
cbits/helper_CFString.c

index ea41f9ffa6a9d9af0dca7d6ec314e85b9d633ece..ed7d0a1b0ba4359e2f76269fda58cbe054d8b149 100644 (file)
@@ -157,3 +157,44 @@ import Bindings.CoreFoundation.CFLocale
 
 #ccall CFStringTransform, <CFMutableStringRef> -> Ptr <CFRange> -> <CFStringRef> -> <Boolean> -> IO <Boolean>
 
+#cinline kCFStringTransformStripCombiningMarks, IO <CFStringRef>
+#cinline kCFStringTransformToLatin            , IO <CFStringRef>
+#cinline kCFStringTransformFullwidthHalfwidth , IO <CFStringRef>
+#cinline kCFStringTransformLatinKatakana      , IO <CFStringRef>
+#cinline kCFStringTransformLatinHiragana      , IO <CFStringRef>
+#cinline kCFStringTransformHiraganaKatakana   , IO <CFStringRef>
+#cinline kCFStringTransformMandarinLatin      , IO <CFStringRef>
+#cinline kCFStringTransformLatinHangul        , IO <CFStringRef>
+#cinline kCFStringTransformLatinArabic        , IO <CFStringRef>
+#cinline kCFStringTransformLatinHebrew        , IO <CFStringRef>
+#cinline kCFStringTransformLatinThai          , IO <CFStringRef>
+#cinline kCFStringTransformLatinCyrillic      , IO <CFStringRef>
+#cinline kCFStringTransformLatinGreek         , IO <CFStringRef>
+#cinline kCFStringTransformToXMLHex           , IO <CFStringRef>
+#cinline kCFStringTransformToUnicodeName      , IO <CFStringRef>
+#cinline kCFStringTransformStripDiacritics    , IO <CFStringRef>
+
+#ccall CFStringIsEncodingAvailable               , <CFStringEncoding> -> IO <Boolean>
+#ccall CFStringGetListOfAvailableEncodings       , IO (Ptr <CFStringEncoding>)
+#ccall CFStringGetNameOfEncoding                 , <CFStringEncoding> -> IO <CFStringRef>
+#ccall CFStringConvertEncodingToNSStringEncoding , <CFStringEncoding> -> IO CULong
+#ccall CFStringConvertEncodingToWindowsCodepage  , <CFStringEncoding> -> IO <UInt32>
+#ccall CFStringConvertWindowsCodepageToEncoding  , <UInt32> -> IO <CFStringEncoding>
+#ccall CFStringConvertIANACharSetNameToEncoding  , <CFStringRef> -> IO <CFStringEncoding>
+#ccall CFStringConvertEncodingToIANACharSetName  , <CFStringEncoding> -> IO <CFStringRef>
+#ccall CFStringGetMostCompatibleMacStringEncoding, <CFStringEncoding> -> IO <CFStringEncoding>
+
+#starttype CFStringInlineBuffer
+#  array_field buffer      , <UniChar>
+#  field theString         , <CFStringRef>
+#  field directBuffer      , Ptr <UniChar>
+#  field rangeToBuffer     , <CFRange>
+#  field bufferedRangeStart, <CFIndex>
+#  field bufferedRangeEnd  , <CFIndex>
+#stoptype
+
+#cinline CFStringInitInlineBuffer            , <CFStringRef> -> Ptr <CFStringInlineBuffer> -> Ptr <CFRange> -> IO ()
+#cinline CFStringGetCharacterFromInlineBuffer, Ptr <CFStringInlineBuffer> -> <CFIndex> -> IO <UniChar>
+
+#ccall CFShow   , <CFTypeRef> -> IO ()
+#ccall CFShowStr, <CFStringRef> -> IO ()
index b6288ef7232cae7d570d6563ce6ee74272dd2d76..544b1b45f6b2b36fe6f6e0429547bc15cd4e8619 100644 (file)
@@ -166,3 +166,28 @@ inline_CFStringFindAndReplace(CFMutableStringRef theString,
 }
 #endif
 
+BC_INLINE_(kCFStringTransformStripCombiningMarks, CFStringRef)
+BC_INLINE_(kCFStringTransformToLatin            , CFStringRef)
+BC_INLINE_(kCFStringTransformFullwidthHalfwidth , CFStringRef)
+BC_INLINE_(kCFStringTransformLatinKatakana      , CFStringRef)
+BC_INLINE_(kCFStringTransformLatinHiragana      , CFStringRef)
+BC_INLINE_(kCFStringTransformHiraganaKatakana   , CFStringRef)
+BC_INLINE_(kCFStringTransformMandarinLatin      , CFStringRef)
+BC_INLINE_(kCFStringTransformLatinHangul        , CFStringRef)
+BC_INLINE_(kCFStringTransformLatinArabic        , CFStringRef)
+BC_INLINE_(kCFStringTransformLatinHebrew        , CFStringRef)
+BC_INLINE_(kCFStringTransformLatinThai          , CFStringRef)
+BC_INLINE_(kCFStringTransformLatinCyrillic      , CFStringRef)
+BC_INLINE_(kCFStringTransformLatinGreek         , CFStringRef)
+BC_INLINE_(kCFStringTransformToXMLHex           , CFStringRef)
+BC_INLINE_(kCFStringTransformToUnicodeName      , CFStringRef)
+BC_INLINE_(kCFStringTransformStripDiacritics    , CFStringRef)
+
+void
+inline_CFStringInitInlineBuffer(CFStringRef str,
+                                CFStringInlineBuffer *buf,
+                                CFRange* range) {
+    return CFStringInitInlineBuffer(str, buf, *range);
+}
+
+BC_INLINE2(CFStringGetCharacterFromInlineBuffer, CFStringInlineBuffer*, CFIndex, UniChar)