Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Glib::Event
Coerce Glib into using the Event module as event loop.

Glib::Event - Coerce Glib into using the Event module as event loop.


NAME

Glib::Event - Coerce Glib into using the Event module as event loop.


SYNOPSIS


 use Glib::Event;

 # example with Gtk2:

 use Gtk2 -init;

 use Glib::Event;

 use Event; # any order

 Event->timer (after => 1, interval => 1, cb => sub { print "I am here!\n" });

 main Gtk2;

 # etc., it just works

 # You can even move the glib mainloop into a coroutine:

 use Gtk2 -init;

 use Coro;

 use Coro::Event;

 use Glib::Event;

 async { main Gtk2 };

 # ... do other things


DESCRIPTION

This module coerces the Glib event loop to use the Event module as underlying event loop, i.e. Event will be used by Glib for all events.

This makes Glib compatible to Event. Calls into the Glib main loop are more or less equivalent to calls to Event::loop.


BUGS


  * No documented API to patch other main contexts.

  * Uses one_event, which is inefficient.


SEE ALSO

Event, Glib, the Glib::MainLoop manpage.


AUTHOR


 Marc Lehmann <schmorp@schmorp.de>

 http://home.schmorp.de/
Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy