gi-gtksource-3.0.15: GtkSource bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.GtkSource.Objects.FileLoader

Contents

Description

 

Synopsis

Exported types

Methods

getBuffer

fileLoaderGetBuffer Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileLoader a) 
=> a

loader: a FileLoader.

-> m Buffer

Returns: the Buffer to load the contents into.

No description available in the introspection data.

Since: 3.14

getCompressionType

fileLoaderGetCompressionType Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileLoader a) 
=> a

loader: a FileLoader.

-> 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

loader: a FileLoader.

-> m Encoding

Returns: the detected file encoding.

No description available in the introspection data.

Since: 3.14

getFile

fileLoaderGetFile Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileLoader a) 
=> a

loader: a FileLoader.

-> m File

Returns: the File.

No description available in the introspection data.

Since: 3.14

getInputStream

fileLoaderGetInputStream Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileLoader a) 
=> a

loader: a FileLoader.

-> m (Maybe InputStream)

Returns: the InputStream to load, or Nothing if a File is used.

No description available in the introspection data.

Since: 3.14

getLocation

fileLoaderGetLocation Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileLoader a) 
=> a

loader: a FileLoader.

-> m (Maybe File)

Returns: the File to load, or Nothing if an input stream is used.

No description available in the introspection data.

Since: 3.14

getNewlineType

fileLoaderGetNewlineType Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileLoader a) 
=> a

loader: a FileLoader.

-> m NewlineType

Returns: the detected newline type.

No description available in the introspection data.

Since: 3.14

loadAsync

fileLoaderLoadAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileLoader a, IsCancellable b) 
=> a

loader: a FileLoader.

-> Int32

ioPriority: the I/O priority of the request. E.g. PRIORITY_LOW, PRIORITY_DEFAULT or PRIORITY_HIGH.

-> Maybe b

cancellable: optional Cancellable object, Nothing to ignore.

-> Maybe FileProgressCallback

progressCallback: function to call back with progress information, or Nothing if progress information is not needed.

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback to call when the request is satisfied.

-> 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

fileLoaderLoadFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileLoader a, IsAsyncResult b) 
=> a

loader: a FileLoader.

-> b

result: a AsyncResult.

-> m ()

(Can throw GError)

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

fileLoaderNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsBuffer a, IsFile b) 
=> a

buffer: the Buffer to load the contents into.

-> b

file: the File.

-> m FileLoader

Returns: a new FileLoader object.

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 #

Arguments

:: (HasCallStack, MonadIO m, IsBuffer a, IsFile b, IsInputStream c) 
=> a

buffer: the Buffer to load the contents into.

-> b

file: the File.

-> c

stream: the InputStream to load, e.g. stdin.

-> m FileLoader

Returns: a new FileLoader object.

Creates a new FileLoader object. The contents is read from stream.

Since: 3.14

setCandidateEncodings

fileLoaderSetCandidateEncodings Source #

Arguments

:: (HasCallStack, MonadIO m, IsFileLoader a) 
=> a

loader: a FileLoader.

-> [Encoding]

candidateEncodings: a list of Encoding<!-- -->s.

-> 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

file

inputStream

location