Commit 37ac7d59 authored by Federico Mena Quintero's avatar Federico Mena Quintero Committed by Federico Mena Quintero
Browse files

Your eyes are bloodshot.



Your eyes are bloodshot.

Your mouth starts to foam.

Your hands are shaking.

You know your need your fix.

NEED MORE ABSTRACTION!

2000-04-12  Federico Mena Quintero  <federico@helixcode.com>

	This comes from an excellent idea by Tim Janik (timj@gtk.org) to
	hook to the last unref operation.

	* gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_set_last_unref_handler): New
	function to set the last unref handler for a pixbuf.
	(gdk_pixbuf_finalize): New function to actually finalize a pixbuf.
	It calls the pixbuf's destroy notification function and frees the
	GdkPixbuf structure itself.
	(gdk_pixbuf_unref): Use the last unref function of the pixbuf if
	available.

	* gdk-pixbuf/gdk-pixbuf-private.h (struct _GdkPixbuf): New fields
	for the last unref handler and its user data.

	* gdk-pixbuf/gdk-pixbuf-data.c (gdk_pixbuf_new_from_data): Use
	g_new0() to allocate the pixbuf.

	* gdk-pixbuf/gdk-pixbuf-loader.c (gdk_pixbuf_loader_class_init):
	Fixed the call to gtk_signal_new() for the "frame_done" signal; it
	was not specifying the `frame' argument.

	* gdk-pixbuf/gdk-pixbuf-animation.c
	(gdk_pixbuf_animation_get_width): Fixed docstring.
	(gdk_pixbuf_animation_get_height): Likewise.
	(gdk_pixbuf_animation_get_num_frames): Likewise.
	(gdk_pixbuf_animation_get_frames): Likewise.

	* doc/gdk-pixbuf-sections.txt: Updated with the new functions and
	types.

	* doc/tmpl/gdk-pixbuf.sgml: Added the description for GdkColorspace.

	* doc/tmpl/scaling.sgml: Added the description for GdkInterpType.

	* doc/tmpl/refcounting.sgml: Updated with the information about
	the last unref handler.

	* doc/tmpl/*.sgml: Markup tweaks.

	* gdk-pixbuf/Makefile.am (libgnomecanvaspixbuf_la_LDFLAGS): Sigh,
	update the libtool version number for libgnomecanvaspixbuf as
	well.
	(libpixbufloader_*_la_LDFLAGS): The loaders need to be versioned
	as well, or the old ones won't work with the new stuff.  Also,
	renamed the modules as follows.

	* gdk-pixbuf/gdk-pixbuf-io.c (gdk_pixbuf_load_module): Now the
	modules are called "libpixbufloader-<format>.so" instead of
	"libpixbuf-<format>.so".  They needed renaming so that the new
	loaders won't overwrite the old ones; even with the versioning
	stuff, the new .so symlink to the .so.1.0.0 would overwrite the
	old real .so file.
parent a106984b
<appendix id="compiling"> <appendix id="compiling">
<title>Compiling the gdk-pixbuf library</title> <title>Compiling the <application>gdk-pixbuf</application>
library</title>
<para> <para>
This appendix describes the special options you can use while This appendix describes the special options you can use while
compiling the gdk-pixbuf library. compiling the <application>gdk-pixbuf</application> library.
</para> </para>
<sect1 id="building"> <sect1 id="building">
<title>Building the Library</title> <title>Building the Library</title>
<para> <para>
The gdk-pixbuf library uses the standard GNU build system, The <application>gdk-pixbuf</application> library uses the
using <productname>autoconf</productname> for package standard GNU build system, using
configuration and resolving portability issues, <application>autoconf</application> for package configuration
<productname>automake</productname> for building makefiles and resolving portability issues,
<application>automake</application> for building makefiles
that comply with the GNU Coding Standards, and that comply with the GNU Coding Standards, and
<productname>libtool</productname> for building shared <application>libtool</application> for building shared
libraries on multiple platforms. The normal sequence for libraries on multiple platforms. The normal sequence for
compiling and installing the gdk-pixbuf library is thus: compiling and installing the
<application>gdk-pixbuf</application> library is thus:
<literallayout> <literallayout>
<userinput>./configure</userinput> <userinput>./configure</userinput>
...@@ -26,10 +29,10 @@ ...@@ -26,10 +29,10 @@
</para> </para>
<para> <para>
The standard options provided by <productname>GNU The standard options provided by <application>GNU
autoconf</productname> may be passed to the autoconf</application> may be passed to the
<command>configure</command> script. Please see the <command>configure</command> script. Please see the
<productname>autoconf</productname> documentation or run <application>autoconf</application> documentation or run
<command>./configure --help</command> for information about <command>./configure --help</command> for information about
the standard options. the standard options.
</para> </para>
...@@ -40,8 +43,9 @@ ...@@ -40,8 +43,9 @@
<para> <para>
In addition to the normal options, the In addition to the normal options, the
<command>configure</command> script in the gdk-pixbuf library <command>configure</command> script in the
supports these additional arguments: <application>gdk-pixbuf</application> library supports these
additional arguments:
<cmdsynopsis> <cmdsynopsis>
<command>configure</command> <command>configure</command>
...@@ -63,13 +67,15 @@ ...@@ -63,13 +67,15 @@
<systemitem>--enable-modules</systemitem></title> <systemitem>--enable-modules</systemitem></title>
<para> <para>
Normally gdk-pixbuf will try to build the image file format Normally <application>gdk-pixbuf</application> will try to
loaders as little shared libraries that are loaded on build the image file format loaders as little shared
demand. The <systemitem>--disable-modules</systemitem> libraries that are loaded on demand. The
argument indicates that they should all be built statically <systemitem>--disable-modules</systemitem> argument
into the gdk-pixbuf library instead. This is useful for indicates that they should all be built statically into the
people who need to produce statically-linked binaries. If <application>gdk-pixbuf</application> library instead. This
neither <systemitem>--disable-modules</systemitem> nor is useful for people who need to produce statically-linked
binaries. If neither
<systemitem>--disable-modules</systemitem> nor
<systemitem>--enable-modules</systemitem> is specified, then <systemitem>--enable-modules</systemitem> is specified, then
the <command>configure</command> script will try to the <command>configure</command> script will try to
auto-detect whether shared modules work on your system. auto-detect whether shared modules work on your system.
...@@ -83,13 +89,13 @@ ...@@ -83,13 +89,13 @@
<para> <para>
By default the <command>configure</command> script will try By default the <command>configure</command> script will try
to auto-detect whether the to auto-detect whether the
<productname>gtk-doc</productname> package is installed. If <application>gtk-doc</application> package is installed. If
it is, then it will use it to extract and build the it is, then it will use it to extract and build the
documentation for the gdk-pixbuf library. These options can documentation for the <application>gdk-pixbuf</application>
be used to explicitly control whether gtk-doc should be used library. These options can be used to explicitly control
or not. If it is not used, the distributed, pre-generated whether gtk-doc should be used or not. If it is not used,
HTML files will be installed instead of building them on the distributed, pre-generated HTML files will be installed
your machine. instead of building them on your machine.
</para> </para>
</formalpara> </formalpara>
</sect1> </sect1>
......
...@@ -125,6 +125,12 @@ GdkPixbufLoader *loader ...@@ -125,6 +125,12 @@ GdkPixbufLoader *loader
<RETURNS>void </RETURNS> <RETURNS>void </RETURNS>
GdkPixbufLoader *loader GdkPixbufLoader *loader
</FUNCTION> </FUNCTION>
<ENUM>
<NAME>GdkColorspace</NAME>
typedef enum {
GDK_COLORSPACE_RGB
} GdkColorspace;
</ENUM>
<STRUCT> <STRUCT>
<NAME>GdkPixbuf</NAME> <NAME>GdkPixbuf</NAME>
</STRUCT> </STRUCT>
...@@ -134,113 +140,85 @@ GdkPixbufLoader *loader ...@@ -134,113 +140,85 @@ GdkPixbufLoader *loader
<STRUCT> <STRUCT>
<NAME>GdkPixbufAnimation</NAME> <NAME>GdkPixbufAnimation</NAME>
</STRUCT> </STRUCT>
<STRUCT> <USER_FUNCTION>
<NAME>GdkPixbuf</NAME> <NAME>GdkPixbufDestroyNotify</NAME>
struct GdkPixbuf { <RETURNS>void </RETURNS>
/* Reference count */ guchar *pixels, gpointer data
int ref_count; </USER_FUNCTION>
<USER_FUNCTION>
/* Libart pixbuf */ <NAME>GdkPixbufLastUnref</NAME>
ArtPixBuf *art_pixbuf; <RETURNS>void </RETURNS>
}; GdkPixbuf *pixbuf, gpointer data
</STRUCT> </USER_FUNCTION>
<ENUM> <FUNCTION>
<NAME>GdkPixbufFrameAction</NAME> <NAME>gdk_pixbuf_ref</NAME>
typedef enum { <RETURNS>GdkPixbuf *</RETURNS>
GDK_PIXBUF_FRAME_RETAIN, GdkPixbuf *pixbuf
GDK_PIXBUF_FRAME_DISPOSE, </FUNCTION>
GDK_PIXBUF_FRAME_REVERT
} GdkPixbufFrameAction;
</ENUM>
<STRUCT>
<NAME>GdkPixbufFrame</NAME>
struct GdkPixbufFrame {
/* The pixbuf with this frame's image data */
GdkPixbuf *pixbuf;
/* Offsets for overlaying onto the animation's area */
int x_offset;
int y_offset;
/* Frame duration in ms */
int delay_time;
/* Overlay mode */
GdkPixbufFrameAction action;
};
</STRUCT>
<STRUCT>
<NAME>GdkPixbufAnimation</NAME>
struct GdkPixbufAnimation {
/* Reference count */
int ref_count;
/* Number of frames */
int n_frames;
/* List of GdkPixbufFrame structures */
GList *frames;
};
</STRUCT>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_get_format</NAME> <NAME>gdk_pixbuf_unref</NAME>
<RETURNS>ArtPixFormat </RETURNS> <RETURNS>void </RETURNS>
GdkPixbuf *pixbuf
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_set_last_unref_handler</NAME>
<RETURNS>void </RETURNS>
GdkPixbuf *pixbuf,GdkPixbufLastUnref last_unref_fn,gpointer last_unref_fn_data
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_finalize</NAME>
<RETURNS>void </RETURNS>
GdkPixbuf *pixbuf GdkPixbuf *pixbuf
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_get_colorspace</NAME>
<RETURNS>GdkColorspace </RETURNS>
const GdkPixbuf *pixbuf
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_get_n_channels</NAME> <NAME>gdk_pixbuf_get_n_channels</NAME>
<RETURNS>int </RETURNS> <RETURNS>int </RETURNS>
GdkPixbuf *pixbuf const GdkPixbuf *pixbuf
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_get_has_alpha</NAME> <NAME>gdk_pixbuf_get_has_alpha</NAME>
<RETURNS>int </RETURNS> <RETURNS>gboolean </RETURNS>
GdkPixbuf *pixbuf const GdkPixbuf *pixbuf
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_get_bits_per_sample</NAME> <NAME>gdk_pixbuf_get_bits_per_sample</NAME>
<RETURNS>int </RETURNS> <RETURNS>int </RETURNS>
GdkPixbuf *pixbuf const GdkPixbuf *pixbuf
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_get_pixels</NAME> <NAME>gdk_pixbuf_get_pixels</NAME>
<RETURNS>guchar *</RETURNS> <RETURNS>guchar *</RETURNS>
GdkPixbuf *pixbuf const GdkPixbuf *pixbuf
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_get_width</NAME> <NAME>gdk_pixbuf_get_width</NAME>
<RETURNS>int </RETURNS> <RETURNS>int </RETURNS>
GdkPixbuf *pixbuf const GdkPixbuf *pixbuf
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_get_height</NAME> <NAME>gdk_pixbuf_get_height</NAME>
<RETURNS>int </RETURNS> <RETURNS>int </RETURNS>
GdkPixbuf *pixbuf const GdkPixbuf *pixbuf
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_get_rowstride</NAME> <NAME>gdk_pixbuf_get_rowstride</NAME>
<RETURNS>int </RETURNS> <RETURNS>int </RETURNS>
GdkPixbuf *pixbuf const GdkPixbuf *pixbuf
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_ref</NAME> <NAME>gdk_pixbuf_new</NAME>
<RETURNS>GdkPixbuf *</RETURNS>
GdkPixbuf *pixbuf
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_unref</NAME>
<RETURNS>void </RETURNS>
GdkPixbuf *pixbuf
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_new_from_art_pixbuf</NAME>
<RETURNS>GdkPixbuf *</RETURNS> <RETURNS>GdkPixbuf *</RETURNS>
ArtPixBuf *art_pixbuf GdkColorspace colorspace, gboolean has_alpha, int bits_per_sample,int width, int height
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_new</NAME> <NAME>gdk_pixbuf_copy</NAME>
<RETURNS>GdkPixbuf *</RETURNS> <RETURNS>GdkPixbuf *</RETURNS>
ArtPixFormat format, gboolean has_alpha, int bits_per_sample,int width, int height const GdkPixbuf *pixbuf
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_new_from_file</NAME> <NAME>gdk_pixbuf_new_from_file</NAME>
...@@ -250,7 +228,7 @@ const char *filename ...@@ -250,7 +228,7 @@ const char *filename
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_new_from_data</NAME> <NAME>gdk_pixbuf_new_from_data</NAME>
<RETURNS>GdkPixbuf *</RETURNS> <RETURNS>GdkPixbuf *</RETURNS>
guchar *data,ArtPixFormat format,gboolean has_alpha,int width, int height,int rowstride,ArtDestroyNotify dfunc,gpointer dfunc_data const guchar *data,GdkColorspace colorspace,gboolean has_alpha,int bits_per_sample,int width, int height,int rowstride,GdkPixbufDestroyNotify destroy_fn,gpointer destroy_fn_data
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_new_from_xpm_data</NAME> <NAME>gdk_pixbuf_new_from_xpm_data</NAME>
...@@ -260,7 +238,12 @@ const char **data ...@@ -260,7 +238,12 @@ const char **data
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_add_alpha</NAME> <NAME>gdk_pixbuf_add_alpha</NAME>
<RETURNS>GdkPixbuf *</RETURNS> <RETURNS>GdkPixbuf *</RETURNS>
GdkPixbuf *pixbuf, gboolean substitute_color,guchar r, guchar g, guchar b const GdkPixbuf *pixbuf, gboolean substitute_color,guchar r, guchar g, guchar b
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_copy_area</NAME>
<RETURNS>void </RETURNS>
const GdkPixbuf *src_pixbuf,int src_x, int src_y,int width, int height,GdkPixbuf *dest_pixbuf,int dest_x, int dest_y
</FUNCTION> </FUNCTION>
<ENUM> <ENUM>
<NAME>GdkPixbufAlphaMode</NAME> <NAME>GdkPixbufAlphaMode</NAME>
...@@ -294,40 +277,52 @@ GdkPixbuf *pixbuf,GdkPixmap **pixmap_return, GdkBitmap **mask_return,int alpha_t ...@@ -294,40 +277,52 @@ GdkPixbuf *pixbuf,GdkPixmap **pixmap_return, GdkBitmap **mask_return,int alpha_t
<RETURNS>GdkPixbuf *</RETURNS> <RETURNS>GdkPixbuf *</RETURNS>
GdkPixbuf *dest,GdkDrawable *src, GdkColormap *cmap,int src_x, int src_y,int dest_x, int dest_y,int width, int height GdkPixbuf *dest,GdkDrawable *src, GdkColormap *cmap,int src_x, int src_y,int dest_x, int dest_y,int width, int height
</FUNCTION> </FUNCTION>
<FUNCTION> <ENUM>
<NAME>gdk_pixbuf_copy_area</NAME> <NAME>GdkInterpType</NAME>
<RETURNS>void </RETURNS> typedef enum {
GdkPixbuf *src_pixbuf,int src_x, int src_y,int width, int height,GdkPixbuf *dest_pixbuf,int dest_x, int dest_y GDK_INTERP_NEAREST,
</FUNCTION> GDK_INTERP_TILES,
GDK_INTERP_BILINEAR,
GDK_INTERP_HYPER
} GdkInterpType;
</ENUM>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_scale</NAME> <NAME>gdk_pixbuf_scale</NAME>
<RETURNS>void </RETURNS> <RETURNS>void </RETURNS>
GdkPixbuf *src,GdkPixbuf *dest,int dest_x,int dest_y,int dest_width,int dest_height,double offset_x,double offset_y,double scale_x,double scale_y,ArtFilterLevel filter_level const GdkPixbuf *src,GdkPixbuf *dest,int dest_x,int dest_y,int dest_width,int dest_height,double offset_x,double offset_y,double scale_x,double scale_y,GdkInterpType interp_type
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_composite</NAME> <NAME>gdk_pixbuf_composite</NAME>
<RETURNS>void </RETURNS> <RETURNS>void </RETURNS>
GdkPixbuf *src,GdkPixbuf *dest,int dest_x,int dest_y,int dest_width,int dest_height,double offset_x,double offset_y,double scale_x,double scale_y,ArtFilterLevel filter_level,int overall_alpha const GdkPixbuf *src,GdkPixbuf *dest,int dest_x,int dest_y,int dest_width,int dest_height,double offset_x,double offset_y,double scale_x,double scale_y,GdkInterpType interp_type,int overall_alpha
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_composite_color</NAME> <NAME>gdk_pixbuf_composite_color</NAME>
<RETURNS>void </RETURNS> <RETURNS>void </RETURNS>
GdkPixbuf *src,GdkPixbuf *dest,int dest_x,int dest_y,int dest_width,int dest_height,double offset_x,double offset_y,double scale_x,double scale_y,ArtFilterLevel filter_level,int overall_alpha,int check_x,int check_y,int check_size,art_u32 color1,art_u32 color2 const GdkPixbuf *src,GdkPixbuf *dest,int dest_x,int dest_y,int dest_width,int dest_height,double offset_x,double offset_y,double scale_x,double scale_y,GdkInterpType interp_type,int overall_alpha,int check_x,int check_y,int check_size,guint32 color1,guint32 color2
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_scale_simple</NAME> <NAME>gdk_pixbuf_scale_simple</NAME>
<RETURNS>GdkPixbuf *</RETURNS> <RETURNS>GdkPixbuf *</RETURNS>
GdkPixbuf *src,int dest_width,int dest_height,ArtFilterLevel filter_level const GdkPixbuf *src,int dest_width,int dest_height,GdkInterpType interp_type
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_composite_color_simple</NAME> <NAME>gdk_pixbuf_composite_color_simple</NAME>
<RETURNS>GdkPixbuf *</RETURNS> <RETURNS>GdkPixbuf *</RETURNS>
GdkPixbuf *src,int dest_width,int dest_height,ArtFilterLevel filter_level,int overall_alpha,int check_size,art_u32 color1,art_u32 color2 const GdkPixbuf *src,int dest_width,int dest_height,GdkInterpType interp_type,int overall_alpha,int check_size,guint32 color1,guint32 color2
</FUNCTION> </FUNCTION>
<ENUM>
<NAME>GdkPixbufFrameAction</NAME>
typedef enum {
GDK_PIXBUF_FRAME_RETAIN,
GDK_PIXBUF_FRAME_DISPOSE,
GDK_PIXBUF_FRAME_REVERT
} GdkPixbufFrameAction;
</ENUM>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_animation_new_from_file</NAME> <NAME>gdk_pixbuf_animation_new_from_file</NAME>
<RETURNS>GdkPixbufAnimation *</RETURNS> <RETURNS>GdkPixbufAnimation *</RETURNS>
const char *filename const char *filename
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_animation_ref</NAME> <NAME>gdk_pixbuf_animation_ref</NAME>
...@@ -340,6 +335,51 @@ GdkPixbufAnimation *animation ...@@ -340,6 +335,51 @@ GdkPixbufAnimation *animation
GdkPixbufAnimation *animation GdkPixbufAnimation *animation
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_animation_get_width</NAME>
<RETURNS>int </RETURNS>
GdkPixbufAnimation *animation
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_animation_get_height</NAME>
<RETURNS>int </RETURNS>
GdkPixbufAnimation *animation
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_animation_get_frames</NAME>
<RETURNS>GList *</RETURNS>
GdkPixbufAnimation *animation
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_animation_get_num_frames</NAME>
<RETURNS>int </RETURNS>
GdkPixbufAnimation *animation
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_frame_get_pixbuf</NAME>
<RETURNS>GdkPixbuf *</RETURNS>
GdkPixbufFrame *frame
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_frame_get_x_offset</NAME>
<RETURNS>int </RETURNS>
GdkPixbufFrame *frame
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_frame_get_y_offset</NAME>
<RETURNS>int </RETURNS>
GdkPixbufFrame *frame
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_frame_get_delay_time</NAME>
<RETURNS>int </RETURNS>
GdkPixbufFrame *frame
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_frame_get_action</NAME>
<RETURNS>GdkPixbufFrameAction </RETURNS>
GdkPixbufFrame *frame
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_preinit</NAME> <NAME>gdk_pixbuf_preinit</NAME>
<RETURNS>void </RETURNS> <RETURNS>void </RETURNS>
gpointer app, gpointer modinfo gpointer app, gpointer modinfo
...@@ -398,7 +438,7 @@ void ...@@ -398,7 +438,7 @@ void
</MACRO> </MACRO>
<MACRO> <MACRO>
<NAME>GDK_PIXBUF_MINOR</NAME> <NAME>GDK_PIXBUF_MINOR</NAME>
#define GDK_PIXBUF_MINOR (4) #define GDK_PIXBUF_MINOR (7)
</MACRO> </MACRO>
<MACRO> <MACRO>
<NAME>GDK_PIXBUF_MICRO</NAME> <NAME>GDK_PIXBUF_MICRO</NAME>
...@@ -406,9 +446,82 @@ void ...@@ -406,9 +446,82 @@ void
</MACRO> </MACRO>
<MACRO> <MACRO>
<NAME>GDK_PIXBUF_VERSION</NAME> <NAME>GDK_PIXBUF_VERSION</NAME>
#define GDK_PIXBUF_VERSION "0.4.0" #define GDK_PIXBUF_VERSION "0.7.0"
</MACRO> </MACRO>
<VARIABLE> <VARIABLE>
<NAME>gdk_pixbuf_version</NAME> <NAME>gdk_pixbuf_version</NAME>
extern const char *gdk_pixbuf_version; extern const char *gdk_pixbuf_version;
</VARIABLE> </VARIABLE>
<STRUCT>
<NAME>GdkPixbuf</NAME>
struct GdkPixbuf {
/* Reference count */
int ref_count;
/* Color space */
GdkColorspace colorspace;
/* Number of channels, alpha included */
int n_channels;
/* Bits per channel */
int bits_per_sample;
/* Size */
int width, height;
/* Offset between rows */
int rowstride;
/* The pixel array */
guchar *pixels;
/* Destroy notification function; it is supposed to free the pixel array */
GdkPixbufDestroyNotify destroy_fn;
/* User data for the destroy notification function */
gpointer destroy_fn_data;
/* Last unref handler, determines whether the pixbuf should be finalized */
GdkPixbufLastUnref last_unref_fn;
/* User data for the last unref handler */
gpointer last_unref_fn_data;
/* Do we have an alpha channel? */
guint has_alpha : 1;
};
</STRUCT>
<STRUCT>
<NAME>GdkPixbufFrame</NAME>
struct GdkPixbufFrame {
/* The pixbuf with this frame's image data */
GdkPixbuf *pixbuf;
/* Offsets for overlaying onto the animation's area */
int x_offset;
int y_offset;
/* Frame duration in ms */
int delay_time;
/* Overlay mode */
GdkPixbufFrameAction action;
};
</STRUCT>
<STRUCT>
<NAME>GdkPixbufAnimation</NAME>
struct GdkPixbufAnimation {
/* Reference count */
int ref_count;
/* Number of frames */
int n_frames;
/* List of GdkPixbufFrame structures */
GList *frames;
/* bounding box size */
int width, height;
};
</STRUCT>
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
<SECTION> <SECTION>
<FILE>gdk-pixbuf</FILE> <FILE>gdk-pixbuf</FILE>
GdkColorspace
GdkPixbuf GdkPixbuf
gdk_pixbuf_get_format gdk_pixbuf_get_colorspace
gdk_pixbuf_get_n_channels gdk_pixbuf_get_n_channels
gdk_pixbuf_get_has_alpha gdk_pixbuf_get_has_alpha
gdk_pixbuf_get_bits_per_sample gdk_pixbuf_get_bits_per_sample
...@@ -15,8 +16,12 @@ gdk_pixbuf_get_rowstride ...@@ -15,8 +16,12 @@ gdk_pixbuf_get_rowstride
<SECTION> <SECTION>