| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte | 
|---|---|
| License | LGPL-2.1 | 
| Maintainer | Iñaki García Etxebarria | 
| Safe Haskell | Safe-Inferred | 
| Language | Haskell2010 | 
GI.GdkPixbuf.Structs.PixbufModule
Description
A GdkPixbufModule contains the necessary functions to load and save
 images in a certain file format.
If GdkPixbuf has been compiled with GModule support, it can be extended
 by modules which can load (and perhaps also save) new image and animation
 formats.
Implementing modules
The GdkPixbuf interfaces needed for implementing modules are contained in
 gdk-pixbuf-io.h (and gdk-pixbuf-animation.h if the module supports
 animations). They are not covered by the same stability guarantees as the
 regular GdkPixbuf API. To underline this fact, they are protected by the
 GDK_PIXBUF_ENABLE_BACKEND pre-processor symbol.
Each loadable module must contain a GdkPixbufModuleFillVtableFunc function
 named fill_vtable, which will get called when the module
 is loaded and must set the function pointers of the GdkPixbufModule.
In order to make format-checking work before actually loading the modules
 (which may require calling dlopen to load image libraries), modules export
 their signatures (and other information) via the fill_info function. An
 external utility, gdk-pixbuf-query-loaders, uses this to create a text
 file containing a list of all available loaders and  their signatures.
 This file is then read at runtime by GdkPixbuf to obtain the list of
 available loaders and their signatures.
Modules may only implement a subset of the functionality available via
 GdkPixbufModule. If a particular functionality is not implemented, the
 fill_vtable function will simply not set the corresponding
 function pointers of the GdkPixbufModule structure. If a module supports
 incremental loading (i.e. provides begin_load, stop_load and
 load_increment), it doesn't have to implement load, since GdkPixbuf
 can supply a generic load implementation wrapping the incremental loading.
Installing modules
Installing a module is a two-step process:
- copy the module file(s) to the loader directory (normally
    $libdir/gdk-pixbuf-2.0/$version/loaders, unless overridden by the environment variableGDK_PIXBUF_MODULEDIR)
