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

J. Perkins jason@379.com
Thu, 20 Feb 2003 14:05:44 -0500

Miguel de Icaza wrote:
> You can use GdkPixbuf.  We can just make this a dependency for people
> who want to use the Windows.Forms code.

Rather, a dependency for anyone who wants to use System.Drawing.Bitmap.
I want to clarify that this is separate from the whole SWF issue. I am
only concerned with the image loading and manipulation, I am not going
to address image display. FWIW, I am using OpenGL/Direct3D for my
visuals, and have no use for SWF.

Does this mean that the gdk libraries will be included in future
versions of Mono? Or will users have to go get them, in addition
to Mono? Just want to make sure I understand before I code anything.

> The gtk_init call is only required if you will use the
> render-to-Xdrawable functionality in GdkPixbuf

I tried P/Invoking gdk_pixbuf_loader_new(), and got errors that
seemed to indicate that gtk_init() was required. I don't remember
the exact error messages, but I did look them up on line and
that was the standard response. I can test this easily enough,
but I am only going to bother with this approach if I know gdk
will be included in the distro.

Thanks for the response. I am looking forward to getting this
beast coded.