… | |
… | |
22 | async { main Gtk2 }; |
22 | async { main Gtk2 }; |
23 | # ... do other things |
23 | # ... do other things |
24 | |
24 | |
25 | =head1 DESCRIPTION |
25 | =head1 DESCRIPTION |
26 | |
26 | |
|
|
27 | If you want to use glib/gtk+ in an EV program, then you need to look at |
|
|
28 | the EV::Glib module, not this one, as this module requires you to run a |
|
|
29 | Glib or Gtk+ main loop in your program. |
|
|
30 | |
|
|
31 | If you want to use EV in an Glib/Gtk+ program, you are at the right place |
|
|
32 | here. |
|
|
33 | |
27 | This module coerces the Glib event loop to use the EV high performance |
34 | This module coerces the Glib event loop to use the EV high performance |
28 | event loop as underlying event loop, i.e. EV will be used by Glib for all |
35 | event loop as underlying event loop, i.e. EV will be used by Glib for all |
29 | events. |
36 | events. |
30 | |
37 | |
31 | This makes Glib compatible to EV. Calls into the Glib main loop are more |
38 | This makes Glib compatible to EV. Calls into the Glib main loop are more |
… | |
… | |
36 | |
43 | |
37 | =item * The Glib perl module is not used. |
44 | =item * The Glib perl module is not used. |
38 | |
45 | |
39 | This module has no dependency on the existing Glib perl interface, as it |
46 | This module has no dependency on the existing Glib perl interface, as it |
40 | uses glib directly. The Glib module can, however, be used without any |
47 | uses glib directly. The Glib module can, however, be used without any |
41 | problems (as long as evereybody uses shared libraries to keep everybody |
48 | problems (as long as everybody uses shared libraries to keep everybody |
42 | else happy). |
49 | else happy). |
43 | |
50 | |
44 | =item * The default context will be changed when the module is loaded. |
51 | =item * The default context will be changed when the module is loaded. |
45 | |
52 | |
46 | Loading this module will automatically "patch" the default context of |
53 | Loading this module will automatically "patch" the default context of |
… | |
… | |
60 | use EV (); |
67 | use EV (); |
61 | |
68 | |
62 | our $default_poll_func; |
69 | our $default_poll_func; |
63 | |
70 | |
64 | BEGIN { |
71 | BEGIN { |
65 | $VERSION = '1.0'; |
72 | $VERSION = '2.01'; |
66 | |
73 | |
67 | require XSLoader; |
74 | require XSLoader; |
68 | XSLoader::load (Glib::EV, $VERSION); |
75 | XSLoader::load (Glib::EV, $VERSION); |
69 | |
76 | |
70 | $default_poll_func = install (undef); |
77 | $default_poll_func = install (undef); |