- call gdk-pixbuf-query-loadersto update the module file (normally$libdir/gdk-pixbuf-2.0/$version/loaders.cache, unless overridden by the environment variableGDK_PIXBUF_MODULE_FILE)
Synopsis
- newtype PixbufModule = PixbufModule (ManagedPtr PixbufModule)
- newZeroPixbufModule :: MonadIO m => m PixbufModule
- clearPixbufModuleInfo :: MonadIO m => PixbufModule -> m ()
- getPixbufModuleInfo :: MonadIO m => PixbufModule -> m (Maybe PixbufFormat)
- setPixbufModuleInfo :: MonadIO m => PixbufModule -> Ptr PixbufFormat -> m ()
- clearPixbufModuleIsSaveOptionSupported :: MonadIO m => PixbufModule -> m ()
- getPixbufModuleIsSaveOptionSupported :: MonadIO m => PixbufModule -> m (Maybe PixbufModuleIsSaveOptionSupportedFieldCallback)
- setPixbufModuleIsSaveOptionSupported :: MonadIO m => PixbufModule -> FunPtr C_PixbufModuleIsSaveOptionSupportedFieldCallback -> m ()
- clearPixbufModuleLoadIncrement :: MonadIO m => PixbufModule -> m ()
- getPixbufModuleLoadIncrement :: MonadIO m => PixbufModule -> m (Maybe PixbufModuleLoadIncrementFieldCallback)
- setPixbufModuleLoadIncrement :: MonadIO m => PixbufModule -> FunPtr C_PixbufModuleLoadIncrementFieldCallback -> m ()
- clearPixbufModuleModule :: MonadIO m => PixbufModule -> m ()
- getPixbufModuleModule :: MonadIO m => PixbufModule -> m (Maybe Module)
- setPixbufModuleModule :: MonadIO m => PixbufModule -> Ptr Module -> m ()
- clearPixbufModuleModuleName :: MonadIO m => PixbufModule -> m ()
- getPixbufModuleModuleName :: MonadIO m => PixbufModule -> m (Maybe Text)
- setPixbufModuleModuleName :: MonadIO m => PixbufModule -> CString -> m ()
- clearPixbufModuleModulePath :: MonadIO m => PixbufModule -> m ()
- getPixbufModuleModulePath :: MonadIO m => PixbufModule -> m (Maybe Text)
- setPixbufModuleModulePath :: MonadIO m => PixbufModule -> CString -> m ()
- clearPixbufModuleSave :: MonadIO m => PixbufModule -> m ()
- getPixbufModuleSave :: MonadIO m => PixbufModule -> m (Maybe PixbufModuleSaveFieldCallback)
- setPixbufModuleSave :: MonadIO m => PixbufModule -> FunPtr C_PixbufModuleSaveFieldCallback -> m ()
- clearPixbufModuleStopLoad :: MonadIO m => PixbufModule -> m ()
- getPixbufModuleStopLoad :: MonadIO m => PixbufModule -> m (Maybe PixbufModuleStopLoadFieldCallback)
- setPixbufModuleStopLoad :: MonadIO m => PixbufModule -> FunPtr C_PixbufModuleStopLoadFieldCallback -> m ()
Exported types
newtype PixbufModule Source #
Memory-managed wrapper type.
Constructors
| PixbufModule (ManagedPtr PixbufModule) | 
Instances
| Eq PixbufModule Source # | |
| Defined in GI.GdkPixbuf.Structs.PixbufModule | |
| BoxedPtr PixbufModule Source # | |
| Defined in GI.GdkPixbuf.Structs.PixbufModule | |
| CallocPtr PixbufModule Source # | |
| Defined in GI.GdkPixbuf.Structs.PixbufModule Methods boxedPtrCalloc :: IO (Ptr PixbufModule) | |
| ManagedPtrNewtype PixbufModule Source # | |
| Defined in GI.GdkPixbuf.Structs.PixbufModule Methods toManagedPtr :: PixbufModule -> ManagedPtr PixbufModule | |
| tag ~ 'AttrSet => Constructible PixbufModule tag Source # | |
| Defined in GI.GdkPixbuf.Structs.PixbufModule Methods new :: MonadIO m => (ManagedPtr PixbufModule -> PixbufModule) -> [AttrOp PixbufModule tag] -> m PixbufModule | |
newZeroPixbufModule :: MonadIO m => m PixbufModule Source #
Construct a PixbufModule struct initialized to zero.
Methods
Properties
info
a GdkPixbufFormat holding information about the module.
clearPixbufModuleInfo :: MonadIO m => PixbufModule -> m () Source #
Set the value of the “info” field to Nothing.
 When overloading is enabled, this is equivalent to
clear #info
getPixbufModuleInfo :: MonadIO m => PixbufModule -> m (Maybe PixbufFormat) Source #
Get the value of the “info” field.
 When overloading is enabled, this is equivalent to
get pixbufModule #info
setPixbufModuleInfo :: MonadIO m => PixbufModule -> Ptr PixbufFormat -> m () Source #
Set the value of the “info” field.
 When overloading is enabled, this is equivalent to
