| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell98 |
SFML.System.InputStream
- type InputStreamReadFunc a = Ptr Char -> Word64 -> Ptr a -> IO Word64
- type InputStreamSeekFunc a = Word64 -> Ptr a -> IO Word64
- type InputStreamTellFunc a = Ptr a -> IO Word64
- type InputStreamGetSizeFunc a = Ptr a -> IO Word64
- data InputStream = forall a . InputStream {
- read :: Ptr (InputStreamReadFunc a)
- seek :: Ptr (InputStreamSeekFunc a)
- tell :: Ptr (InputStreamTellFunc a)
- getSize :: Ptr (InputStreamGetSizeFunc a)
- userData :: Ptr a
Documentation
type InputStreamReadFunc a Source
Arguments
| = Ptr Char | Buffer where to copy the read data |
| -> Word64 | Desired number of bytes to read |
| -> Ptr a | User data |
| -> IO Word64 | The number of bytes actually read |
Function to read data from the stream.
type InputStreamSeekFunc a Source
Arguments
| = Word64 | The position to seek to, from the beginning |
| -> Ptr a | User data |
| -> IO Word64 | The position actually sought to, or -1 on error |
Function to set the current read position.
type InputStreamTellFunc a Source
Function to get the current read position.
type InputStreamGetSizeFunc a Source
Arguments
| = Ptr a | User data |
| -> IO Word64 | The total number of bytes available in the stream, or -1 on error |
Function to get the total number of bytes in the stream.
data InputStream Source
Set of callbacks that allow users to define custom file streams.
Constructors
| forall a . InputStream | |
Fields
| |
Instances