Ryujinx-GtkSharp/gtk/Object.custom
Mike Kestner 67e0164e7d 2003-10-17 Mike Kestner <mkestner@ximian.com>
* gtk/Window.cs : override Raw prop and take a ref, since gtk+
	owns the ref to new Windows, and we need a ref.  [Fixes #47721]

svn path=/trunk/gtk-sharp/; revision=19151
2003-10-17 22:31:46 +00:00

28 lines
787 B
Plaintext
Executable File

// Gtk.Object.custom - Gtk Object class customizations
//
// Author: Mike Kestner <mkestner@speakeasy.net>
//
// (c) 2002-2003 Mike Kestner
//
// This code is inserted after the automatically generated code.
[DllImport("gtksharpglue")]
private static extern bool gtksharp_object_is_floating (IntPtr raw);
[DllImport("libgobject-2.0-0.dll")]
private static extern void g_object_ref (IntPtr raw);
protected override IntPtr Raw {
get {
return base.Raw;
}
set {
base.Raw = value;
if (gtksharp_object_is_floating (value)) {
g_object_ref (value);
Sink ();
}
// System.Diagnostics.Debug.WriteLine ("Gtk.Object:set_Raw: object type is: " + (this as GLib.Object).GType.Name + " refcount now: " + RefCount + " needs_ref: " + needs_ref);
}
}