]> gitweb @ CieloNegro.org - bindings-CoreFoundation.git/commitdiff
CFCharacterSet.h
authorPHO <pho@cielonegro.org>
Mon, 18 Oct 2010 15:03:14 +0000 (00:03 +0900)
committerPHO <pho@cielonegro.org>
Mon, 18 Oct 2010 15:03:14 +0000 (00:03 +0900)
Bindings/CoreFoundation/CFCharacterSet.hsc [new file with mode: 0644]
bindings-CoreFoundation.cabal
cbits/helper_CFCharacterSet.c [new file with mode: 0644]

diff --git a/Bindings/CoreFoundation/CFCharacterSet.hsc b/Bindings/CoreFoundation/CFCharacterSet.hsc
new file mode 100644 (file)
index 0000000..f0bb629
--- /dev/null
@@ -0,0 +1,68 @@
+#include <bindings.dsl.h>
+#include <CoreFoundation/CFCharacterSet.h>
+
+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, <CFIndex>
+
+#ccall   CFCharacterSetGetTypeID    , IO <CFTypeID>
+#ccall   CFCharacterSetGetPredefined, <CFCharacterSetPredefinedSet> -> IO <CFCharacterSetRef>
+#cinline CFCharacterSetCreateWithCharactersInRange   , <CFAllocatorRef> -> Ptr <CFRange> -> IO <CFCharacterSetRef>
+#ccall   CFCharacterSetCreateWithCharactersInString  , <CFAllocatorRef> -> <CFStringRef> -> IO <CFCharacterSetRef>
+#ccall   CFCharacterSetCreateWithBitmapRepresentation, <CFAllocatorRef> -> <CFDataRef> -> IO <CFCharacterSetRef>
+
+#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED
+#  ccall CFCharacterSetCreateInvertedSet, <CFAllocatorRef> -> <CFCharacterSetRef> -> IO <CFCharacterSetRef>
+#  ccall CFCharacterSetIsSupersetOfSet  , <CFCharacterSetRef> -> <CFCharacterSetRef> -> IO <Boolean>
+#  ccall CFCharacterSetHasMemberInPlane , <CFCharacterSetRef> -> <CFIndex> -> IO <Boolean>
+#endif
+
+#ccall CFCharacterSetCreateMutable, <CFAllocatorRef> -> IO <CFMutableCharacterSetRef>
+
+#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED
+#  ccall CFCharacterSetCreateCopy, <CFAllocatorRef> -> <CFCharacterSetRef> -> IO <CFCharacterSetRef>
+#endif
+
+#ccall CFCharacterSetCreateMutableCopy, <CFAllocatorRef> -> <CFCharacterSetRef> -> IO <CFMutableCharacterSetRef>
+#ccall CFCharacterSetIsCharacterMember, <CFCharacterSetRef> -> <UniChar> -> IO <Boolean>
+
+#if MAC_OS_X_VERSION_10_2 <= MAC_OS_X_VERSION_MAX_ALLOWED
+#  ccall CFCharacterSetIsLongCharacterMember, <CFCharacterSetRef> -> <UTF32Char> -> IO <Boolean>
+#endif
+
+#ccall   CFCharacterSetCreateBitmapRepresentation, <CFAllocatorRef> -> <CFCharacterSetRef> -> IO <CFDataRef>
+#cinline CFCharacterSetAddCharactersInRange      , <CFMutableCharacterSetRef> -> Ptr <CFRange> -> IO ()
+#cinline CFCharacterSetRemoveCharactersInRange   , <CFMutableCharacterSetRef> -> Ptr <CFRange> -> IO ()
+#ccall   CFCharacterSetAddCharactersInString     , <CFMutableCharacterSetRef> -> <CFStringRef> -> IO ()
+#ccall   CFCharacterSetRemoveCharactersInString  , <CFMutableCharacterSetRef> -> <CFStringRef> -> IO ()
+#ccall   CFCharacterSetUnion                     , <CFMutableCharacterSetRef> -> <CFCharacterSetRef> -> IO ()
+#ccall   CFCharacterSetIntersect                 , <CFMutableCharacterSetRef> -> <CFCharacterSetRef> -> IO ()
+#ccall   CFCharacterSetInvert                    , <CFMutableCharacterSetRef> -> IO ()
index b097deb3cac3f30015f0d61eafcbaccccedba428..e9ac75ce9997e26714949963032c0565c8282576 100644 (file)
@@ -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 (file)
index 0000000..cfd118a
--- /dev/null
@@ -0,0 +1,20 @@
+#include <bindings.cmacros.h>
+#include <CoreFoundation/CFCharacterSet.h>
+
+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);
+}