mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-25 16:15:39 +00:00
58f6f01d45
we need to ref this object once we have a pointer to it or not. By default this is set to true -- constructors and other functions where we do own the object need to set this to false before setting the "Raw" property. Also added Unref and RefCount methods. * glue/object.c, glue/type.c: some utility functions for refcounting support * gdk/Pixbuf.custom: manually wrap a few functions so that the refcount ends up being correct at the end (need an extra Unref) * api/gdk-api.xml, sources/Gdk.metadata: metadata updates for hiding manually-wrapped Pixbuf stuff svn path=/trunk/gtk-sharp/; revision=8913
29 lines
475 B
C
29 lines
475 B
C
/* object.c : Glue to clean up GtkObject references.
|
|
*
|
|
* Author: Mike Kestner <mkestner@speakeasy.net>
|
|
*
|
|
* <c> 2002 Mike Kestner
|
|
*/
|
|
|
|
#include <glib-object.h>
|
|
#include <gtk/gtkobject.h>
|
|
|
|
void
|
|
gtksharp_object_unref_if_floating (GObject *obj)
|
|
{
|
|
if (GTK_OBJECT_FLOATING (obj))
|
|
g_object_unref (obj);
|
|
}
|
|
|
|
gboolean
|
|
gtksharp_object_is_floating (GObject *obj)
|
|
{
|
|
return GTK_OBJECT_FLOATING (obj);
|
|
}
|
|
|
|
int
|
|
gtksharp_object_get_ref_count (GObject *obj)
|
|
{
|
|
return obj->ref_count;
|
|
}
|