Safe Haskell | None |
---|---|
Language | Haskell2010 |
Partial binding to CoreFoundation, as required for MIDI
.
At the moment only CFString is supported.
In the future this module should grow into a separate entity.
- newCFString :: String -> IO CFStringRef
- releaseCFString :: CFStringRef -> IO ()
- peekCFString :: CFStringRef -> IO String
- withCFString :: String -> (CFStringRef -> IO a) -> IO a
- osStatusString :: OSStatus -> String
- osStatusError :: OSStatus -> IO a
- type UInt8 = Word8
- type UInt16 = Word16
- type UInt32 = Word32
- type UInt64 = Word64
- type SInt8 = Int8
- type SInt16 = Int16
- type SInt32 = Int32
- type SInt64 = Int64
- type OSErr = SInt16
- type OSStatus = SInt32
- type UniChar = Char
- type CFIndex = SInt32
- type ItemCount = UInt32
- type ByteCount = UInt32
- type CFDataRef = Ptr CFData
- type CFStringRef = Ptr CFString
- type CFAllocatorRef = Ptr CFAllocator
Documentation
newCFString :: String -> IO CFStringRef Source
Creates a new CFString. You have to release it manually.
releaseCFString :: CFStringRef -> IO () Source
Manually releasing a CFString.
peekCFString :: CFStringRef -> IO String Source
Peeks a CFString.
withCFString :: String -> (CFStringRef -> IO a) -> IO a Source
Safe passing of a CFString to the OS (releases it afterwards).
osStatusString :: OSStatus -> String Source
osStatusError :: OSStatus -> IO a Source
type CFStringRef = Ptr CFString Source
type CFAllocatorRef = Ptr CFAllocator Source