Package advene :: Package model :: Module events :: Class WithEventsMixin
[hide private]
[frames] | no frames]

Class WithEventsMixin

source code

object --+
         |
        WithEventsMixin
Known Subclasses:

This mixin class assumes that the mixed-in class will provide a `_make_event_delegate` method returning an instance of the appropriate subclass of EventDelegate.

Instance Methods [hide private]
 
connect(self, detailed_signal, handler, *args)
Connect the given handler to the (optionally detailed) signal.
source code
 
disconnect(self, handler_id)
Disconnect the handler associated to the given handler_id.
source code
 
has_handler(self, handler_id)
Return True iff the given handler_id represents a connected handler.
source code
 
block_handler(self, handler_id)
Prevent the handler identified by handler_id to be invoked until it is unblocked.
source code
 
unblock_handler(self, handler_id)
Unblock the blocked handler identified by handler_id so it can be invoked again.
source code
 
emit(self, detailed_signal, *args)
Cause the object to emit the signal specified by detailed_signal.
source code
 
emit_lazy(self, lazy_params)
Like emit, but lazy_params is assumed to be a function returning an iterable of the params to send to emit.
source code
 
stop_emission(self, detailed_signal)
Stop the current emission of the signal specified by detailed_signal.
source code
 
handler_is_connected(self, handler_id)
Return True iff the given handler_id represents a connected handler.
source code
 
handler_block(self, handler_id)
Prevent the handler identified by handler_id to be invoked until it is unblocked.
source code
 
handler_unblock(self, handler_id)
Unblock the blocked handler identified by handler_id so it can be invoked again.
source code
 
enter_no_event_section(self)
Disable all event emission for this object, until `exit_no_event_section` is called.
source code
 
exit_no_event_section(self)
Re-enables all event emission for this object.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  __event_delegate = None
  __disabling_count = 0
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

connect(self, detailed_signal, handler, *args)

source code 

Connect the given handler to the (optionally detailed) signal. Additional arguments for the handler can be given.

Return the handler_id, which can be used to disconnect the handler.

has_handler(self, handler_id)

source code 

Return True iff the given handler_id represents a connected handler.

NB: this has been renamed from GObject.handler_is_connected to comply with Advene coding style (methode names should start with a verb).

block_handler(self, handler_id)

source code 

Prevent the handler identified by handler_id to be invoked until it is unblocked.

NB: this has been renamed from GObject.handler_block to comply with Advene coding style (methode names should start with a verb).

unblock_handler(self, handler_id)

source code 

Unblock the blocked handler identified by handler_id so it can be invoked again.

NB: this has been renamed from GObject.handler_unblock to comply with Advene coding style (methode names should start with a verb).

emit(self, detailed_signal, *args)

source code 

Cause the object to emit the signal specified by detailed_signal. The additional parameters must match the number and type of the required signal handler parameters.

emit_lazy(self, lazy_params)

source code 

Like emit, but lazy_params is assumed to be a function returning an iterable of the params to send to emit. The rationale is that, since emit does nothing if we have no EventDelegate, the parameters would not be evaluated.

stop_emission(self, detailed_signal)

source code 

Stop the current emission of the signal specified by detailed_signal. Any signal handlers in the list still to be run will not be invoked.

handler_is_connected(self, handler_id)

source code 

Return True iff the given handler_id represents a connected handler.

NB: this has been renamed from GObject.handler_is_connected to comply with Advene coding style (methode names should start with a verb).

handler_block(self, handler_id)

source code 

Prevent the handler identified by handler_id to be invoked until it is unblocked.

NB: this has been renamed from GObject.handler_block to comply with Advene coding style (methode names should start with a verb).

handler_unblock(self, handler_id)

source code 

Unblock the blocked handler identified by handler_id so it can be invoked again.

NB: this has been renamed from GObject.handler_unblock to comply with Advene coding style (methode names should start with a verb).

enter_no_event_section(self)

source code 

Disable all event emission for this object, until `exit_no_event_section` is called.

Not also that a "no event section is a critical section for the object (in the sense of the `advene.util.synchronized` module).

exit_no_event_section(self)

source code 

Re-enables all event emission for this object.

:see-also: `enter_no_event_section`