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

GI.GtkSource.Objects.FileSaver

Description

No description available in the introspection data.

Synopsis

Exported types

newtype FileSaver Source #

Memory-managed wrapper type.

Instances

Instances details
Eq FileSaver Source # 
Instance details

Defined in GI.GtkSource.Objects.FileSaver

IsGValue FileSaver Source #

Convert FileSaver to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.GtkSource.Objects.FileSaver

GObject FileSaver Source # 
Instance details

Defined in GI.GtkSource.Objects.FileSaver

Methods

gobjectType :: IO GType #

HasParentTypes FileSaver Source # 
Instance details

Defined in GI.GtkSource.Objects.FileSaver

type ParentTypes FileSaver Source # 
Instance details

Defined in GI.GtkSource.Objects.FileSaver

class (GObject o, IsDescendantOf FileSaver o) => IsFileSaver o Source #

Type class for types which can be safely cast to FileSaver, for instance with toFileSaver.

Instances

Instances details
(GObject o, IsDescendantOf FileSaver o) => IsFileSaver o Source # 
Instance details

Defined in GI.GtkSource.Objects.FileSaver

toFileSaver :: (MonadIO m, IsFileSaver o) => o -> m FileSaver Source #

Cast to FileSaver, for types for which this is known to be safe. For general casts, use castTo.

noFileSaver :: Maybe FileSaver Source #

A convenience alias for Nothing :: Maybe FileSaver.

Methods

Overloaded methods

getBuffer

fileSaverGetBuffer Source #

Arguments

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

saver: a FileSaver.

-> m Buffer

Returns: the Buffer to save.

No description available in the introspection data.

Since: 3.14

getCompressionType

fileSaverGetCompressionType Source #

Arguments

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

saver: a FileSaver.

-> m CompressionType

Returns: the compression type.

No description available in the introspection data.

Since: 3.14

getEncoding

fileSaverGetEncoding Source #

Arguments

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

saver: a FileSaver.

-> m Encoding

Returns: the encoding.

No description available in the introspection data.

Since: 3.14

getFile

fileSaverGetFile Source #

Arguments

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

saver: a FileSaver.

-> m File

Returns: the File.

No description available in the introspection data.

Since: 3.14

getFlags

fileSaverGetFlags Source #

Arguments

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

saver: a FileSaver.

-> m [FileSaverFlags]

Returns: the flags.

No description available in the introspection data.

Since: 3.14

getLocation

fileSaverGetLocation Source #

Arguments

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

saver: a FileSaver.

-> m File

Returns: the File where to save the buffer to.

No description available in the introspection data.

Since: 3.14

getNewlineType

fileSaverGetNewlineType Source #

Arguments

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

saver: a FileSaver.

-> m NewlineType

Returns: the newline type.

No description available in the introspection data.

Since: 3.14

new

fileSaverNew Source #

Arguments

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

buffer: the Buffer to save.

-> b

file: the File.

-> m FileSaver

Returns: a new FileSaver object.

Creates a new FileSaver object. The buffer will be saved to the File's location.

This constructor is suitable for a simple "save" operation, when the file already contains a non-Nothing File:location.

Since: 3.14

newWithTarget

fileSaverNewWithTarget Source #

Arguments

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

buffer: the Buffer to save.

-> b

file: the File.

-> c

targetLocation: the File where to save the buffer to.

-> m FileSaver

Returns: a new FileSaver object.

Creates a new FileSaver object with a target location. When the file saving is finished successfully, targetLocation is set to the file's File:location property. If an error occurs, the previous valid location is still available in File.

This constructor is suitable for a "save as" operation, or for saving a new buffer for the first time.

Since: 3.14

saveAsync

fileSaverSaveAsync Source #

Arguments

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

saver: a FileSaver.

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

Saves asynchronously the buffer into the file. See the AsyncResult documentation to know how to use this function.

Since: 3.14

saveFinish

fileSaverSaveFinish Source #

Arguments

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

saver: a FileSaver.

-> b

result: a AsyncResult.

-> m ()

(Can throw GError)

Finishes a file saving started with fileSaverSaveAsync.

If the file has been saved successfully, the following File properties will be updated: the location, the encoding, the newline type and the compression type.

Since the 3.20 version, textBufferSetModified is called with False if the file has been saved successfully.

Since: 3.14

setCompressionType

fileSaverSetCompressionType Source #

Arguments

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

saver: a FileSaver.

-> CompressionType

compressionType: the new compression type.

-> m () 

Sets the compression type. By default the compression type is taken from the File.

Since: 3.14

setEncoding

