Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- newtype FileLoader = FileLoader (ManagedPtr FileLoader)
- class GObject o => IsFileLoader o
- toFileLoader :: (MonadIO m, IsFileLoader o) => o -> m FileLoader
- noFileLoader :: Maybe FileLoader
- fileLoaderGetBuffer :: (HasCallStack, MonadIO m, IsFileLoader a) => a -> m Buffer
- fileLoaderGetCompressionType :: (HasCallStack, MonadIO m, IsFileLoader a) => a -> m CompressionType
- fileLoaderGetEncoding :: (HasCallStack, MonadIO m, IsFileLoader a) => a -> m Encoding
- fileLoaderGetFile :: (HasCallStack, MonadIO m, IsFileLoader a) => a -> m File
- fileLoaderGetInputStream :: (HasCallStack, MonadIO m, IsFileLoader a) => a -> m (Maybe InputStream)
- fileLoaderGetLocation :: (HasCallStack, MonadIO m, IsFileLoader a) => a -> m (Maybe File)
- fileLoaderGetNewlineType :: (HasCallStack, MonadIO m, IsFileLoader a) => a -> m NewlineType
- fileLoaderLoadAsync :: (HasCallStack, MonadIO m, IsFileLoader a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe FileProgressCallback -> Maybe AsyncReadyCallback -> m ()
- fileLoaderLoadFinish :: (HasCallStack, MonadIO m, IsFileLoader a, IsAsyncResult b) => a -> b -> m ()
- fileLoaderNew :: (HasCallStack, MonadIO m, IsBuffer a, IsFile b) => a -> b -> m FileLoader
- fileLoaderNewFromStream :: (HasCallStack, MonadIO m, IsBuffer a, IsFile b, IsInputStream c) => a -> b -> c -> m FileLoader
- fileLoaderSetCandidateEncodings :: (HasCallStack, MonadIO m, IsFileLoader a) => a -> [Encoding] -> m ()
- constructFileLoaderBuffer :: (IsFileLoader o, IsBuffer a) => a -> IO (GValueConstruct o)
- getFileLoaderBuffer :: (MonadIO m, IsFileLoader o) => o -> m Buffer
- constructFileLoaderFile :: (IsFileLoader o, IsFile a) => a -> IO (GValueConstruct o)
- getFileLoaderFile :: (MonadIO m, IsFileLoader o) => o -> m File
- constructFileLoaderInputStream :: (IsFileLoader o, IsInputStream a) => a -> IO (GValueConstruct o)
- getFileLoaderInputStream :: (MonadIO m, IsFileLoader o) => o -> m (Maybe InputStream)
- constructFileLoaderLocation :: (IsFileLoader o, IsFile a) => a -> IO (GValueConstruct o)
- getFileLoaderLocation :: (MonadIO m, IsFileLoader o) => o -> m (Maybe File)
Exported types
newtype FileLoader Source #
class GObject o => IsFileLoader o Source #
toFileLoader :: (MonadIO m, IsFileLoader o) => o -> m FileLoader Source #
Methods
getBuffer
:: (HasCallStack, MonadIO m, IsFileLoader a) | |
=> a |
|
-> m Buffer | Returns: the |
No description available in the introspection data.
Since: 3.14
getCompressionType
fileLoaderGetCompressionType Source #
:: (HasCallStack, MonadIO m, IsFileLoader a) | |
=> a |
|
-> m CompressionType | Returns: the detected compression type. |
No description available in the introspection data.
Since: 3.14
getEncoding
fileLoaderGetEncoding Source #
:: (HasCallStack, MonadIO m, IsFileLoader a) | |
=> a |
|
-> m Encoding | Returns: the detected file encoding. |
No description available in the introspection data.
Since: 3.14
getFile
:: (HasCallStack, MonadIO m, IsFileLoader a) | |
=> a |
|
-> m File | Returns: the |
No description available in the introspection data.
Since: 3.14
getInputStream
fileLoaderGetInputStream Source #
:: (HasCallStack, MonadIO m, IsFileLoader a) | |
=> a |
|
-> m (Maybe InputStream) | Returns: the |
No description available in the introspection data.
Since: 3.14
getLocation
fileLoaderGetLocation Source #
:: (HasCallStack, MonadIO m, IsFileLoader a) | |
=> a |
|
-> m (Maybe File) | Returns: the |
No description available in the introspection data.
Since: 3.14
getNewlineType
fileLoaderGetNewlineType Source #
:: (HasCallStack, MonadIO m, IsFileLoader a) | |
=> a |
|
-> m NewlineType | Returns: the detected newline type. |
No description available in the introspection data.
Since: 3.14
loadAsync
:: (HasCallStack, MonadIO m, IsFileLoader a, IsCancellable b) | |
=> a |
|
-> Int32 |
|
-> Maybe b |
|
-> Maybe FileProgressCallback |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Loads asynchronously the file or input stream contents into the
Buffer
. See the AsyncResult
documentation to know how to use this
function.
Since: 3.14
loadFinish
:: (HasCallStack, MonadIO m, IsFileLoader a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m () | (Can throw |
Finishes a file loading started with fileLoaderLoadAsync
.
If the contents has been loaded, the following File
properties will
be updated: the location, the encoding, the newline type and the compression
type.
Since: 3.14
new
:: (HasCallStack, MonadIO m, IsBuffer a, IsFile b) | |
=> a |
|
-> b |
|
-> m FileLoader | Returns: a new |
Creates a new FileLoader
object. The contents is read from the
'GI.GtkSource.Objects.File.File'\'s location. If not already done, call
fileSetLocation
before calling this constructor. The previous
location is anyway not needed, because as soon as the file loading begins,
the buffer
is emptied.
Since: 3.14
newFromStream
fileLoaderNewFromStream Source #
:: (HasCallStack, MonadIO m, IsBuffer a, IsFile b, IsInputStream c) | |
=> a |
|
-> b |
|
-> c |
|
-> m FileLoader | Returns: a new |
Creates a new FileLoader
object. The contents is read from stream
.
Since: 3.14
setCandidateEncodings
fileLoaderSetCandidateEncodings Source #
:: (HasCallStack, MonadIO m, IsFileLoader a) | |
=> a |
|
-> [Encoding] |
|
-> m () |
Sets the candidate encodings for the file loading. The encodings are tried in the same order as the list.
For convenience, candidateEncodings
can contain duplicates. Only the first
occurrence of a duplicated encoding is kept in the list.
By default the candidate encodings are (in that order in the list):
1. If set, the 'GI.GtkSource.Objects.File.File'\'s encoding as returned by
fileGetEncoding
.
2. The default candidates as returned by
encodingGetDefaultCandidates
.
Since: 3.14
Properties
buffer
constructFileLoaderBuffer :: (IsFileLoader o, IsBuffer a) => a -> IO (GValueConstruct o) Source #
getFileLoaderBuffer :: (MonadIO m, IsFileLoader o) => o -> m Buffer Source #
file
constructFileLoaderFile :: (IsFileLoader o, IsFile a) => a -> IO (GValueConstruct o) Source #
getFileLoaderFile :: (MonadIO m, IsFileLoader o) => o -> m File Source #
inputStream
constructFileLoaderInputStream :: (IsFileLoader o, IsInputStream a) => a -> IO (GValueConstruct o) Source #
getFileLoaderInputStream :: (MonadIO m, IsFileLoader o) => o -> m (Maybe InputStream) Source #
location
constructFileLoaderLocation :: (IsFileLoader o, IsFile a) => a -> IO (GValueConstruct o) Source #
getFileLoaderLocation :: (MonadIO m, IsFileLoader o) => o -> m (Maybe File) Source #