From 45622e1d33c86ec10459f35aa37769213a23b544 Mon Sep 17 00:00:00 2001 From: Brad Taylor Date: Fri, 14 Nov 2008 16:21:16 +0000 Subject: [PATCH] 2008-11-14 Brad Taylor * glib/Object.cs: Bind g_object_notify. * doc/en/GLib/Object.xml: Document new API. svn path=/trunk/gtk-sharp/; revision=118864 --- ChangeLog | 6 ++++++ doc/en/GLib/Object.xml | 15 +++++++++++++++ glib/Object.cs | 10 ++++++++++ 3 files changed, 31 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5368e9417..a41e53fe2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-11-14 Brad Taylor + + * glib/Object.cs: Bind g_object_notify. + + * doc/en/GLib/Object.xml: Document new API. + 2008-11-05 Mike Kestner * atk/atk-api-2.12.raw: regen diff --git a/doc/en/GLib/Object.xml b/doc/en/GLib/Object.xml index 0001dd5cf..94a1e4206 100644 --- a/doc/en/GLib/Object.xml +++ b/doc/en/GLib/Object.xml @@ -359,6 +359,21 @@ To be added + + + Method + + System.Void + + + + + + Emits a GObject "notify" signal for the property specified by . + the name of a property on the underlying GObject. + This method is used to notify consumers of the underlying GObject that something about the GObject property specified by has changed. + + Constructor diff --git a/glib/Object.cs b/glib/Object.cs index c92e3400c..c5451ea25 100644 --- a/glib/Object.cs +++ b/glib/Object.cs @@ -576,6 +576,16 @@ namespace GLib { GLib.Marshaller.Free (native_name); } + [DllImport("libgobject-2.0-0.dll")] + static extern void g_object_notify (IntPtr obj, IntPtr property_name); + + protected void Notify (string property_name) + { + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (property_name); + g_object_notify (Handle, native_name); + GLib.Marshaller.Free (native_name); + } + [DllImport("glibsharpglue-2")] static extern void gtksharp_override_virtual_method (IntPtr gtype, IntPtr name, Delegate cb);