| 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
- newtype FileSaver = FileSaver (ManagedPtr FileSaver)
- class GObject o => IsFileSaver o
- toFileSaver :: IsFileSaver o => o -> IO FileSaver
- noFileSaver :: Maybe FileSaver
- data FileSaverGetBufferMethodInfo
- fileSaverGetBuffer :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> m Buffer
- data FileSaverGetCompressionTypeMethodInfo
- fileSaverGetCompressionType :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> m CompressionType
- data FileSaverGetEncodingMethodInfo
- fileSaverGetEncoding :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> m Encoding
- data FileSaverGetFileMethodInfo
- fileSaverGetFile :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> m File
- data FileSaverGetFlagsMethodInfo
- fileSaverGetFlags :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> m [FileSaverFlags]
- data FileSaverGetLocationMethodInfo
- fileSaverGetLocation :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> m File
- data FileSaverGetNewlineTypeMethodInfo
- 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
- data FileSaverSaveAsyncMethodInfo
- fileSaverSaveAsync :: (HasCallStack, MonadIO m, IsFileSaver a, IsCancellable b) => a -> Int32 -> Maybe b -> Maybe FileProgressCallback -> Maybe AsyncReadyCallback -> m ()
- data FileSaverSaveFinishMethodInfo
- fileSaverSaveFinish :: (HasCallStack, MonadIO m, IsFileSaver a, IsAsyncResult b) => a -> b -> m ()
- data FileSaverSetCompressionTypeMethodInfo
- fileSaverSetCompressionType :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> CompressionType -> m ()
- data FileSaverSetEncodingMethodInfo
- fileSaverSetEncoding :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> Maybe Encoding -> m ()
- data FileSaverSetFlagsMethodInfo
- fileSaverSetFlags :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> [FileSaverFlags] -> m ()
- data FileSaverSetNewlineTypeMethodInfo
- fileSaverSetNewlineType :: (HasCallStack, MonadIO m, IsFileSaver a) => a -> NewlineType -> m ()
- data FileSaverBufferPropertyInfo
- constructFileSaverBuffer :: (IsFileSaver o, IsBuffer a) => a -> IO (GValueConstruct o)
- fileSaverBuffer :: AttrLabelProxy "buffer"
- getFileSaverBuffer :: (MonadIO m, IsFileSaver o) => o -> m Buffer
- data FileSaverCompressionTypePropertyInfo
- constructFileSaverCompressionType :: IsFileSaver o => CompressionType -> IO (GValueConstruct o)
- fileSaverCompressionType :: AttrLabelProxy "compressionType"
- getFileSaverCompressionType :: (MonadIO m, IsFileSaver o) => o -> m CompressionType
- setFileSaverCompressionType :: (MonadIO m, IsFileSaver o) => o -> CompressionType -> m ()
- data FileSaverEncodingPropertyInfo
- clearFileSaverEncoding :: (MonadIO m, IsFileSaver o) => o -> m ()
- constructFileSaverEncoding :: IsFileSaver o => Encoding -> IO (GValueConstruct o)
- fileSaverEncoding :: AttrLabelProxy "encoding"
- getFileSaverEncoding :: (MonadIO m, IsFileSaver o) => o -> m Encoding
- setFileSaverEncoding :: (MonadIO m, IsFileSaver o) => o -> Encoding -> m ()
- data FileSaverFilePropertyInfo
- constructFileSaverFile :: (IsFileSaver o, IsFile a) => a -> IO (GValueConstruct o)
- fileSaverFile :: AttrLabelProxy "file"
- getFileSaverFile :: (MonadIO m, IsFileSaver o) => o -> m File
- data FileSaverFlagsPropertyInfo
- constructFileSaverFlags :: IsFileSaver o => [FileSaverFlags] -> IO (GValueConstruct o)
- fileSaverFlags :: AttrLabelProxy "flags"
- getFileSaverFlags :: (MonadIO m, IsFileSaver o) => o -> m [FileSaverFlags]
- setFileSaverFlags :: (MonadIO m, IsFileSaver o) => o -> [FileSaverFlags] -> m ()
- data FileSaverLocationPropertyInfo
- constructFileSaverLocation :: (IsFileSaver o, IsFile a) => a -> IO (GValueConstruct o)
- fileSaverLocation :: AttrLabelProxy "location"
- getFileSaverLocation :: (MonadIO m, IsFileSaver o) => o -> m File
- data FileSaverNewlineTypePropertyInfo
- constructFileSaverNewlineType :: IsFileSaver o => NewlineType -> IO (GValueConstruct o)
- fileSaverNewlineType :: AttrLabelProxy "newlineType"
- getFileSaverNewlineType :: (MonadIO m, IsFileSaver o) => o -> m NewlineType
- setFileSaverNewlineType :: (MonadIO m, IsFileSaver o) => o -> NewlineType -> m ()
Exported types
Constructors
| FileSaver (ManagedPtr FileSaver) |
Instances
| GObject FileSaver Source # | |
| IsObject FileSaver Source # | |
| IsFileSaver FileSaver Source # | |
| ((~) * info (ResolveFileSaverMethod t FileSaver), MethodInfo * info FileSaver p) => IsLabel t (FileSaver -> p) Source # | |
| ((~) * info (ResolveFileSaverMethod t FileSaver), MethodInfo * info FileSaver p) => IsLabelProxy t (FileSaver -> p) Source # | |
| HasAttributeList * FileSaver Source # | |
| type AttributeList FileSaver Source # | |
| type SignalList FileSaver Source # | |
class GObject o => IsFileSaver o Source #
Instances
toFileSaver :: IsFileSaver o => o -> IO FileSaver Source #
Methods
getBuffer
data FileSaverGetBufferMethodInfo Source #
Instances
| ((~) * signature (m Buffer), MonadIO m, IsFileSaver a) => MethodInfo * FileSaverGetBufferMethodInfo a signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a) | |
| => a |
|
| -> m Buffer | Returns: the |
No description available in the introspection data.
Since: 3.14
getCompressionType
data FileSaverGetCompressionTypeMethodInfo Source #
Instances
| ((~) * signature (m CompressionType), MonadIO m, IsFileSaver a) => MethodInfo * FileSaverGetCompressionTypeMethodInfo a signature Source # | |
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
data FileSaverGetEncodingMethodInfo Source #
Instances
| ((~) * signature (m Encoding), MonadIO m, IsFileSaver a) => MethodInfo * FileSaverGetEncodingMethodInfo a signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a) | |
| => a |
|
| -> m Encoding | Returns: the encoding. |
No description available in the introspection data.
Since: 3.14
getFile
data FileSaverGetFileMethodInfo Source #
Instances
| ((~) * signature (m File), MonadIO m, IsFileSaver a) => MethodInfo * FileSaverGetFileMethodInfo a signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a) | |
| => a |
|
| -> m File | Returns: the |
No description available in the introspection data.
Since: 3.14
getFlags
data FileSaverGetFlagsMethodInfo Source #
Instances
| ((~) * signature (m [FileSaverFlags]), MonadIO m, IsFileSaver a) => MethodInfo * FileSaverGetFlagsMethodInfo a signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a) | |
| => a |
|
| -> m [FileSaverFlags] | Returns: the flags. |
No description available in the introspection data.
Since: 3.14
getLocation
data FileSaverGetLocationMethodInfo Source #
Instances
| ((~) * signature (m File), MonadIO m, IsFileSaver a) => MethodInfo * FileSaverGetLocationMethodInfo a signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a) | |
| => a |
|
| -> m File | Returns: the |
No description available in the introspection data.
Since: 3.14
getNewlineType
data FileSaverGetNewlineTypeMethodInfo Source #
Instances
| ((~) * signature (m NewlineType), MonadIO m, IsFileSaver a) => MethodInfo * FileSaverGetNewlineTypeMethodInfo a signature Source # | |
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
data FileSaverSaveAsyncMethodInfo Source #
Instances
| ((~) * signature (Int32 -> Maybe b -> Maybe FileProgressCallback -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsFileSaver a, IsCancellable b) => MethodInfo * FileSaverSaveAsyncMethodInfo a signature Source # | |
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
data FileSaverSaveFinishMethodInfo Source #
Instances
| ((~) * signature (b -> m ()), MonadIO m, IsFileSaver a, IsAsyncResult b) => MethodInfo * FileSaverSaveFinishMethodInfo a signature Source # | |
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
data FileSaverSetCompressionTypeMethodInfo Source #
Instances
| ((~) * signature (CompressionType -> m ()), MonadIO m, IsFileSaver a) => MethodInfo * FileSaverSetCompressionTypeMethodInfo a signature Source # | |
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
data FileSaverSetEncodingMethodInfo Source #
Instances
| ((~) * signature (Maybe Encoding -> m ()), MonadIO m, IsFileSaver a) => MethodInfo * FileSaverSetEncodingMethodInfo a signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a) | |
| => a |
|
| -> Maybe Encoding |
|
| -> m () |
setFlags
data FileSaverSetFlagsMethodInfo Source #
Instances
| ((~) * signature ([FileSaverFlags] -> m ()), MonadIO m, IsFileSaver a) => MethodInfo * FileSaverSetFlagsMethodInfo a signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m, IsFileSaver a) | |
| => a |
|
| -> [FileSaverFlags] |
|
| -> m () |
No description available in the introspection data.
Since: 3.14
setNewlineType
data FileSaverSetNewlineTypeMethodInfo Source #
Instances
| ((~) * signature (NewlineType -> m ()), MonadIO m, IsFileSaver a) => MethodInfo * FileSaverSetNewlineTypeMethodInfo a signature Source # | |
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
data FileSaverBufferPropertyInfo Source #
Instances
constructFileSaverBuffer :: (IsFileSaver o, IsBuffer a) => a -> IO (GValueConstruct o) Source #
fileSaverBuffer :: AttrLabelProxy "buffer" Source #
getFileSaverBuffer :: (MonadIO m, IsFileSaver o) => o -> m Buffer Source #
compressionType
data FileSaverCompressionTypePropertyInfo Source #
Instances
constructFileSaverCompressionType :: IsFileSaver o => CompressionType -> IO (GValueConstruct o) Source #
fileSaverCompressionType :: AttrLabelProxy "compressionType" Source #
getFileSaverCompressionType :: (MonadIO m, IsFileSaver o) => o -> m CompressionType Source #
setFileSaverCompressionType :: (MonadIO m, IsFileSaver o) => o -> CompressionType -> m () Source #
encoding
data FileSaverEncodingPropertyInfo Source #
Instances
clearFileSaverEncoding :: (MonadIO m, IsFileSaver o) => o -> m () Source #
constructFileSaverEncoding :: IsFileSaver o => Encoding -> IO (GValueConstruct o) Source #
fileSaverEncoding :: AttrLabelProxy "encoding" Source #
getFileSaverEncoding :: (MonadIO m, IsFileSaver o) => o -> m Encoding Source #
setFileSaverEncoding :: (MonadIO m, IsFileSaver o) => o -> Encoding -> m () Source #
file
data FileSaverFilePropertyInfo Source #
Instances
constructFileSaverFile :: (IsFileSaver o, IsFile a) => a -> IO (GValueConstruct o) Source #
fileSaverFile :: AttrLabelProxy "file" Source #
getFileSaverFile :: (MonadIO m, IsFileSaver o) => o -> m File Source #
flags
data FileSaverFlagsPropertyInfo Source #
Instances
constructFileSaverFlags :: IsFileSaver o => [FileSaverFlags] -> IO (GValueConstruct o) Source #
fileSaverFlags :: AttrLabelProxy "flags" Source #
getFileSaverFlags :: (MonadIO m, IsFileSaver o) => o -> m [FileSaverFlags] Source #
setFileSaverFlags :: (MonadIO m, IsFileSaver o) => o -> [FileSaverFlags] -> m () Source #
location
data FileSaverLocationPropertyInfo Source #
Instances
constructFileSaverLocation :: (IsFileSaver o, IsFile a) => a -> IO (GValueConstruct o) Source #
fileSaverLocation :: AttrLabelProxy "location" Source #
getFileSaverLocation :: (MonadIO m, IsFileSaver o) => o -> m File Source #
newlineType
data FileSaverNewlineTypePropertyInfo Source #
Instances
constructFileSaverNewlineType :: IsFileSaver o => NewlineType -> IO (GValueConstruct o) Source #
fileSaverNewlineType :: AttrLabelProxy "newlineType" Source #
getFileSaverNewlineType :: (MonadIO m, IsFileSaver o) => o -> m NewlineType Source #
setFileSaverNewlineType :: (MonadIO m, IsFileSaver o) => o -> NewlineType -> m () Source #