Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
A GdkPixbufFormat
contains information about the image format accepted
by a module.
Only modules should access the fields directly, applications should
use the gdk_pixbuf_format_*
family of functions.
Since: 2.2
Synopsis
- newtype PixbufFormat = PixbufFormat (ManagedPtr PixbufFormat)
- newZeroPixbufFormat :: MonadIO m => m PixbufFormat
- pixbufFormatCopy :: (HasCallStack, MonadIO m) => PixbufFormat -> m PixbufFormat
- pixbufFormatFree :: (HasCallStack, MonadIO m) => PixbufFormat -> m ()
- pixbufFormatGetDescription :: (HasCallStack, MonadIO m) => PixbufFormat -> m Text
- pixbufFormatGetExtensions :: (HasCallStack, MonadIO m) => PixbufFormat -> m [Text]
- pixbufFormatGetLicense :: (HasCallStack, MonadIO m) => PixbufFormat -> m Text
- pixbufFormatGetMimeTypes :: (HasCallStack, MonadIO m) => PixbufFormat -> m [Text]
- pixbufFormatGetName :: (HasCallStack, MonadIO m) => PixbufFormat -> m Text
- pixbufFormatIsDisabled :: (HasCallStack, MonadIO m) => PixbufFormat -> m Bool
- pixbufFormatIsSaveOptionSupported :: (HasCallStack, MonadIO m) => PixbufFormat -> Text -> m Bool
- pixbufFormatIsScalable :: (HasCallStack, MonadIO m) => PixbufFormat -> m Bool
- pixbufFormatIsWritable :: (HasCallStack, MonadIO m) => PixbufFormat -> m Bool
- pixbufFormatSetDisabled :: (HasCallStack, MonadIO m) => PixbufFormat -> Bool -> m ()
- clearPixbufFormatDescription :: MonadIO m => PixbufFormat -> m ()
- getPixbufFormatDescription :: MonadIO m => PixbufFormat -> m (Maybe Text)
- setPixbufFormatDescription :: MonadIO m => PixbufFormat -> CString -> m ()
- getPixbufFormatDisabled :: MonadIO m => PixbufFormat -> m Bool
- setPixbufFormatDisabled :: MonadIO m => PixbufFormat -> Bool -> m ()
- clearPixbufFormatDomain :: MonadIO m => PixbufFormat -> m ()
- getPixbufFormatDomain :: MonadIO m => PixbufFormat -> m (Maybe Text)
- setPixbufFormatDomain :: MonadIO m => PixbufFormat -> CString -> m ()
- clearPixbufFormatExtensions :: MonadIO m => PixbufFormat -> m ()
- getPixbufFormatExtensions :: MonadIO m => PixbufFormat -> m (Maybe [Text])
- setPixbufFormatExtensions :: MonadIO m => PixbufFormat -> Ptr CString -> m ()
- getPixbufFormatFlags :: MonadIO m => PixbufFormat -> m Word32
- setPixbufFormatFlags :: MonadIO m => PixbufFormat -> Word32 -> m ()
- clearPixbufFormatLicense :: MonadIO m => PixbufFormat -> m ()
- getPixbufFormatLicense :: MonadIO m => PixbufFormat -> m (Maybe Text)
- setPixbufFormatLicense :: MonadIO m => PixbufFormat -> CString -> m ()
- clearPixbufFormatMimeTypes :: MonadIO m => PixbufFormat -> m ()
- getPixbufFormatMimeTypes :: MonadIO m => PixbufFormat -> m (Maybe [Text])
- setPixbufFormatMimeTypes :: MonadIO m => PixbufFormat -> Ptr CString -> m ()
- clearPixbufFormatName :: MonadIO m => PixbufFormat -> m ()
- getPixbufFormatName :: MonadIO m => PixbufFormat -> m (Maybe Text)
- setPixbufFormatName :: MonadIO m => PixbufFormat -> CString -> m ()
- clearPixbufFormatSignature :: MonadIO m => PixbufFormat -> m ()
- getPixbufFormatSignature :: MonadIO m => PixbufFormat -> m (Maybe PixbufModulePattern)
- setPixbufFormatSignature :: MonadIO m => PixbufFormat -> Ptr PixbufModulePattern -> m ()
Exported types
newtype PixbufFormat Source #
Memory-managed wrapper type.
PixbufFormat (ManagedPtr PixbufFormat) |
Instances
newZeroPixbufFormat :: MonadIO m => m PixbufFormat Source #
Construct a PixbufFormat
struct initialized to zero.
Methods
Click to display all available methods, including inherited ones
Methods
copy, free, isDisabled, isSaveOptionSupported, isScalable, isWritable.
Getters
getDescription, getExtensions, getLicense, getMimeTypes, getName.
Setters
copy
:: (HasCallStack, MonadIO m) | |
=> PixbufFormat |
|
-> m PixbufFormat | Returns: the newly allocated copy of a |
Creates a copy of format
.
Since: 2.22
free
:: (HasCallStack, MonadIO m) | |
=> PixbufFormat |
|
-> m () |
Frees the resources allocated when copying a GdkPixbufFormat
using pixbufFormatCopy
Since: 2.22
getDescription
pixbufFormatGetDescription Source #
:: (HasCallStack, MonadIO m) | |
=> PixbufFormat |
|
-> m Text | Returns: a description of the format. |
Returns a description of the format.
Since: 2.2
getExtensions
pixbufFormatGetExtensions Source #
:: (HasCallStack, MonadIO m) | |
=> PixbufFormat |
|
-> m [Text] | Returns: an array of filename extensions |
Returns the filename extensions typically used for files in the given format.
Since: 2.2
getLicense
pixbufFormatGetLicense Source #
:: (HasCallStack, MonadIO m) | |
=> PixbufFormat |
|
-> m Text | Returns: a string describing the license of the pixbuf format |
Returns information about the license of the image loader for the format.
The returned string should be a shorthand for a well known license, e.g. "LGPL", "GPL", "QPL", "GPL/QPL", or "other" to indicate some other license.
Since: 2.6
getMimeTypes
pixbufFormatGetMimeTypes Source #
:: (HasCallStack, MonadIO m) | |
=> PixbufFormat |
|
-> m [Text] | Returns: an array of mime types |
Returns the mime types supported by the format.
Since: 2.2
getName
:: (HasCallStack, MonadIO m) | |
=> PixbufFormat |
|
-> m Text | Returns: the name of the format. |
Returns the name of the format.
Since: 2.2
isDisabled
pixbufFormatIsDisabled Source #
:: (HasCallStack, MonadIO m) | |
=> PixbufFormat |
|
-> m Bool | Returns: whether this image format is disabled. |
isSaveOptionSupported
pixbufFormatIsSaveOptionSupported Source #
:: (HasCallStack, MonadIO m) | |
=> PixbufFormat |
|
-> Text |
|
-> m Bool | Returns: |
Returns TRUE
if the save option specified by optionKey
is supported when
saving a pixbuf using the module implementing format
.
See gdk_pixbuf_save()
for more information about option keys.
Since: 2.36
isScalable
pixbufFormatIsScalable Source #
:: (HasCallStack, MonadIO m) | |
=> PixbufFormat |
|
-> m Bool | Returns: whether this image format is scalable. |
Returns whether this image format is scalable.
If a file is in a scalable format, it is preferable to load it at the desired size, rather than loading it at the default size and scaling the resulting pixbuf to the desired size.
Since: 2.6
isWritable
pixbufFormatIsWritable Source #
:: (HasCallStack, MonadIO m) | |
=> PixbufFormat |
|
-> m Bool | Returns: whether pixbufs can be saved in the given format. |
Returns whether pixbufs can be saved in the given format.
Since: 2.2
setDisabled
pixbufFormatSetDisabled Source #
:: (HasCallStack, MonadIO m) | |
=> PixbufFormat |
|
-> Bool |
|
-> m () |
Disables or enables an image format.
If a format is disabled, GdkPixbuf won't use the image loader for this format to load images.
Applications can use this to avoid using image loaders with an
inappropriate license, see pixbufFormatGetLicense
.
Since: 2.6
Properties
description
a description of the image format
clearPixbufFormatDescription :: MonadIO m => PixbufFormat -> m () Source #
Set the value of the “description
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#description
getPixbufFormatDescription :: MonadIO m => PixbufFormat -> m (Maybe Text) Source #
Get the value of the “description
” field.
When overloading is enabled, this is equivalent to
get
pixbufFormat #description
setPixbufFormatDescription :: MonadIO m => PixbufFormat -> CString -> m () Source #
Set the value of the “description
” field.
When overloading is enabled, this is equivalent to
set
pixbufFormat [ #description:=
value ]
disabled
a boolean determining whether the loader is disabled`
getPixbufFormatDisabled :: MonadIO m => PixbufFormat -> m Bool Source #
Get the value of the “disabled
” field.
When overloading is enabled, this is equivalent to
get
pixbufFormat #disabled
setPixbufFormatDisabled :: MonadIO m => PixbufFormat -> Bool -> m () Source #
Set the value of the “disabled
” field.
When overloading is enabled, this is equivalent to
set
pixbufFormat [ #disabled:=
value ]
domain
the message domain for the description
clearPixbufFormatDomain :: MonadIO m => PixbufFormat -> m () Source #
Set the value of the “domain
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#domain
getPixbufFormatDomain :: MonadIO m => PixbufFormat -> m (Maybe Text) Source #
Get the value of the “domain
” field.
When overloading is enabled, this is equivalent to
get
pixbufFormat #domain
setPixbufFormatDomain :: MonadIO m => PixbufFormat -> CString -> m () Source #
Set the value of the “domain
” field.
When overloading is enabled, this is equivalent to
set
pixbufFormat [ #domain:=
value ]
extensions
typical filename extensions for the image format
clearPixbufFormatExtensions :: MonadIO m => PixbufFormat -> m () Source #
Set the value of the “extensions
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#extensions
getPixbufFormatExtensions :: MonadIO m => PixbufFormat -> m (Maybe [Text]) Source #
Get the value of the “extensions
” field.
When overloading is enabled, this is equivalent to
get
pixbufFormat #extensions
setPixbufFormatExtensions :: MonadIO m => PixbufFormat -> Ptr CString -> m () Source #
Set the value of the “extensions
” field.
When overloading is enabled, this is equivalent to
set
pixbufFormat [ #extensions:=
value ]
flags
a combination of GdkPixbufFormatFlags
getPixbufFormatFlags :: MonadIO m => PixbufFormat -> m Word32 Source #
Get the value of the “flags
” field.
When overloading is enabled, this is equivalent to
get
pixbufFormat #flags
setPixbufFormatFlags :: MonadIO m => PixbufFormat -> Word32 -> m () Source #
Set the value of the “flags
” field.
When overloading is enabled, this is equivalent to
set
pixbufFormat [ #flags:=
value ]
license
a string containing license information, typically set to shorthands like "GPL", "LGPL", etc.
clearPixbufFormatLicense :: MonadIO m => PixbufFormat -> m () Source #
Set the value of the “license
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#license
getPixbufFormatLicense :: MonadIO m => PixbufFormat -> m (Maybe Text) Source #
Get the value of the “license
” field.
When overloading is enabled, this is equivalent to
get
pixbufFormat #license
setPixbufFormatLicense :: MonadIO m => PixbufFormat -> CString -> m () Source #
Set the value of the “license
” field.
When overloading is enabled, this is equivalent to
set
pixbufFormat [ #license:=
value ]
mimeTypes
the MIME types for the image format
clearPixbufFormatMimeTypes :: MonadIO m => PixbufFormat -> m () Source #
Set the value of the “mime_types
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#mimeTypes
getPixbufFormatMimeTypes :: MonadIO m => PixbufFormat -> m (Maybe [Text]) Source #
Get the value of the “mime_types
” field.
When overloading is enabled, this is equivalent to
get
pixbufFormat #mimeTypes
setPixbufFormatMimeTypes :: MonadIO m => PixbufFormat -> Ptr CString -> m () Source #
Set the value of the “mime_types
” field.
When overloading is enabled, this is equivalent to
set
pixbufFormat [ #mimeTypes:=
value ]
name
the name of the image format
clearPixbufFormatName :: MonadIO m => PixbufFormat -> m () Source #
Set the value of the “name
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#name
getPixbufFormatName :: MonadIO m => PixbufFormat -> m (Maybe Text) Source #
Get the value of the “name
” field.
When overloading is enabled, this is equivalent to
get
pixbufFormat #name
setPixbufFormatName :: MonadIO m => PixbufFormat -> CString -> m () Source #
Set the value of the “name
” field.
When overloading is enabled, this is equivalent to
set
pixbufFormat [ #name:=
value ]
signature
the signature of the module
clearPixbufFormatSignature :: MonadIO m => PixbufFormat -> m () Source #
Set the value of the “signature
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#signature
getPixbufFormatSignature :: MonadIO m => PixbufFormat -> m (Maybe PixbufModulePattern) Source #
Get the value of the “signature
” field.
When overloading is enabled, this is equivalent to
get
pixbufFormat #signature
setPixbufFormatSignature :: MonadIO m => PixbufFormat -> Ptr PixbufModulePattern -> m () Source #
Set the value of the “signature
” field.
When overloading is enabled, this is equivalent to
set
pixbufFormat [ #signature:=
value ]