GtkSharp/glue/type.c
Vladimir Vukicevic 58f6f01d45 * glib/Object.cs: add needs_ref boolean that controls whether
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
2002-11-10 10:09:05 +00:00

39 lines
540 B
C

/* type.c : GType utilities
*
* Author: Mike Kestner <mkestner@speakeasy.net>
*
* <c> 2002 Mike Kestner
*/
#include <glib-object.h>
gchar *
gtksharp_get_type_name (GObject *obj)
{
return G_OBJECT_TYPE_NAME (obj);
}
gboolean
gtksharp_is_object (gpointer obj)
{
return G_IS_OBJECT (obj);
}
GType
gtksharp_get_type_id (GObject *obj)
{
return G_TYPE_FROM_INSTANCE (obj);
}
GType
gtksharp_get_parent_type (GType typ)
{
return g_type_parent (typ);
}
gchar *
gtksharp_get_type_name_for_id (GType typ)
{
return g_type_name (typ);
}