gtk2/docs/reference/gdk-pixbuf/tmpl/module_interface.sgml

87 lines
2.5 KiB
Plaintext
Raw Normal View History

<!-- ##### SECTION Title ##### -->
Module Interface
<!-- ##### SECTION Short_Description ##### -->
Extending &gdk-pixbuf;
<!-- ##### SECTION Long_Description ##### -->
<para>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
</para>
<!-- ##### USER_FUNCTION ModuleFillVtableFunc ##### -->
<para>
Defines the type of the function used to set the vtable of a
#GdkPixbufModule when it is loaded.
</para>
@module: a #GdkPixbufModule.
<!-- ##### USER_FUNCTION ModulePreparedNotifyFunc ##### -->
<para>
Defines the type of the function that gets called once the initial
setup of @pixbuf is done.
</para>
<para>
#GdkPixbufLoader uses a function of this type to emit the
"<link linkend="GdkPixbufLoader-area-prepared">area_prepared</link>"
signal.
</para>
@pixbuf: the #GdkPixbuf that is currently being loaded.
@anim: if an animation is being loaded, the #GdkPixbufAnimation, else %NULL.
@user_data: the loader.
<!-- ##### USER_FUNCTION ModuleUpdatedNotifyFunc ##### -->
<para>
Defines the type of the function that gets called every time a region
of @pixbuf is updated.
</para>
<para>
#GdkPixbufLoader uses a function of this type to emit the
"<link linkend="GdkPixbufLoader-area-updated">area_updated</link>"
signal.
</para>
@pixbuf: the #GdkPixbuf that is currently being loaded.
@x: the X origin of the updated area.
@y: the Y origin of the updated area.
@width: the width of the updated area.
@height: the height of the updated area.
@user_data: the loader.
<!-- ##### STRUCT GdkPixbufModule ##### -->
<para>
A #GdkPixbufModule contains the necessary functions to load and save
images in a certain file format.
</para>
<para>
A #GdkPixbufModule can be loaded dynamically from a #GModule.
Each loadable module must contain a #ModuleFillVtableFunc function named
<function>gdk_pixbuf__<replaceable>module_name</replaceable>_fill_vtable</function>.
It will get called when the module is loaded and must set the function
pointers of the #GdkPixbufModule.
</para>
@module_name: the name of the module, usually the same as the
usual file extension for images of this type, eg. "xpm", "jpeg" or "png".
@format_check: checks if the given data is the beginning of a valid image
in the format supported by the module.
@module: the loaded #GModule.
@load: loads an image from a file.
@load_xpm_data: loads an image from data in memory.
@begin_load: begins an incremental load.
@stop_load: stops an incremental load.
@load_increment: continues an incremental load.
@load_animation: loads an animation from a file.
@save: saves a #GdkPixbuf to a file.