File: README

package info (click to toggle)
libio-async-loop-glib-perl 0.22-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 160 kB
  • sloc: perl: 361; makefile: 2
file content (74 lines) | stat: -rw-r--r-- 1,844 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
NAME

    IO::Async::Loop::Glib - use IO::Async with Glib or GTK

SYNOPSIS

       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 the Glib::MainLoop to perform
    read-ready and write-ready tests.

    The appropriate Glib::IO sources are added or removed from the
    Glib::MainLoop when notifiers are added or removed from the set, or
    when they change their want_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 underlying
    Glib::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 any IO::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>