summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2015-04-12 12:49:43 +0200
committerDave Andreoli <dave@gurumeditation.it>2015-04-12 12:49:43 +0200
commit6fbe0ba320cda32a47201a5f152bfbff5af39002 (patch)
treed2d614b69044550be40345f5afecf510261836aa
parent0190d16c05df5ef48351fadf9a294601aa082bf6 (diff)
New 1.14 function: Elm.Transit.go_in()
with test
-rw-r--r--efl/elementary/transit.pxd1
-rw-r--r--efl/elementary/transit.pyx10
-rw-r--r--examples/elementary/test_transit.py6
3 files changed, 14 insertions, 3 deletions
diff --git a/efl/elementary/transit.pxd b/efl/elementary/transit.pxd
index 4e40a5b..3866b8a 100644
--- a/efl/elementary/transit.pxd
+++ b/efl/elementary/transit.pxd
@@ -67,6 +67,7 @@ cdef extern from "Elementary.h":
67 void elm_transit_duration_set(Elm_Transit *transit, double duration) 67 void elm_transit_duration_set(Elm_Transit *transit, double duration)
68 double elm_transit_duration_get(Elm_Transit *transit) 68 double elm_transit_duration_get(Elm_Transit *transit)
69 void elm_transit_go(Elm_Transit *transit) 69 void elm_transit_go(Elm_Transit *transit)
70 void elm_transit_go_in(Elm_Transit *transit, double seconds)
70 void elm_transit_paused_set(Elm_Transit *transit, Eina_Bool paused) 71 void elm_transit_paused_set(Elm_Transit *transit, Eina_Bool paused)
71 Eina_Bool elm_transit_paused_get(Elm_Transit *transit) 72 Eina_Bool elm_transit_paused_get(Elm_Transit *transit)
72 double elm_transit_progress_value_get(Elm_Transit *transit) 73 double elm_transit_progress_value_get(Elm_Transit *transit)
diff --git a/efl/elementary/transit.pyx b/efl/elementary/transit.pyx
index d71be84..0cd6035 100644
--- a/efl/elementary/transit.pyx
+++ b/efl/elementary/transit.pyx
@@ -618,6 +618,16 @@ cdef class Transit(object):
618 """ 618 """
619 elm_transit_go(self.obj) 619 elm_transit_go(self.obj)
620 620
621 def go_in(self, seconds):
622 """Starts the transition in given seconds.
623
624 :param float seconds: The interval value in seconds
625
626 .. versionadded:: 1.14
627
628 """
629 elm_transit_go_in(self.obj, seconds)
630
621 property paused: 631 property paused:
622 """Pause/Resume the transition. 632 """Pause/Resume the transition.
623 633
diff --git a/examples/elementary/test_transit.py b/examples/elementary/test_transit.py
index 7a0bfca..86709d7 100644
--- a/examples/elementary/test_transit.py
+++ b/examples/elementary/test_transit.py
@@ -69,8 +69,8 @@ def transit_wipe(obj):
69 trans.effect_wipe_add(ELM_TRANSIT_EFFECT_WIPE_TYPE_HIDE, 69 trans.effect_wipe_add(ELM_TRANSIT_EFFECT_WIPE_TYPE_HIDE,
70 ELM_TRANSIT_EFFECT_WIPE_DIR_RIGHT) 70 ELM_TRANSIT_EFFECT_WIPE_DIR_RIGHT)
71 71
72 trans.duration = 5.0 72 trans.duration = 2.0
73 trans.go() 73 trans.go_in(3.0)
74 74
75def transit_del_cb(transit, *args, **kwargs): 75def transit_del_cb(transit, *args, **kwargs):
76 obj = args[0] 76 obj = args[0]
@@ -182,7 +182,7 @@ def transit_clicked(obj, item=None):
182 bt.show() 182 bt.show()
183 bt.callback_clicked_add(transit_rotation_color) 183 bt.callback_clicked_add(transit_rotation_color)
184 184
185 bt = Button(win, text="Wipe Effect", size_hint_weight=EXPAND_BOTH) 185 bt = Button(win, text="Wipe Effect (in 3 sec)", size_hint_weight=EXPAND_BOTH)
186 bx.pack_end(bt) 186 bx.pack_end(bt)
187 bt.show() 187 bt.show()
188 bt.callback_clicked_add(transit_wipe) 188 bt.callback_clicked_add(transit_wipe)