summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-01-21 22:54:44 +0000
committerArturo Espinosa <unammx@src.gnome.org>2000-01-21 22:54:44 +0000
commitbb8a56373065c6189c5b7238f6661bbd904f5cf9 (patch)
treefed236223632b82217040d3337217a3f615533ff
parent2f27c99f364cd4ac170fe6050263bae19f7c401d (diff)
downloadgdk-pixbuf-bb8a56373065c6189c5b7238f6661bbd904f5cf9.tar.gz
Return the same pixbuf as the input parameter.
2000-01-21 Federico Mena Quintero <federico@helixcode.com> * 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.
-rw-r--r--demos/testpixbuf-drawable.c1
-rw-r--r--docs/reference/gdk-pixbuf/gdk-pixbuf-decl.txt4
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/animation.sgml1
-rw-r--r--docs/reference/gdk-pixbuf/tmpl/refcounting.sgml1
-rw-r--r--gdk-pixbuf/ChangeLog28
-rw-r--r--gdk-pixbuf/gdk-pixbuf-animation.c9
-rw-r--r--gdk-pixbuf/gdk-pixbuf.c9
-rw-r--r--gdk-pixbuf/gdk-pixbuf.h4
8 files changed, 37 insertions, 20 deletions
diff --git a/demos/testpixbuf-drawable.c b/demos/testpixbuf-drawable.c
index 3d43244ca..22dab35e9 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 b85363d39..560f696be 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
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_ref</NAME>
-<RETURNS>void </RETURNS>
+<RETURNS>GdkPixbuf *</RETURNS>
GdkPixbuf *pixbuf
</FUNCTION>
<FUNCTION>
@@ -331,7 +331,7 @@ const char *filename
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_animation_ref</NAME>
-<RETURNS>void </RETURNS>
+<RETURNS>GdkPixbufAnimation *</RETURNS>
GdkPixbufAnimation *animation
</FUNCTION>
<FUNCTION>
diff --git a/docs/reference/gdk-pixbuf/tmpl/animation.sgml b/docs/reference/gdk-pixbuf/tmpl/animation.sgml
index 07b392bb8..2ce521ac8 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.
</para>
@animation:
+@Returns:
<!-- ##### FUNCTION gdk_pixbuf_animation_unref ##### -->
diff --git a/docs/reference/gdk-pixbuf/tmpl/refcounting.sgml b/docs/reference/gdk-pixbuf/tmpl/refcounting.sgml
index 845d2ceaf..9593e7210 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.
</para>
@pixbuf:
+@Returns:
<!-- ##### FUNCTION gdk_pixbuf_unref ##### -->
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog
index 79fcb92ab..a60240f84 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -1,5 +1,13 @@
+2000-01-21 Federico Mena Quintero <federico@helixcode.com>
+
+ * 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 <sopwith@redhat.com>
-
+
* gdk-pixbuf/Makefile.am: Don't link against libgnomecanvaspixbuf.la
2000-01-16 Federico Mena Quintero <federico@helixcode.com>
@@ -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 <otaylor@redhat.com>
* 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 <crichton@gimp.org>
- * 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 <sopwith@redhat.com>
@@ -104,7 +112,7 @@
2000-01-05 Owen Taylor <otaylor@redhat.com>
* 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 <jrb@redhat.com>
* doc/tmpl/animation.sgml: Documentation changes.
diff --git a/gdk-pixbuf/gdk-pixbuf-animation.c b/gdk-pixbuf/gdk-pixbuf-animation.c
index 5e9e0d17e..0577a97c4 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 fab12f2e3..792f04b74 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 097c25644..ad94e445c 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 */