[Mono-dev] Embedding + GObject Subclasses
Matthew Metnetsky
met at uberstats.com
Thu Sep 3 15:31:51 EDT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Christian Hoff wrote:
>> Suppose I had the following class:
>>
>> class Foo : Gtk.Box
>> {
>> public new int Spacing {
>> Console.WriteLine("HI");
>> return base.Spacing;
>> }
>> }
>>
>> which is compiled into Foo.dll. Is there a way from within a native
>> application to instantiate Foo via it's GType like:
>>
>> GObject * o = g_object_new(FooType, NULL);
>>
> I'm not 100% sure if that works; just give it a try. FooType can only be
> obtained by calling managed code (FooType = (Glib.GType) Foo).
I'm not quite following you here. How are you suggesting I go about
getting FooType within C?
Thanks!
~ Matthew
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkqgGaQACgkQLrcoBjlTBf1IhACffYlTsdQIgX2TYwFdX7QHQVfT
2kAAoI0xoAKa3cWmzLKDcjooZx5yyH+u
=64bC
-----END PGP SIGNATURE-----
More information about the Mono-devel-list
mailing list