Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype FileLoader = FileLoader (ManagedPtr FileLoader)
- class (GObject o, IsDescendantOf FileLoader 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 #
Memory-managed wrapper type.
FileLoader (ManagedPtr FileLoader) |
Instances
GObject FileLoader Source # | |
Defined in GI.GtkSource.Objects.FileLoader gobjectType :: IO GType | |
HasParentTypes FileLoader Source # | |
Defined in GI.GtkSource.Objects.FileLoader | |
type ParentTypes FileLoader Source # | |
Defined in GI.GtkSource.Objects.FileLoader |
class (GObject o, IsDescendantOf FileLoader o) => IsFileLoader o Source #
Type class for types which can be safely cast to FileLoader
, for instance with toFileLoader
.
Instances
(GObject o, IsDescendantOf FileLoader o) => IsFileLoader o Source # | |
Defined in GI.GtkSource.Objects.FileLoader |
toFileLoader :: (MonadIO m, IsFileLoader o) => o -> m FileLoader Source #
Cast to FileLoader
, for types for which this is known to be safe. For general casts, use castTo
.
noFileLoader :: Maybe FileLoader Source #
A convenience alias for Nothing
:: Maybe
FileLoader
.
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
The Buffer
to load the contents into. The
FileLoader
object has a weak reference to the buffer.
Since: 3.14
constructFileLoaderBuffer :: (IsFileLoader o, IsBuffer a) => a -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “buffer
” property. This is rarely needed directly, but it is used by new
.
getFileLoaderBuffer :: (MonadIO m, IsFileLoader o) => o -> m Buffer Source #
Get the value of the “buffer
” property.
When overloading is enabled, this is equivalent to
get
fileLoader #buffer
file
The File
. The FileLoader
object has a weak
reference to the file.
Since: 3.14
constructFileLoaderFile :: (IsFileLoader o, IsFile a) => a -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “file
” property. This is rarely needed directly, but it is used by new
.
getFileLoaderFile :: (MonadIO m, IsFileLoader o) => o -> m File Source #
Get the value of the “file
” property.
When overloading is enabled, this is equivalent to
get
fileLoader #file
inputStream
The InputStream
to load. Useful for reading stdin. If this property
is set, the FileLoader
:location
property is ignored.
Since: 3.14
constructFileLoaderInputStream :: (IsFileLoader o, IsInputStream a) => a -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “input-stream
” property. This is rarely needed directly, but it is used by new
.
getFileLoaderInputStream :: (MonadIO m, IsFileLoader o) => o -> m (Maybe InputStream) Source #
Get the value of the “input-stream
” property.
When overloading is enabled, this is equivalent to
get
fileLoader #inputStream
location
The File
to load. If the FileLoader
:input-stream
is
Nothing
, by default the location is taken from the File
at
construction time.
Since: 3.14
constructFileLoaderLocation :: (IsFileLoader o, IsFile a) => a -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “location
” property. This is rarely needed directly, but it is used by new
.
getFileLoaderLocation :: (MonadIO m, IsFileLoader o) => o -> m (Maybe File) Source #
Get the value of the “location
” property.
When overloading is enabled, this is equivalent to
get
fileLoader #location