Problem using idle_add method

I am porting a Gtk application to Gtk2 and I am having trouble with porting the idle_add method.

The Gtk->idle_add method is used to execute code whenever the Gtk toolkit is not busy handling other events.

I noticed that the idle_add method has been deprecated in Gtk2 in favor of the corresponding Glib functions. Hence, I cannot make a call such as

Gtk2->idle_add(\&callback_function, $data);

However whenever I use "Glib->idle_add(\&callback_function, $data)" instead, I get the following output error:

Can't locate auto/Gtk2/ in @INC ...

The Gtk2 and Glib modules paths are located in my @INC array, and are able to call other methods in Gtk2 and Glib properly.

I was wondering if I am using the function wrong, or if Gtk2 uses another approach to deal with Idle events?

Also, I am currently using Gtk+2.0, glib-2.2.3, and the Gtk2-Perl (Glib-1.022 and Gtk2-1.023) modules.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]