From: PHO Date: Tue, 19 Oct 2010 12:34:17 +0000 (+0900) Subject: CFString.h X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=c657df13157bd2eaa2389ea4b257f04a74bf33ab;p=bindings-CoreFoundation.git CFString.h --- diff --git a/Bindings/CoreFoundation/CFString.hsc b/Bindings/CoreFoundation/CFString.hsc index ea41f9f..ed7d0a1 100644 --- a/Bindings/CoreFoundation/CFString.hsc +++ b/Bindings/CoreFoundation/CFString.hsc @@ -157,3 +157,44 @@ import Bindings.CoreFoundation.CFLocale #ccall CFStringTransform, -> Ptr -> -> -> IO +#cinline kCFStringTransformStripCombiningMarks, IO +#cinline kCFStringTransformToLatin , IO +#cinline kCFStringTransformFullwidthHalfwidth , IO +#cinline kCFStringTransformLatinKatakana , IO +#cinline kCFStringTransformLatinHiragana , IO +#cinline kCFStringTransformHiraganaKatakana , IO +#cinline kCFStringTransformMandarinLatin , IO +#cinline kCFStringTransformLatinHangul , IO +#cinline kCFStringTransformLatinArabic , IO +#cinline kCFStringTransformLatinHebrew , IO +#cinline kCFStringTransformLatinThai , IO +#cinline kCFStringTransformLatinCyrillic , IO +#cinline kCFStringTransformLatinGreek , IO +#cinline kCFStringTransformToXMLHex , IO +#cinline kCFStringTransformToUnicodeName , IO +#cinline kCFStringTransformStripDiacritics , IO + +#ccall CFStringIsEncodingAvailable , -> IO +#ccall CFStringGetListOfAvailableEncodings , IO (Ptr ) +#ccall CFStringGetNameOfEncoding , -> IO +#ccall CFStringConvertEncodingToNSStringEncoding , -> IO CULong +#ccall CFStringConvertEncodingToWindowsCodepage , -> IO +#ccall CFStringConvertWindowsCodepageToEncoding , -> IO +#ccall CFStringConvertIANACharSetNameToEncoding , -> IO +#ccall CFStringConvertEncodingToIANACharSetName , -> IO +#ccall CFStringGetMostCompatibleMacStringEncoding, -> IO + +#starttype CFStringInlineBuffer +# array_field buffer , +# field theString , +# field directBuffer , Ptr +# field rangeToBuffer , +# field bufferedRangeStart, +# field bufferedRangeEnd , +#stoptype + +#cinline CFStringInitInlineBuffer , -> Ptr -> Ptr -> IO () +#cinline CFStringGetCharacterFromInlineBuffer, Ptr -> -> IO + +#ccall CFShow , -> IO () +#ccall CFShowStr, -> IO () diff --git a/cbits/helper_CFString.c b/cbits/helper_CFString.c index b6288ef..544b1b4 100644 --- a/cbits/helper_CFString.c +++ b/cbits/helper_CFString.c @@ -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)