setpixbufModule [ #info:=value ]
isSaveOptionSupported
No description available in the introspection data.
clearPixbufModuleIsSaveOptionSupported :: MonadIO m => PixbufModule -> m () Source #
Set the value of the “is_save_option_supported” field to Nothing.
 When overloading is enabled, this is equivalent to
clear #isSaveOptionSupported
getPixbufModuleIsSaveOptionSupported :: MonadIO m => PixbufModule -> m (Maybe PixbufModuleIsSaveOptionSupportedFieldCallback) Source #
Get the value of the “is_save_option_supported” field.
 When overloading is enabled, this is equivalent to
get pixbufModule #isSaveOptionSupported
setPixbufModuleIsSaveOptionSupported :: MonadIO m => PixbufModule -> FunPtr C_PixbufModuleIsSaveOptionSupportedFieldCallback -> m () Source #
Set the value of the “is_save_option_supported” field.
 When overloading is enabled, this is equivalent to
setpixbufModule [ #isSaveOptionSupported:=value ]
loadIncrement
No description available in the introspection data.
clearPixbufModuleLoadIncrement :: MonadIO m => PixbufModule -> m () Source #
Set the value of the “load_increment” field to Nothing.
 When overloading is enabled, this is equivalent to
clear #loadIncrement
getPixbufModuleLoadIncrement :: MonadIO m => PixbufModule -> m (Maybe PixbufModuleLoadIncrementFieldCallback) Source #
Get the value of the “load_increment” field.
 When overloading is enabled, this is equivalent to
get pixbufModule #loadIncrement
setPixbufModuleLoadIncrement :: MonadIO m => PixbufModule -> FunPtr C_PixbufModuleLoadIncrementFieldCallback -> m () Source #
Set the value of the “load_increment” field.
 When overloading is enabled, this is equivalent to
setpixbufModule [ #loadIncrement:=value ]
module
the loaded GModule.
clearPixbufModuleModule :: MonadIO m => PixbufModule -> m () Source #
Set the value of the “module” field to Nothing.
 When overloading is enabled, this is equivalent to
clear #module
getPixbufModuleModule :: MonadIO m => PixbufModule -> m (Maybe Module) Source #
Get the value of the “module” field.
 When overloading is enabled, this is equivalent to
get pixbufModule #module
setPixbufModuleModule :: MonadIO m => PixbufModule -> Ptr Module -> m () Source #
Set the value of the “module” field.
 When overloading is enabled, this is equivalent to
setpixbufModule [ #module:=value ]
moduleName
the name of the module, usually the same as the usual file extension for images of this type, eg. "xpm", "jpeg" or "png".
clearPixbufModuleModuleName :: MonadIO m => PixbufModule -> m () Source #
Set the value of the “module_name” field to Nothing.
 When overloading is enabled, this is equivalent to
clear #moduleName
getPixbufModuleModuleName :: MonadIO m => PixbufModule -> m (Maybe Text) Source #
Get the value of the “module_name” field.
 When overloading is enabled, this is equivalent to
get pixbufModule #moduleName
setPixbufModuleModuleName :: MonadIO m => PixbufModule -> CString -> m () Source #
Set the value of the “module_name” field.
 When overloading is enabled, this is equivalent to
setpixbufModule [ #moduleName:=value ]
modulePath
the path from which the module is loaded.
clearPixbufModuleModulePath :: MonadIO m => PixbufModule -> m () Source #
Set the value of the “module_path” field to Nothing.
 When overloading is enabled, this is equivalent to
clear #modulePath
getPixbufModuleModulePath :: MonadIO m => PixbufModule -> m (Maybe Text) Source #
Get the value of the “module_path” field.
 When overloading is enabled, this is equivalent to
get pixbufModule #modulePath
setPixbufModuleModulePath :: MonadIO m => PixbufModule -> CString -> m () Source #
Set the value of the “module_path” field.
 When overloading is enabled, this is equivalent to
setpixbufModule [ #modulePath:=value ]
save
No description available in the introspection data.
clearPixbufModuleSave :: MonadIO m => PixbufModule -> m () Source #
Set the value of the “save” field to Nothing.
 When overloading is enabled, this is equivalent to
clear #save
getPixbufModuleSave :: MonadIO m => PixbufModule -> m (Maybe PixbufModuleSaveFieldCallback) Source #
Get the value of the “save” field.
 When overloading is enabled, this is equivalent to
get pixbufModule #save
setPixbufModuleSave :: MonadIO m => PixbufModule -> FunPtr C_PixbufModuleSaveFieldCallback -> m () Source #
Set the value of the “save” field.
 When overloading is enabled, this is equivalent to
setpixbufModule [ #save:=value ]
stopLoad
No description available in the introspection data.
clearPixbufModuleStopLoad :: MonadIO m => PixbufModule -> m () Source #
Set the value of the “stop_load” field to Nothing.
 When overloading is enabled, this is equivalent to
clear #stopLoad
getPixbufModuleStopLoad :: MonadIO m => PixbufModule -> m (Maybe PixbufModuleStopLoadFieldCallback) Source #
Get the value of the “stop_load” field.
 When overloading is enabled, this is equivalent to
get pixbufModule #stopLoad
setPixbufModuleStopLoad :: MonadIO m => PixbufModule -> FunPtr C_PixbufModuleStopLoadFieldCallback -> m () Source #
Set the value of the “stop_load” field.
 When overloading is enabled, this is equivalent to
setpixbufModule [ #stopLoad:=value ]