| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.GtkSource.Objects.FileSaver
Contents
Description
No description available in the introspection data.
Synopsis
- newtype FileSaver = FileSaver (ManagedPtr FileSaver)
- class GObject o => IsFileSaver o
- toFileSaver :: (MonadIO m, IsFileSaver o) => o -> m FileSaver
- noFileSaver :: Maybe FileSaver
- fileSaverGetBuffer :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> m Buffer
- fileSaverGetCompressionType :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> m CompressionType
- fileSaverGetEncoding :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> m Encoding
- fileSaverGetFile :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> m File
- fileSaverGetFlags :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> m [FileSaverFlags]
- fileSaverGetLocation :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> m File
- fileSaverGetNewlineType :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> m NewlineType
- fileSaverNew :: (HasCallStack, MonadIO m, IsBuffer a, IsFile b) => a -> b -> m FileSaver
- fileSaverNewWithTarget :: (HasCallStack, MonadIO m, IsBuffer a, IsFile b, IsFile c) => a -> b -> c -> m FileSaver
- fileSaverSaveAsync :: (HasCallStack, MonadIO m, IsFileSaver a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe FileProgressCallback -> Maybe AsyncReadyCallback -> m ()
- fileSaverSaveFinish :: (HasCallStack, MonadIO m, IsFileSaver a, IsAsyncResult b) => a -> b -> m ()
- fileSaverSetCompressionType :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> CompressionType -> m ()
- fileSaverSetEncoding :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> Maybe Encoding -> m ()
- fileSaverSetFlags :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> [FileSaverFlags] -> m ()
- fileSaverSetNewlineType :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> NewlineType -> m ()
- constructFileSaverBuffer :: (IsFileSaver o, IsBuffer a) => a -> IO (GValueConstruct o)
- getFileSaverBuffer :: (MonadIO m, IsFileSaver o) => o -> m Buffer
- constructFileSaverCompressionType :: IsFileSaver o => CompressionType -> IO (GValueConstruct o)
- getFileSaverCompressionType :: (MonadIO m, IsFileSaver o) => o -> m CompressionType
- setFileSaverCompressionType :: (MonadIO m, IsFileSaver o) => o -> CompressionType -> m ()
- clearFileSaverEncoding :: (MonadIO m, IsFileSaver o) => o -> m ()
- constructFileSaverEncoding :: IsFileSaver o => Encoding -> IO (GValueConstruct o)
- getFileSaverEncoding :: (MonadIO m, IsFileSaver o) => o -> m Encoding
- setFileSaverEncoding :: (MonadIO m, IsFileSaver o) => o -> Encoding -> m ()
- constructFileSaverFile :: (IsFileSaver o, IsFile a) => a -> IO (GValueConstruct o)
- getFileSaverFile :: (MonadIO m, IsFileSaver o) => o -> m File
- constructFileSaverFlags :: IsFileSaver o => [FileSaverFlags] -> IO (GValueConstruct o)
- getFileSaverFlags :: (MonadIO m, IsFileSaver o) => o -> m [FileSaverFlags]
- setFileSaverFlags :: (MonadIO m, IsFileSaver o) => o -> [FileSaverFlags] -> m ()
- constructFileSaverLocation :: (IsFileSaver o, IsFile a) => a -> IO (GValueConstruct o)
- getFileSaverLocation :: (MonadIO m, IsFileSaver o) => o -> m File
- constructFileSaverNewlineType :: IsFileSaver o => NewlineType -> IO (GValueConstruct o)
- getFileSaverNewlineType :: (MonadIO m, IsFileSaver o) => o -> m NewlineType
- setFileSaverNewlineType :: (MonadIO m, IsFileSaver o) => o -> NewlineType -> m ()
Exported types
Memory-managed wrapper type.
Constructors
| FileSaver (ManagedPtr FileSaver) |
Instances
| GObject FileSaver Source # | |
Defined in GI.GtkSource.Objects.FileSaver Methods gobjectType :: FileSaver -> IO GType # | |
| IsObject FileSaver Source # | |
Defined in GI.GtkSource.Objects.FileSaver | |
| IsFileSaver FileSaver Source # | |
Defined in GI.GtkSource.Objects.FileSaver | |
class GObject o => IsFileSaver o Source #
Type class for types which can be safely cast to FileSaver, for instance with toFileSaver.
Instances
| (GObject a, (UnknownAncestorError FileSaver a :: Constraint)) => IsFileSaver a Source # | |
Defined in GI.GtkSource.Objects.FileSaver | |
| IsFileSaver FileSaver Source # | |
Defined in GI.GtkSource.Objects.FileSaver | |
toFileSaver :: (MonadIO m, IsFileSaver o) => o -> m FileSaver Source #
Methods
getBuffer
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a) | |
| => a |
|
| -> m Buffer | Returns: the |
No description available in the introspection data.
Since: 3.14
getCompressionType
fileSaverGetCompressionType Source #
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a) | |
| => a |
|
| -> m CompressionType | Returns: the compression type. |
No description available in the introspection data.
Since: 3.14
getEncoding
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a) | |
| => a |
|
| -> m Encoding | Returns: the encoding. |
No description available in the introspection data.
Since: 3.14
getFile
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a) | |
| => a |
|
| -> m File | Returns: the |
No description available in the introspection data.
Since: 3.14
getFlags
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a) | |
| => a |
|
| -> m [FileSaverFlags] | Returns: the flags. |
No description available in the introspection data.
Since: 3.14
getLocation
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a) | |
| => a |
|
| -> m File | Returns: the |
No description available in the introspection data.
Since: 3.14
getNewlineType
fileSaverGetNewlineType Source #
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a) | |
| => a |
|
| -> m NewlineType | Returns: the newline type. |
No description available in the introspection data.
Since: 3.14
new
newWithTarget
fileSaverNewWithTarget Source #
Arguments
| :: (HasCallStack, MonadIO m, IsBuffer a, IsFile b, IsFile c) | |
| => a |
|
| -> b |
|
| -> c |
|
| -> m FileSaver | Returns: a new |
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
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a, IsCancellable b) | |
| => a |
|
| -> Int32 |
|
| -> Maybe b |
|
| -> Maybe FileProgressCallback |
|
| -> Maybe AsyncReadyCallback |
|
| -> m () |
Saves asynchronously the buffer into the file. See the AsyncResult
documentation to know how to use this function.
Since: 3.14
saveFinish
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a, IsAsyncResult b) | |
| => a |
|
| -> b |
|
| -> m () | (Can throw |
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 |
|
| -> CompressionType |
|
| -> m () |
Sets the compression type. By default the compression type is taken from the
File.
Since: 3.14
setEncoding
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a) | |
| => a |
|
| -> Maybe Encoding |
|
| -> m () |
setFlags
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a) | |
| => a |
|
| -> [FileSaverFlags] |
|
| -> m () |
No description available in the introspection data.
Since: 3.14
setNewlineType
fileSaverSetNewlineType Source #
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a) | |
| => a |
|
| -> NewlineType |
|
| -> m () |
Sets the newline type. By default the newline type is taken from the
File.
Since: 3.14
Properties
buffer
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
setfileSaver [ #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
setfileSaver [ #encoding:=value ]
file
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
setfileSaver [ #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
setfileSaver [ #newlineType:=value ]