mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-13 20:30:11 +00:00
105 lines
3.2 KiB
Plaintext
105 lines
3.2 KiB
Plaintext
<!-- ##### 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 ModuleSizeFunc ##### -->
|
|
<para>
|
|
Defines the type of the function that gets called once the size
|
|
of the loaded image is known is done.
|
|
</para>
|
|
<para>
|
|
The function is expected to set @width and @height to the desired
|
|
size to which the image should be scaled. If a module has no efficient
|
|
way to achieve the desired scaling during the loading of the image, it may
|
|
either ignore the size request, or only approximate it -- the loader will
|
|
then perform the required scaling on the completely loaded image.
|
|
</para>
|
|
|
|
@width: pointer to a location containing the current image width
|
|
@height: pointer to a location containing the current image height
|
|
@user_data: the loader.
|
|
|
|
|
|
<!-- ##### 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.
|
|
|