diff --git a/ChangeLog b/ChangeLog index a9e8aab82..4eb9b8489 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-10-25 Mike Kestner + + * glib/Object.cs : Added Get|SetProperty methods for Object + properties. + 2001-10-25 Mike Kestner * codegen/get-props-from-source.pl : Temporary (possibly) defs diff --git a/glib/Object.cs b/glib/Object.cs index 9534627ae..23ce463a2 100644 --- a/glib/Object.cs +++ b/glib/Object.cs @@ -200,6 +200,23 @@ namespace GLib { out val, new IntPtr (0)); } + /// + /// GetProperty Method + /// + /// + /// + /// Accesses an Object Property. + /// + + public void GetProperty (String name, out GLib.Object val) + { + IntPtr obj; + g_object_get (RawObject, + Marshal.StringToHGlobalAnsi (name), + out obj, new IntPtr (0)); + val = GLib.Object.GetObject (obj); + } + /// /// SetProperty Method /// @@ -261,6 +278,22 @@ namespace GLib { val, new IntPtr (0)); } + /// + /// SetProperty Method + /// + /// + /// + /// Changes the value of an Object Property. + /// + + public void SetProperty (String name, GLib.Object val) + { + g_object_set (RawObject, + Marshal.StringToHGlobalAnsi (name), + val.Handle, new IntPtr (0)); + } + + /* [DllImport("gtk-1.3.dll")] static extern void g_object_set_data_full (