fileSaverSetEncoding Source #

Arguments

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

saver: a FileSaver.

-> Maybe Encoding

encoding: the new encoding, or Nothing for UTF-8.

-> m () 

Sets the encoding. If encoding is Nothing, the UTF-8 encoding will be set. By default the encoding is taken from the File.

Since: 3.14

setFlags

fileSaverSetFlags Source #

Arguments

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

saver: a FileSaver.

-> [FileSaverFlags]

flags: the new flags.

-> m () 

No description available in the introspection data.

Since: 3.14

setNewlineType

fileSaverSetNewlineType Source #

Arguments

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

saver: a FileSaver.

-> NewlineType

newlineType: the new newline type.

-> m () 

Sets the newline type. By default the newline type is taken from the File.

Since: 3.14

Properties

buffer

The Buffer to save. The FileSaver object has a weak reference to the buffer.

Since: 3.14

constructFileSaverBuffer :: (IsFileSaver 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.

getFileSaverBuffer :: (MonadIO m, IsFileSaver o) => o -> m Buffer Source #

Get the value of the “buffer” property. When overloading is enabled, this is equivalent to

get fileSaver #buffer

compressionType

The compression type.

Since: 3.14

constructFileSaverCompressionType :: IsFileSaver o => CompressionType -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “compression-type” property. This is rarely needed directly, but it is used by new.

getFileSaverCompressionType :: (MonadIO m, IsFileSaver o) => o -> m CompressionType Source #

Get the value of the “compression-type” property. When overloading is enabled, this is equivalent to

get fileSaver #compressionType

setFileSaverCompressionType :: (MonadIO m, IsFileSaver o) => o -> CompressionType -> m () Source #

Set the value of the “compression-type” property. When overloading is enabled, this is equivalent to

set fileSaver [ #compressionType := value ]

encoding

The file's encoding.

Since: 3.14

clearFileSaverEncoding :: (MonadIO m, IsFileSaver o) => o -> m () Source #

Set the value of the “encoding” property to Nothing. When overloading is enabled, this is equivalent to

clear #encoding

constructFileSaverEncoding :: IsFileSaver o => Encoding -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “encoding” property. This is rarely needed directly, but it is used by new.

getFileSaverEncoding :: (MonadIO m, IsFileSaver o) => o -> m Encoding Source #

Get the value of the “encoding” property. When overloading is enabled, this is equivalent to

get fileSaver #encoding

setFileSaverEncoding :: (MonadIO m, IsFileSaver o) => o -> Encoding -> m () Source #

Set the value of the “encoding” property. When overloading is enabled, this is equivalent to

set fileSaver [ #encoding := value ]

file

The File. The FileSaver object has a weak reference to the file.

Since: 3.14

constructFileSaverFile :: (IsFileSaver 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.

getFileSaverFile :: (MonadIO m, IsFileSaver o) => o -> m File Source #

Get the value of the “file” property. When overloading is enabled, this is equivalent to

get fileSaver #file

flags

File saving flags.

Since: 3.14

constructFileSaverFlags :: IsFileSaver o => [FileSaverFlags] -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “flags” property. This is rarely needed directly, but it is used by new.

getFileSaverFlags :: (MonadIO m, IsFileSaver o) => o -> m [FileSaverFlags] Source #

Get the value of the “flags” property. When overloading is enabled, this is equivalent to

get fileSaver #flags

setFileSaverFlags :: (MonadIO m, IsFileSaver o) => o -> [FileSaverFlags] -> m () Source #

Set the value of the “flags” property. When overloading is enabled, this is equivalent to

set fileSaver [ #flags := value ]

location

The File where to save the buffer. By default the location is taken from the File at construction time.

Since: 3.14

constructFileSaverLocation :: (IsFileSaver 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.

getFileSaverLocation :: (MonadIO m, IsFileSaver o) => o -> m File Source #

Get the value of the “location” property. When overloading is enabled, this is equivalent to

get fileSaver #location

newlineType

The newline type.

Since: 3.14

constructFileSaverNewlineType :: IsFileSaver o => NewlineType -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “newline-type” property. This is rarely needed directly, but it is used by new.

getFileSaverNewlineType :: (MonadIO m, IsFileSaver o) => o -> m NewlineType Source #

Get the value of the “newline-type” property. When overloading is enabled, this is equivalent to

get fileSaver #newlineType

setFileSaverNewlineType :: (MonadIO m, IsFileSaver o) => o -> NewlineType -> m () Source #

Set the value of the “newline-type” property. When overloading is enabled, this is equivalent to

set fileSaver [ #newlineType := value ]