… | |
… | |
37 | EV, so normally nothing else is required. |
37 | EV, so normally nothing else is required. |
38 | |
38 | |
39 | =item * There will be no g_main_loop or gtk_main loop available. |
39 | =item * There will be no g_main_loop or gtk_main loop available. |
40 | |
40 | |
41 | The EV event loop is not the gtk+ main loop. That means that things like |
41 | The EV event loop is not the gtk+ main loop. That means that things like |
42 | C<gtk_main_quit> will not work at all. |
42 | C<gtk_main_quit> will not work at all, as there is no glib mainloop. You |
|
|
43 | I<have> to use EV's equivalents, i.e. C<EV::unloop>. |
43 | |
44 | |
44 | =item * You cannot call any glib loop functions while its context is active. |
45 | =item * You cannot call any glib loop functions while its context is active. |
45 | |
46 | |
46 | This module uses a prepare watcher at lowest priority to dispatch glib |
47 | This module uses a prepare watcher at lowest priority to dispatch glib |
47 | events and activate the main context. The context will be deactivates in a |
48 | events and activate the main context. The context will be deactivates in a |
… | |
… | |
49 | |
50 | |
50 | That means that glib events will be dispatched with lowest priority, and |
51 | That means that glib events will be dispatched with lowest priority, and |
51 | that you cannot call any glib main functions (or functions calling it) on |
52 | that you cannot call any glib main functions (or functions calling it) on |
52 | the default mainloop in highest-priority watchers and in lowest-priority |
53 | the default mainloop in highest-priority watchers and in lowest-priority |
53 | prepare watchers. |
54 | prepare watchers. |
|
|
55 | |
|
|
56 | =item * EV::Glib watchers will (currently) keep the mainloop alive. |
|
|
57 | |
|
|
58 | That means that, after loading this module, C<EV::loop> calls will never |
|
|
59 | return unless you call C<EV::unloop> explicitly. Future versions might fix |
|
|
60 | this problem so that Glib keeps the EV loop alive only when it has active |
|
|
61 | events waiting. |
54 | |
62 | |
55 | =cut |
63 | =cut |
56 | |
64 | |
57 | package EV::Glib; |
65 | package EV::Glib; |
58 | |
66 | |