Gtk-Perl
view release on metacpan or search on metacpan
Gnome/samples/lamp.pl view on Meta::CPAN
$h = new Gtk::HBox 0, 0;
$lamp1 = new Gnome::Lamp;
show $lamp1;
$h->pack_start($lamp1, 1, 1, 0);
show $h;
$lamp2 = new Gnome::Lamp;
$lamp2->set_type('busy');
show $lamp2;
$h->pack_start($lamp2, 1, 1, 0);
$lamp3 = new Gnome::Lamp;
$lamp3->set_sequence("RGBYAP");
show $lamp3;
$h->pack_start($lamp3, 1, 1, 0);
Gtk/cookbook.pod view on Meta::CPAN
Gtk->timeout_remove($id);
where C<$id> is the value returned by the C<Gtk-E<gt>timeout_add()> call.
Note that the first value to the C<Gtk-E<gt>timeout_add()> call is the timeout in
milliseconds.
=item * Idle events
To execute code whenever the toolkit is not busy handling other events.
sub handler {
my ($data) = @_;
# do something here ...
# return 1 if you want the handler to be called again
# return 0 to stop the handler from being called again
return 0;
}
my $data = "yadda";
# execute handler when there aren't other events to service
Gtk/xs/Gtk.xs view on Meta::CPAN
g_source_remove(tag);
#DESC: Remove a timeout handler identified by tag.
void
timeout_remove(Class, tag)
int tag
CODE:
gtk_timeout_remove(tag);
#DESC: Add an idle handler (a function that gets called when the main loop
#is not busy servicing toolkit events).
#handler is called with the additional arguments as parameters.
#RETURNS: An integer that identifies the handler
#(for use in Gtk::idle_remove)..
#ARG: $handler subroutine (generic subroutine)
#ARG: ... list (additional args for $handler)
#SEEALSO: Gtk::idle_remove, Gtk::timeout_remove, Gtk::timeout_add, Gtk::idle_add_priority
int
idle_add(Class, handler, ...)
SV * Class
SV * handler
Gtk/xs/Gtk.xs view on Meta::CPAN
PackCallbackST(args, 1);
RETVAL = gtk_idle_add_full(GTK_PRIORITY_DEFAULT, NULL,
pgtk_generic_handler, (gpointer)args, pgtk_destroy_handler);
}
OUTPUT:
RETVAL
#DESC: Add an idle handler (a function that gets called when the main loop
#is not busy servicing toolkit events).
#handler is called with the additional arguments as parameters.
#The lower the value of priority, the highter the priority of the handler.
#RETURNS: An integer that identifies the handler
#(for use in Gtk::idle_remove)..
#ARG: $handler subroutine (generic subroutine)
#ARG: ... list (additional args for $handler)
#SEEALSO: Gtk::idle_remove, Gtk::timeout_remove, Gtk::timeout_add
int
idle_add_priority (Class, priority, handler, ...)
SV * Class
( run in 0.275 second using v1.01-cache-2.11-cpan-87723dcf8b7 )