[Gtk-sharp-list] Using Gdk.Pixbuf without Gtk.Application

Christopher David Howie me at chrishowie.com
Mon May 3 17:04:51 EDT 2010


On 05/03/2010 04:51 PM, kloffy wrote:
> Outside of Mono/.Net Gdk.Pixbuf can be used without referencing the Gtk
> library, as demonstrated in the following 
> http://www.mail-archive.com/gtk-app-devel-list@gnome.org/msg11565.html
> example . (Note the g_type_init(); call.)
> However, I haven't been able use Gdk.Pixbuf without calling
> Gtk.Application.Init(). My guess is that GLib's type system needs to be
> initialized before using Gdk.Pixbuf, but I couldn't find a function in GLib
> that would allow me to do that.

By reading the monodis output over glib-sharp.dll, it looks as though
the GType static constructor calls this function, so just do something
with GType to get the constructor to run.  For example:

var dummy = GType.None;

-- 
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers

PGP key:

pub   2048R/CF8338F5 2010-04-14
      Fingerprint: 2B7A B280 8B12 21CC 260A  DF65 6FCE 505A CF83 38F5


More information about the Gtk-sharp-list mailing list