in reply to Re^3: Can GTK3 be driven externally?
in thread Can GTK3 be driven externally?
use Gtk3; my $window = Gtk3::Window->new ('toplevel'); my $button = Gtk3::Button->new ('Quit'); $button->signal_connect (clicked => sub { Gtk3::main_quit }); $window->add ($button); $window->show_all; my $id = Gtk3->timeout_add(1000, \&handler, $data); Gtk3::main; sub handler { my ($data) = @_; print "timed out ... \n"; # return 1 if you want the handler to be called again later # return 0 to stop the handler from being called again return 1; } result: perl test0.pl Segmentation fault (core dumped)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Can GTK3 be driven externally?
by Anonymous Monk on Feb 05, 2020 at 23:15 UTC | |
Hi Well, i only have gtk2 and I got
Checking around my harddisk i see
So this is what finally works, you should try swapping Gtk2/Gtk3 and see if it works for you :)
https://grep.metacpan.org/search?qd=Gtk2&source=metacpan&q=Timeout https://metacpan.org/source/XAOC/Gtk2-1.24993/examples/timeouttest.pl https://metacpan.org/pod/Gtk3#Porting-from-Gtk2-to-Gtk3 https://wiki.gnome.org/Projects/GTK-Perl/Recipes | [reply] [d/l] [select] |
by holandes777 (Scribe) on Feb 08, 2020 at 21:03 UTC | |
| [reply] |
|
Re^5: Can GTK3 be driven externally?
by Anonymous Monk on Feb 05, 2020 at 00:50 UTC | |
Hi What do you get for
| [reply] [d/l] |
by holandes777 (Scribe) on Feb 05, 2020 at 15:20 UTC | |
| [reply] [d/l] |