Closed d47081 closed 4 months ago
To remove timeout you can just return false
btw i'll look deep it
done as https://docs.gtk.org/glib/type_func.Source.remove.html
<?php
Gtk::init();
$count = 0;
$timer = Gtk::timeout_add(1000, function() use (&$count) {
global $timer;
$count++;
echo "OK " . $count . "\n";
if($count >= 3) {
echo "Finish\n";
\Gtk::source_remove($timer);
}
// tell to continue calling
return TRUE;
});
Gtk::main();
I want to reset GTK timeout added using native API, seems that
Gtk::source_remove
not implemented yet?here is an example in Python