gi-gtksource-3.0.24: GtkSource bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.GtkSource.Objects.FileLoader

Description

No description available in the introspection data.

Synopsis

Exported types

newtype FileLoader Source #

Memory-managed wrapper type.

Constructors

FileLoader (ManagedPtr FileLoader) 

Instances

Instances details
Eq FileLoader Source # 
Instance details

Defined in GI.GtkSource.Objects.FileLoader

GObject FileLoader Source # 
Instance details

Defined in GI.GtkSource.Objects.FileLoader

ManagedPtrNewtype FileLoader Source # 
Instance details

Defined in GI.GtkSource.Objects.FileLoader

Methods

toManagedPtr :: FileLoader -> ManagedPtr FileLoader

TypedObject FileLoader Source # 
Instance details

Defined in GI.GtkSource.Objects.FileLoader

Methods

glibType :: IO GType

HasParentTypes FileLoader Source # 
Instance details

Defined in GI.GtkSource.Objects.FileLoader

IsGValue (Maybe FileLoader) Source #

Convert FileLoader to and from GValue. See toGValue and fromGValue.

Instance details

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 # 
Instance details

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

Instances details
(GObject o, IsDescendantOf FileLoader o) => IsFileLoader o Source # 
Instance details

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

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

-> 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:input-stream 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