Enlightenment CVS committal
Author : barbieri
Project : e17
Module : proto/python-efl
Dir : e17/proto/python-efl/python-evas/evas
Modified Files:
utils.py
Added Files:
debug.py
Log Message:
Utils:
- add support for "del" event.
- functions to disconnect observers/callbacks
Debug:
- DebugObserver: log information after every object event, these selectable
using object attributes.
- VisualDebug: smart object to provide visual debug of objects, much like
edje_editor's interface: red for top-left, blue for bottom-right. This is
really helpful!
===================================================================
RCS file: /cvs/e/e17/proto/python-efl/python-evas/evas/utils.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- utils.py 28 Sep 2007 18:06:26 -0000 1.2
+++ utils.py 22 Oct 2007 00:55:08 -0000 1.3
@@ -6,6 +6,7 @@
"mouse_move",
"mouse_wheel",
"free",
+ "del",
"key_down",
"key_up",
"focus_in",
@@ -43,6 +44,15 @@
setter(cb)
+def disconnect_observer(evas, observer):
+ """Disconnect observer connected using connect_observer()"""
+ for cb_name in __callbacks:
+ cb = __get_callback(observer, cb_name)
+ if cb:
+ unsetter = getattr(evas, "on_%s_del" % cb_name)
+ unsetter(cb)
+
+
def connect_callbacks_by_name(evas, mapping):
"""Connect callbacks specified in mapping to Evas callbacks.
@@ -59,3 +69,14 @@
except AttributeError, e:
raise ValueError("invalid callback name: %s" % name)
setter(func)
+
+def disconnect_callbacks_by_name(evas, mapping):
+ """Disconnect callbacks specified in mapping to Evas callbacks."""
+ if isinstance(mapping, dict):
+ mapping = mapping.iteritems()
+ for name, func in mapping:
+ try:
+ unsetter = getattr(evas, "on_%s_del" % name)
+ except AttributeError, e:
+ raise ValueError("invalid callback name: %s" % name)
+ unsetter(func)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs