summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavemds <dave@gurumeditation.it>2014-05-02 20:26:36 +0200
committerdavemds <dave@gurumeditation.it>2014-05-02 20:26:36 +0200
commitbc322297563764c0d09f1cbc81a988d0a34268dd (patch)
tree3bbdebe91f71a07da504e564971c07e2ebc980df
parent10d3b696c4d38616df0c53276390e401a0fc8965 (diff)
New item,focused/unfocused signals for the Popup widget
-rw-r--r--efl/elementary/popup.pyx30
1 files changed, 29 insertions, 1 deletions
diff --git a/efl/elementary/popup.pyx b/efl/elementary/popup.pyx
index 8170824..169209b 100644
--- a/efl/elementary/popup.pyx
+++ b/efl/elementary/popup.pyx
@@ -84,6 +84,8 @@ Signals that you can add callbacks for are:
84- ``focused`` - When the popup has received focus. (since 1.8) 84- ``focused`` - When the popup has received focus. (since 1.8)
85- ``unfocused`` - When the popup has lost focus. (since 1.8) 85- ``unfocused`` - When the popup has lost focus. (since 1.8)
86- ``language,changed`` - the program's language changed (since 1.8) 86- ``language,changed`` - the program's language changed (since 1.8)
87- ``item,focused`` - the popup item has received focus. (since 1.10)
88- ``item,unfocused`` - the popup item has lost focus. (since 1.10)
87 89
88Styles available for Popup 90Styles available for Popup
89 91
@@ -186,7 +188,7 @@ from efl.eo cimport _object_mapping_register, PY_REFCOUNT
186from efl.evas cimport Object as evasObject 188from efl.evas cimport Object as evasObject
187from layout_class cimport LayoutClass 189from layout_class cimport LayoutClass
188from object_item cimport _object_item_callback, _object_item_callback2, \ 190from object_item cimport _object_item_callback, _object_item_callback2, \
189 ObjectItem 191 ObjectItem, _object_item_to_python
190 192
191cimport enums 193cimport enums
192 194
@@ -206,6 +208,11 @@ ELM_WRAP_CHAR = enums.ELM_WRAP_CHAR
206ELM_WRAP_WORD = enums.ELM_WRAP_WORD 208ELM_WRAP_WORD = enums.ELM_WRAP_WORD
207ELM_WRAP_MIXED = enums.ELM_WRAP_MIXED 209ELM_WRAP_MIXED = enums.ELM_WRAP_MIXED
208 210
211
212def _cb_object_item_conv(uintptr_t addr):
213 cdef Elm_Object_Item *it = <Elm_Object_Item *>addr
214 return _object_item_to_python(it)
215
209cdef class PopupItem(ObjectItem): 216cdef class PopupItem(ObjectItem):
210 217
211 """ 218 """
@@ -435,5 +442,26 @@ cdef class Popup(LayoutClass):
435 def callback_language_changed_del(self, func): 442 def callback_language_changed_del(self, func):
436 self._callback_del("language,changed", func) 443 self._callback_del("language,changed", func)
437 444
445 def callback_item_focused_add(self, func, *args, **kwargs):
446 """When the popup item has received focus.
447
448 .. versionadded:: 1.10
449
450 """
451 self._callback_add_full("item,focused", _cb_object_item_conv, func, *args, **kwargs)
452
453 def callback_item_focused_del(self, func):
454 self._callback_del_full("item,focused", _cb_object_item_conv, func)
455
456 def callback_item_unfocused_add(self, func, *args, **kwargs):
457 """When the popup item has lost focus.
458
459 .. versionadded:: 1.10
460
461 """
462 self._callback_add_full("item,unfocused", _cb_object_item_conv, func, *args, **kwargs)
463
464 def callback_item_unfocused_del(self, func):
465 self._callback_del_full("item,unfocused", _cb_object_item_conv, func)
438 466
439_object_mapping_register("Elm_Popup", Popup) 467_object_mapping_register("Elm_Popup", Popup)