diff --git a/demos/testpixbuf-drawable.c b/demos/testpixbuf-drawable.c
index 3d43244ca5..22dab35e9e 100644
--- a/demos/testpixbuf-drawable.c
+++ b/demos/testpixbuf-drawable.c
@@ -103,4 +103,5 @@ int main(int argc, char **argv)
gtk_widget_show_all(window);
gtk_main();
+ return 0;
}
diff --git a/docs/reference/gdk-pixbuf/gdk-pixbuf-decl.txt b/docs/reference/gdk-pixbuf/gdk-pixbuf-decl.txt
index b85363d39a..560f696be7 100644
--- a/docs/reference/gdk-pixbuf/gdk-pixbuf-decl.txt
+++ b/docs/reference/gdk-pixbuf/gdk-pixbuf-decl.txt
@@ -224,7 +224,7 @@ GdkPixbuf *pixbuf
gdk_pixbuf_ref
-void
+GdkPixbuf *
GdkPixbuf *pixbuf
@@ -331,7 +331,7 @@ const char *filename
gdk_pixbuf_animation_ref
-void
+GdkPixbufAnimation *
GdkPixbufAnimation *animation
diff --git a/docs/reference/gdk-pixbuf/tmpl/animation.sgml b/docs/reference/gdk-pixbuf/tmpl/animation.sgml
index 07b392bb89..2ce521ac84 100644
--- a/docs/reference/gdk-pixbuf/tmpl/animation.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/animation.sgml
@@ -73,6 +73,7 @@ Animations as multi-frame structures.
@animation:
+@Returns:
diff --git a/docs/reference/gdk-pixbuf/tmpl/refcounting.sgml b/docs/reference/gdk-pixbuf/tmpl/refcounting.sgml
index 845d2ceaf6..9593e7210c 100644
--- a/docs/reference/gdk-pixbuf/tmpl/refcounting.sgml
+++ b/docs/reference/gdk-pixbuf/tmpl/refcounting.sgml
@@ -26,6 +26,7 @@ Functions to perform reference counting on a #GdkPixbuf.
@pixbuf:
+@Returns:
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog
index 79fcb92abf..a60240f84b 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -1,5 +1,13 @@
+2000-01-21 Federico Mena Quintero
+
+ * gdk-pixbuf/gdk-pixbuf.c (gdk_pixbuf_ref): Return the same pixbuf
+ as the input parameter.
+
+ * gdk-pixbuf/gdk-pixbuf-animation.c (gdk_pixbuf_animation_ref):
+ Return the same animation as the input parameter.
+
2000-01-16 Elliot Lee
-
+
* gdk-pixbuf/Makefile.am: Don't link against libgnomecanvaspixbuf.la
2000-01-16 Federico Mena Quintero
@@ -80,22 +88,22 @@
loading.
* gdk-pixbuf/io-gif.c (image_load_increment): I think the
ref-counting mess is finally fixed. Added progressive animation
- loading.
+ loading.
(gif_get_lzw): remove memory_leak
* doc/tmpl/gdk-pixbuf-loader.sgml: much longer long description
- added.
+ added.
2000-01-05 Owen Taylor
* gdk-pixbuf/pixops/pixops.c (pixops_process): Fix computation of end of run indices.
-
+
* gdk-pixbuf/pixops/pixops.c: Fix double increments when dest_channels == 4.
(Pointed out by Tomas Ogren)
2000-01-05 Mark Crichton
- * gdk-pixbuf/gdk-pixbuf-loader.c (gdk_pixbuf_loader_eat_header_write):
+ * gdk-pixbuf/gdk-pixbuf-loader.c (gdk_pixbuf_loader_eat_header_write):
Return 0 if gdk_pixbuf_load_loader_module returns FALSE.
2000-01-05 Elliot Lee
@@ -104,7 +112,7 @@
2000-01-05 Owen Taylor
* doc/Makefile.am doc/gdk-pixbuf-sections.txt
- doc/gdk-pixbuf.sgml doc/tmpl/scaling.sgml:
+ doc/gdk-pixbuf.sgml doc/tmpl/scaling.sgml:
Added scaling functions into gtk-doc framework.
* gdk-pixbuf/gdk-pixbuf-scale.c: Documentation fixes.
@@ -124,9 +132,9 @@
* gdk-pixbuf/gdk-pixbuf-io.h: Change the order of the update func
to make it more compatible with the rest of GTK. Added animation
framework for progressive loading.
-
+
* gdk-pixbuf/io-bmp.c (image_begin_load): Modified to handle new
- system.
+ system.
* gdk-pixbuf/io-ico.c (image_begin_load): ditto
* gdk-pixbuf/io-png.c (image_begin_load): ditto
* gdk-pixbuf/io-ras.c (image_begin_load): ditto
@@ -153,10 +161,10 @@
* gdk-pixbuf/gdk-pixbuf.h gdk-pixbuf/gdk-pixbuf-scale.c:
Nice wrapper routines for the code in pixops that operate
on pixbufs instead of raw data.
-
+
* gdk-pixbuf/testpixbuf-scale: Test program for scaling
routines.
-
+
2000-01-05 Jonathan Blandford
* doc/tmpl/animation.sgml: Documentation changes.
diff --git a/gdk-pixbuf/gdk-pixbuf-animation.c b/gdk-pixbuf/gdk-pixbuf-animation.c
index 5e9e0d17e9..0577a97c46 100644
--- a/gdk-pixbuf/gdk-pixbuf-animation.c
+++ b/gdk-pixbuf/gdk-pixbuf-animation.c
@@ -117,14 +117,17 @@ gdk_pixbuf_animation_new_from_file (const char *filename)
*
* Adds a reference to an animation. It must be released afterwards using
* gdk_pixbuf_animation_unref().
+ *
+ * Return value: The same as the @animation argument.
**/
-void
+GdkPixbufAnimation *
gdk_pixbuf_animation_ref (GdkPixbufAnimation *animation)
{
- g_return_if_fail (animation != NULL);
- g_return_if_fail (animation->ref_count > 0);
+ g_return_val_if_fail (animation != NULL, NULL);
+ g_return_val_if_fail (animation->ref_count > 0, NULL);
animation->ref_count++;
+ return animation;
}
/**
diff --git a/gdk-pixbuf/gdk-pixbuf.c b/gdk-pixbuf/gdk-pixbuf.c
index fab12f2e3f..792f04b745 100644
--- a/gdk-pixbuf/gdk-pixbuf.c
+++ b/gdk-pixbuf/gdk-pixbuf.c
@@ -41,14 +41,17 @@
*
* Adds a reference to a pixbuf. It must be released afterwards using
* gdk_pixbuf_unref().
+ *
+ * Return value: The same as the @pixbuf argument.
**/
-void
+GdkPixbuf *
gdk_pixbuf_ref (GdkPixbuf *pixbuf)
{
- g_return_if_fail (pixbuf != NULL);
- g_return_if_fail (pixbuf->ref_count > 0);
+ g_return_val_if_fail (pixbuf != NULL, NULL);
+ g_return_val_if_fail (pixbuf->ref_count > 0, NULL);
pixbuf->ref_count++;
+ return pixbuf;
}
/**
diff --git a/gdk-pixbuf/gdk-pixbuf.h b/gdk-pixbuf/gdk-pixbuf.h
index 097c25644b..ad94e445ca 100644
--- a/gdk-pixbuf/gdk-pixbuf.h
+++ b/gdk-pixbuf/gdk-pixbuf.h
@@ -97,7 +97,7 @@ int gdk_pixbuf_get_rowstride (GdkPixbuf *pixbuf);
/* Reference counting */
-void gdk_pixbuf_ref (GdkPixbuf *pixbuf);
+GdkPixbuf *gdk_pixbuf_ref (GdkPixbuf *pixbuf);
void gdk_pixbuf_unref (GdkPixbuf *pixbuf);
/* Wrap a libart pixbuf */
@@ -234,7 +234,7 @@ GdkPixbuf *gdk_pixbuf_composite_color_simple (GdkPixbuf *src,
GdkPixbufAnimation *gdk_pixbuf_animation_new_from_file (const char *filename);
-void gdk_pixbuf_animation_ref (GdkPixbufAnimation *animation);
+GdkPixbufAnimation *gdk_pixbuf_animation_ref (GdkPixbufAnimation *animation);
void gdk_pixbuf_animation_unref (GdkPixbufAnimation *animation);
/* General (presently empty) initialization hooks, primarily for gnome-libs */