From: PHO Date: Mon, 18 Oct 2010 15:03:14 +0000 (+0900) Subject: CFCharacterSet.h X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=74e9929e85ef6565e878d2a53e426f87a9d34ce2;p=bindings-CoreFoundation.git CFCharacterSet.h --- diff --git a/Bindings/CoreFoundation/CFCharacterSet.hsc b/Bindings/CoreFoundation/CFCharacterSet.hsc new file mode 100644 index 0000000..f0bb629 --- /dev/null +++ b/Bindings/CoreFoundation/CFCharacterSet.hsc @@ -0,0 +1,68 @@ +#include +#include + +module Bindings.CoreFoundation.CFCharacterSet where +#strict_import +import Bindings.CoreFoundation.CFBase +import Bindings.CoreFoundation.CFData + +#opaque_t __CFCharacterSet +#synonym_t CFCharacterSetRef , Ptr <__CFCharacterSet> +#synonym_t CFMutableCharacterSetRef, Ptr <__CFCharacterSet> + +#num kCFCharacterSetControl +#num kCFCharacterSetWhitespace +#num kCFCharacterSetWhitespaceAndNewline +#num kCFCharacterSetDecimalDigit +#num kCFCharacterSetLetter +#num kCFCharacterSetLowercaseLetter +#num kCFCharacterSetUppercaseLetter +#num kCFCharacterSetNonBase +#num kCFCharacterSetDecomposable +#num kCFCharacterSetAlphaNumeric +#num kCFCharacterSetPunctuation +#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED +# num kCFCharacterSetCapitalizedLetter +#endif +#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED +# num kCFCharacterSetSymbol +#endif +#if MAC_OS_X_VERSION_10_5 <= MAC_OS_X_VERSION_MAX_ALLOWED +# num kCFCharacterSetNewline +#endif +#num kCFCharacterSetIllegal +#synonym_t CFCharacterSetPredefinedSet, + +#ccall CFCharacterSetGetTypeID , IO +#ccall CFCharacterSetGetPredefined, -> IO +#cinline CFCharacterSetCreateWithCharactersInRange , -> Ptr -> IO +#ccall CFCharacterSetCreateWithCharactersInString , -> -> IO +#ccall CFCharacterSetCreateWithBitmapRepresentation, -> -> IO + +#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED +# ccall CFCharacterSetCreateInvertedSet, -> -> IO +# ccall CFCharacterSetIsSupersetOfSet , -> -> IO +# ccall CFCharacterSetHasMemberInPlane , -> -> IO +#endif + +#ccall CFCharacterSetCreateMutable, -> IO + +#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED +# ccall CFCharacterSetCreateCopy, -> -> IO +#endif + +#ccall CFCharacterSetCreateMutableCopy, -> -> IO +#ccall CFCharacterSetIsCharacterMember, -> -> IO + +#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED +# ccall CFCharacterSetIsLongCharacterMember, -> -> IO +#endif + +#ccall CFCharacterSetCreateBitmapRepresentation, -> -> IO +#cinline CFCharacterSetAddCharactersInRange , -> Ptr -> IO () +#cinline CFCharacterSetRemoveCharactersInRange , -> Ptr -> IO () +#ccall CFCharacterSetAddCharactersInString , -> -> IO () +#ccall CFCharacterSetRemoveCharactersInString , -> -> IO () +#ccall CFCharacterSetUnion , -> -> IO () +#ccall CFCharacterSetIntersect , -> -> IO () +#ccall CFCharacterSetInvert , -> IO () diff --git a/bindings-CoreFoundation.cabal b/bindings-CoreFoundation.cabal index b097deb..e9ac75c 100644 --- a/bindings-CoreFoundation.cabal +++ b/bindings-CoreFoundation.cabal @@ -31,12 +31,14 @@ Library Exposed-Modules: Bindings.CoreFoundation.CFArray Bindings.CoreFoundation.CFBase + Bindings.CoreFoundation.CFCharacterSet Bindings.CoreFoundation.CFData Bindings.CoreFoundation.CFDictionary C-Sources: cbits/helper_CFArray.c cbits/helper_CFBase.c + cbits/helper_CFCharacterSet.c cbits/helper_CFData.c cbits/helper_CFDictionary.c diff --git a/cbits/helper_CFCharacterSet.c b/cbits/helper_CFCharacterSet.c new file mode 100644 index 0000000..cfd118a --- /dev/null +++ b/cbits/helper_CFCharacterSet.c @@ -0,0 +1,20 @@ +#include +#include + +CFCharacterSetRef +inline_CFCharacterSetCreateWithCharactersInRange(CFAllocatorRef alloc, + CFRange* theRange) { + return CFCharacterSetCreateWithCharactersInRange(alloc, *theRange); +} + +void +inline_CFCharacterSetAddCharactersInRange(CFMutableCharacterSetRef theSet, + CFRange* theRange) { + return CFCharacterSetAddCharactersInRange(theSet, *theRange); +} + +void +inline_CFCharacterSetRemoveCharactersInRange(CFMutableCharacterSetRef theSet, + CFRange* theRange) { + return CFCharacterSetRemoveCharactersInRange(theSet, *theRange); +}