summaryrefslogtreecommitdiff
path: root/efl
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2016-01-23 14:33:01 +0100
committerDave Andreoli <dave@gurumeditation.it>2016-01-23 14:33:01 +0100
commit86aa8c51383999a424d58bdc322fe231c53e39ea (patch)
treeadb771ac653f34f25289cb94a2dbaecd1122218a /efl
parent9809eb2739b64b11f0072a353308106dd5a4ece2 (diff)
New 1.17 API: elm.Ctxpopup "geometry,update" smart cb
Diffstat (limited to 'efl')
-rw-r--r--efl/elementary/__init__.pyx6
-rw-r--r--efl/elementary/ctxpopup.pxi11
2 files changed, 16 insertions, 1 deletions
diff --git a/efl/elementary/__init__.pyx b/efl/elementary/__init__.pyx
index b3f7382..69e3df8 100644
--- a/efl/elementary/__init__.pyx
+++ b/efl/elementary/__init__.pyx
@@ -21,7 +21,7 @@ from libc.string cimport memcpy, strdup
21from libc.stdlib cimport malloc, free 21from libc.stdlib cimport malloc, free
22from libc.stdint cimport uintptr_t 22from libc.stdint cimport uintptr_t
23 23
24from efl.evas cimport Object as evasObject 24from efl.evas cimport Object as evasObject, Evas_Coord_Rectangle, Rect
25 25
26from efl.utils.conversions cimport _touni, _ctouni, \ 26from efl.utils.conversions cimport _touni, _ctouni, \
27 python_list_strings_to_eina_list, eina_list_strings_to_python_list 27 python_list_strings_to_eina_list, eina_list_strings_to_python_list
@@ -599,6 +599,10 @@ cdef object _cb_string_conv(void *addr):
599cdef object _cb_object_item_conv(void *addr): 599cdef object _cb_object_item_conv(void *addr):
600 return _object_item_to_python(<Elm_Object_Item *>addr) 600 return _object_item_to_python(<Elm_Object_Item *>addr)
601 601
602cdef object _cb_rectangle_conv(void *addr):
603 cdef Evas_Coord_Rectangle *geom = <Evas_Coord_Rectangle *>addr
604 return Rect(geom.x, geom.y, geom.w, geom.h)
605
602 606
603#include "access.pxi" 607#include "access.pxi"
604include "actionslider.pxi" 608include "actionslider.pxi"
diff --git a/efl/elementary/ctxpopup.pxi b/efl/elementary/ctxpopup.pxi
index 857fa97..5440ea5 100644
--- a/efl/elementary/ctxpopup.pxi
+++ b/efl/elementary/ctxpopup.pxi
@@ -395,5 +395,16 @@ cdef class Ctxpopup(LayoutClass):
395 def callback_dismissed_del(self, func): 395 def callback_dismissed_del(self, func):
396 self._callback_del("dismissed", func) 396 self._callback_del("dismissed", func)
397 397
398 def callback_geometry_update_add(self, func, *args, **kwargs):
399 """the ctxpopup geometry has changed
400
401 .. versionadded:: 1.17
402
403 """
404 self._callback_add_full("geometry,update", _cb_rectangle_conv, func, args, kwargs)
405
406 def callback_geometry_update_del(self, func):
407 self._callback_del_full("geometry,update", _cb_rectangle_conv, func)
408
398 409
399_object_mapping_register("Elm_Ctxpopup", Ctxpopup) 410_object_mapping_register("Elm_Ctxpopup", Ctxpopup)