Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GI.GtkSource.Objects.FileLoader
Description
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
- 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, MonadIO m, IsBuffer a) => a -> m (GValueConstruct o)
- getFileLoaderBuffer :: (MonadIO m, IsFileLoader o) => o -> m Buffer
- constructFileLoaderFile :: (IsFileLoader o, MonadIO m, IsFile a) => a -> m (GValueConstruct o)
- getFileLoaderFile :: (MonadIO m, IsFileLoader o) => o -> m File
- constructFileLoaderInputStream :: (IsFileLoader o, MonadIO m, IsInputStream a) => a -> m (GValueConstruct o)
- getFileLoaderInputStream :: (MonadIO m, IsFileLoader o) => o -> m (Maybe InputStream)
- constructFileLoaderLocation :: (IsFileLoader o, MonadIO m, IsFile a) => a -> m (GValueConstruct o)
- getFileLoaderLocation :: (MonadIO m, IsFileLoader o) => o -> m (Maybe File)
Exported types
newtype FileLoader Source #
Memory-managed wrapper type.
Constructors
FileLoader (ManagedPtr FileLoader) |
Instances
Eq FileLoader Source # | |
Defined in GI.GtkSource.Objects.FileLoader | |
GObject FileLoader Source # | |
Defined in GI.GtkSource.Objects.FileLoader | |
ManagedPtrNewtype FileLoader Source # | |
Defined in GI.GtkSource.Objects.FileLoader Methods toManagedPtr :: FileLoader -> ManagedPtr FileLoader | |
TypedObject FileLoader Source # | |
Defined in GI.GtkSource.Objects.FileLoader | |
HasParentTypes FileLoader Source # | |
Defined in GI.GtkSource.Objects.FileLoader | |
IsGValue (Maybe FileLoader) Source # | Convert |
Defined in GI.GtkSource.Objects.FileLoader Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe FileLoader -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe FileLoader) | |
type ParentTypes FileLoader Source # | |
Defined in GI.GtkSource.Objects.FileLoader type ParentTypes FileLoader = '[Object] |
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
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, loadAsync, loadFinish, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getBuffer, getCompressionType, getData, getEncoding, getFile, getInputStream, getLocation, getNewlineType, getProperty, getQdata.
Setters
getBuffer
Arguments
:: (HasCallStack, MonadIO m, IsFileLoader a) | |
=> a |
|
-> m Buffer | Returns: the |
No description available in the introspection data.
Since: 3.14
getCompressionType
fileLoaderGetCompressionType Source #
Arguments
:: (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 #
Arguments
:: (HasCallStack, MonadIO m, IsFileLoader a) | |
=> a |
|
-> m Encoding | Returns: the detected file encoding. |
No description available in the introspection data.
Since: 3.14
getFile
Arguments
:: (HasCallStack, MonadIO m, IsFileLoader a) | |
=> a |
|
-> m File | Returns: the |
No description available in the introspection data.
Since: 3.14
getInputStream
fileLoaderGetInputStream Source #
Arguments
:: (HasCallStack, MonadIO m, IsFileLoader a) | |
=> a |
|
-> m (Maybe InputStream) | Returns: the |
No description available in the introspection data.
Since: 3.14
getLocation
fileLoaderGetLocation Source #
Arguments
:: (HasCallStack, MonadIO m, IsFileLoader a) | |
=> a |
|
-> m (Maybe File) | Returns: the |
No description available in the introspection data.
Since: 3.14
getNewlineType
fileLoaderGetNewlineType Source #
Arguments
:: (HasCallStack, MonadIO m, IsFileLoader a) | |
=> a |
|
-> m NewlineType | Returns: the detected newline type. |
No description available in the introspection data.
Since: 3.14
loadAsync
Arguments
:: (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
Arguments
:: (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
Arguments
:: (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
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 #
Arguments
:: (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 #
Arguments
:: (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 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, MonadIO m, IsBuffer a) => a -> m (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, MonadIO m, IsFile a) => a -> m (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, MonadIO m, IsInputStream a) => a -> m (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:inputStream is
Nothing
, by default the location is taken from the File
at
construction time.
Since: 3.14
constructFileLoaderLocation :: (IsFileLoader o, MonadIO m, IsFile a) => a -> m (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