[Mono-list] How to call GTK functions from class libraries?

Miguel de Icaza miguel@ximian.com
20 Feb 2003 14:12:18 -0500


Hello,

> I was hoping to use the GdkPixBuf functions to implement
> System.Drawing.Bitmap. However, it appears that the runtime
> does not use GTK. Is it safe to use GTK functions in the
> class libraries? Will libraries like libgdk_pixbuf.so be
> included in the distribution? If so, it would sure make
> my life a lot easier, otherwise I have to reimplement all
> of it's functionality.

You can use GdkPixbuf.  We can just make this a dependency for people
who want to use the Windows.Forms code.

The gtk_init call is only required if you will use the
render-to-Xdrawable functionality in GdkPixbuf (a tiny portion of it). 
Non-Gtk implementations can still use the GdkPixbuf for loading,
transformations, compositions, and use their own render-to-screen
routines (which are pretty simple, btw)

Miguel.