2003-10-17 22:31:46 +00:00
|
|
|
// Gtk.Object.custom - Gtk Object class customizations
|
2002-09-04 05:25:58 +00:00
|
|
|
//
|
|
|
|
// Author: Mike Kestner <mkestner@speakeasy.net>
|
|
|
|
//
|
2003-10-17 22:31:46 +00:00
|
|
|
// (c) 2002-2003 Mike Kestner
|
2002-09-04 05:25:58 +00:00
|
|
|
//
|
|
|
|
// This code is inserted after the automatically generated code.
|
|
|
|
|
|
|
|
[DllImport("gtksharpglue")]
|
2002-11-10 10:03:51 +00:00
|
|
|
private static extern bool gtksharp_object_is_floating (IntPtr raw);
|
2002-09-12 05:21:16 +00:00
|
|
|
|
2003-07-23 17:19:21 +00:00
|
|
|
[DllImport("libgobject-2.0-0.dll")]
|
|
|
|
private static extern void g_object_ref (IntPtr raw);
|
|
|
|
|
2002-11-10 10:03:51 +00:00
|
|
|
protected override IntPtr Raw {
|
|
|
|
get {
|
|
|
|
return base.Raw;
|
|
|
|
}
|
|
|
|
set {
|
|
|
|
base.Raw = value;
|
2003-07-23 17:19:21 +00:00
|
|
|
if (gtksharp_object_is_floating (value)) {
|
|
|
|
g_object_ref (value);
|
2002-11-10 10:03:51 +00:00
|
|
|
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);
|
|
|
|
}
|
2002-09-12 05:21:16 +00:00
|
|
|
}
|