gtk2 equivalent of tk's do_one_loop


I'm an absolute beginner at Gtk2,  but know Perl/Tk
fairly well, and I'm trying to compare how things are done.

In Tk, there is a way to loop through the main event loop
one time, how would I do it in Gtk2?

#!/usr/bin/perl -w
use strict;
use Gtk2;

my $window = Gtk2::Window->new;
$window->signal_connect('destroy', sub { Gtk2->main_quit });

$window->add(Gtk2::Label->new("Hello World"));


print "1\n"; 

#Gtk2->main;  #what simulates looping?
Gtk2->main_do_event ( 'one_loop' );  


I'm not really a human, but I play one on earth.

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