Package pyxmpp2 :: Package mainloop :: Module glib :: Class GLibMainLoop
[hide private]

Class GLibMainLoop


Wrapper for the GLib main event loop.
Nested Classes [hide private]

Inherited from interfaces.MainLoop: __metaclass__

Instance Methods [hide private]
 
__init__(self, settings=None, handlers=None)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__del__(self)
 
_add_io_handler(self, handler)
Add an I/O handler to the loop.
 
_configure_io_handler(self, handler)
Register an io-handler with the glib main loop.
 
_io_callback(self, *args, **kwargs)
Called by glib on I/O event.
 
_prepare_io_handler(self, handler)
Call the interfaces.IOHandler.prepare method and remove the handler from unprepared handler list when done.
 
_prepare_pending(self)
Prepare pending handlers.
 
_prepare_io_handler_cb(self, *args, **kwargs)
Timeout callback called to try prepare an IOHandler again.
 
_remove_io_handler(self, handler)
Remove an i/o-handler.
 
_add_timeout_handler(self, handler)
Add a TimeoutHandler to the main loop.
 
_remove_timeout_handler(self, handler)
Remove TimeoutHandler from the main loop.
 
_timeout_cb(self, *args, **kwargs)
Call the timeout handler due.
 
loop(self, timeout=None)
Run the loop.
 
loop_iteration(self, timeout=1)
Single loop iteration.
 
_loop_timeout_cb(self, main_loop)
Stops the loop after the time specified in the loop call.
 
check_events(self)
Call the event dispatcher.

Inherited from base.MainLoopBase: add_handler, quit, remove_handler

Inherited from base.MainLoopBase (private): _call_timeout_handlers

Inherited from interfaces.MainLoop: delayed_call

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from base.MainLoopBase: __abstractmethods__

Properties [hide private]

Inherited from base.MainLoopBase: finished, started

Inherited from object: __class__

Method Details [hide private]

__init__(self, settings=None, handlers=None)
(Constructor)

 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)

_add_io_handler(self, handler)

 
Add an I/O handler to the loop.
Overrides: base.MainLoopBase._add_io_handler

_io_callback(self, *args, **kwargs)

 
Called by glib on I/O event.
Decorators:
  • @hold_exception

_prepare_io_handler_cb(self, *args, **kwargs)

 
Timeout callback called to try prepare an IOHandler again.
Decorators:
  • @hold_exception

_remove_io_handler(self, handler)

 
Remove an i/o-handler.
Overrides: base.MainLoopBase._remove_io_handler

_add_timeout_handler(self, handler)

 
Add a TimeoutHandler to the main loop.
Overrides: base.MainLoopBase._add_timeout_handler

_remove_timeout_handler(self, handler)

 
Remove TimeoutHandler from the main loop.
Overrides: base.MainLoopBase._remove_timeout_handler

_timeout_cb(self, *args, **kwargs)

 
Call the timeout handler due.
Decorators:
  • @hold_exception

loop(self, timeout=None)

 
Run the loop.
Parameters:
  • timeout - time to loop, if not given the method will run until finished
Overrides: interfaces.MainLoop.loop
(inherited documentation)

loop_iteration(self, timeout=1)

 
Single loop iteration.
Parameters:
  • timeout - maximum time (in seconds) to block for
Overrides: interfaces.MainLoop.loop_iteration
(inherited documentation)

check_events(self)

 

Call the event dispatcher.

Quit the main loop when the QUIT event is reached.

Returns:
True if QUIT was reached.
Overrides: base.MainLoopBase.check_events
(inherited documentation)