-
-
05 May 2020 16:26:44 UTC
- Distribution: IO-Async-Loop-Glib
- Module version: 0.22
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (5)
- Testers (243 / 6 / 0)
- Kwalitee
Bus factor: 1- % Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (14.5KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Glib
- IO::Async::Loop
- Time::HiRes
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
IO::Async::Loop::Glib
- useIO::Async
with Glib or GTKSYNOPSIS
use IO::Async::Loop::Glib; my $loop = IO::Async::Loop::Glib->new(); $loop->add( ... ); ... # Rest of GLib/Gtk program that uses GLib Glib::MainLoop->new->run();
Or
$loop->run;
Or
while(1) { $loop->loop_once(); }
DESCRIPTION
This subclass of
IO::Async::Loop
uses theGlib::MainLoop
to perform read-ready and write-ready tests.The appropriate
Glib::IO
sources are added or removed from theGlib::MainLoop
when notifiers are added or removed from the set, or when they change theirwant_writeready
status. The callbacks are called automatically by Glib itself; no special methods on this loop object are required.CONSTRUCTOR
new
$loop = IO::Async::Loop::Glib->new()
This function returns a new instance of a
IO::Async::Loop::Glib
object. It takes no special arguments.METHODS
There are no special methods in this subclass, other than those provided by the
IO::Async::Loop
base class.loop_once
$loop->loop_once( $timeout )
This method calls the
iteration()
method on the underlyingGlib::MainContext
. If a timeout value is supplied, then a Glib timeout will be installed, to interrupt the loop at that time. If Glib indicates that any callbacks were fired, then this method will return 1 (however, it does not mean that anyIO::Async
callbacks were invoked, as there may be other parts of code sharing the Glib main context. Otherwise, it will return 0.SEE ALSO
Glib - Perl wrappers for the GLib utility and Object libraries
Gtk2 - Perl interface to the 2.x series of the Gimp Toolkit library
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>
Module Install Instructions
To install IO::Async::Loop::Glib, copy and paste the appropriate command in to your terminal.
cpanm IO::Async::Loop::Glib
perl -MCPAN -e shell install IO::Async::Loop::Glib
For more information on module installation, please visit the detailed CPAN module installation guide.