[Gtk-sharp-list] GLib.Idle.Add and parameters

Iain McCoy iain@mccoy.id.au
Sun, 14 Mar 2004 21:10:01 +1100

Hey folks,

I was just chatting with a fellow on IRC going by the name of neofeed,
and he asked if idle handlers could have parameters passed to them. I
know this is possible in C:
guint g_idle_add (GSourceFunc function, gpointer data);

But in gtk#, public static uint Add (IdleHandler hndlr) - nowhere for a
parameter to go. IdleHandler doesn't take any arguments.

I'm wondering why this is. gtk-sharp/glib/Idle.cs just passes
IntPtr.Zero to the underlying function. Is there some technical reason
that I am missing as to why this can't be done?

Of course, this will all be moot once we have anonymous delegates - but
I'm curious as to why this is how it is.

Iain McCoy <iain@mccoy.id.au>