gtk2/gdk-pixbuf/gdk-pixbuf.c
Mark Crichton 68f895bd68 Massive update...
Massive update...

gdk-pixbuf-io.c: Fixed to compile and run in a very crippled state.

io-bpm.c: Rough start on a WIN/OS2 BMP loader

testpixbuf.c: Really crude test program for gdk-pixbuf

io-gif.c: Fixed some boneheaded uninitalized variables causing the
loader to choke
1999-07-08 16:04:16 +00:00

38 lines
584 B
C

/*
* gdk-pixbuf.c: Resource management.
*
* Author:
* Miguel de Icaza (miguel@gnu.org)
*/
#include <config.h>
#include <glib.h>
#include "gdk-pixbuf.h"
static void
gdk_pixbuf_destroy (GdkPixBuf *pixbuf)
{
art_pixbuf_free (pixbuf->art_pixbuf);
g_free (pixbuf);
}
void
gdk_pixbuf_ref (GdkPixBuf *pixbuf)
{
g_return_if_fail (pixbuf != NULL);
pixbuf->ref_count++;
}
void
gdk_pixbuf_unref (GdkPixBuf *pixbuf)
{
g_return_if_fail (pixbuf != NULL);
g_return_if_fail (pixbuf->ref_count == 0);
pixbuf->ref_count--;
if (pixbuf->ref_count)
gdk_pixbuf_destroy (pixbuf);
}