ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV-Glib/Glib.pm
(Generate patch)

Comparing EV-Glib/Glib.pm (file contents):
Revision 1.1 by root, Sat Dec 8 02:49:42 2007 UTC vs.
Revision 1.5 by root, Sat Dec 8 15:13:39 2007 UTC

6 6
7 use Glib::EV; 7 use Glib::EV;
8 8
9=head1 DESCRIPTION 9=head1 DESCRIPTION
10 10
11If you want to use EV in a glib/gtk+ program, then you need to look at 11If you want to use EV in a Glib/Gtk+ program, then you need to look at
12the Glib::EV module, not this one, as this module requires you to run EV 12the Glib::EV module, not this one, as this module requires you to run EV
13in your main program. 13in your main program.
14 14
15If you want to use glib/gtk+ in an EV program, you are at the right place 15If you want to use Glib/Gtk+ in an EV program, you are at the right place
16here. 16here.
17 17
18This module embed the glib main loop into EV, that is, EV will also handle 18This module embeds the Glib main loop into EV, that is, EV will also handle
19Glib events. 19Glib events.
20 20
21This makes Glib compatible to EV. Calls into the EV main loop are more 21This makes Glib compatible to EV. Calls into the EV main loop are more
22or less equivalent to calls to Glib::MainLoop (but not vice versa, you 22or less equivalent to calls to Glib::MainLoop (but not vice versa, you
23I<have> to use the EV loop functions). 23I<have> to use the EV loop functions).
33 33
34=item * The default context will be added to EV when the module is loaded. 34=item * The default context will be added to EV when the module is loaded.
35 35
36Loading this module will automatically integrate the default context into 36Loading this module will automatically integrate the default context into
37EV, so normally nothing else is required. 37EV, so normally nothing else is required.
38
39=item * There will be no g_main_loop or gtk_main loop available.
40
41The EV event loop is not the gtk+ main loop. That means that things like
42C<gtk_main_quit> will not work at all, as there is no glib mainloop. You
43I<have> to use EV's equivalents, i.e. C<EV::unloop>.
44
45=item * You cannot call any glib loop functions while its context is active.
46
47This module uses a prepare watcher at lowest priority to dispatch glib
48events and activate the main context. The context will be deactivates in a
49check watcher of highest priority.
50
51That means that glib events will be dispatched with lowest priority, and
52that you cannot call any glib main functions (or functions calling it) on
53the default mainloop in highest-priority watchers and in lowest-priority
54prepare watchers.
55
56=item * EV::Glib watchers will (currently) keep the mainloop alive.
57
58That means that, after loading this module, C<EV::loop> calls will never
59return unless you call C<EV::unloop> explicitly. Future versions might fix
60this problem so that Glib keeps the EV loop alive only when it has active
61events waiting.
38 62
39=cut 63=cut
40 64
41package EV::Glib; 65package EV::Glib;
42 66

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines