New 1.19 API: elm.Progressbar.is_pulsing

with a stipid test
This commit is contained in:
Davide Andreoli 2017-02-26 10:30:29 +01:00
parent 6f92607ba4
commit 9231e530bf
3 changed files with 19 additions and 0 deletions

View File

@ -75,6 +75,20 @@ cdef class Progressbar(LayoutClass):
"""
elm_progressbar_pulse(self.obj, state)
property is_pulsing:
""" Get the pulsing state on a given progressbar widget.
:type: bool (**readonly**)
.. versionadded:: 1.19
"""
def __get__(self):
return bool(elm_progressbar_is_pulsing_get(self.obj))
def is_pulsing_get(self):
return bool(elm_progressbar_is_pulsing_get(self.obj))
property value:
"""The progress value (in percentage) on a given progress bar widget.

View File

@ -15,3 +15,4 @@ cdef extern from "Elementary.h":
Eina_Bool elm_progressbar_horizontal_get(const Evas_Object *obj)
void elm_progressbar_inverted_set(Evas_Object *obj, Eina_Bool inverted)
Eina_Bool elm_progressbar_inverted_get(const Evas_Object *obj)
Eina_Bool elm_progressbar_is_pulsing_get(const Evas_Object *obj)

View File

@ -42,7 +42,9 @@ def pb_timer_cb(pb1, pb2, pb3, pb4, pb5, pb6, pb7, pb8):
def begin_test(obj, *args, **kwargs):
(pb1, pb2, pb3, pb4, pb5, pb6, pb7, pb8) = args
print("Pbar 2 is_pulsing: %s" % (pb2.is_pulsing))
pb2.pulse(True)
print("Pbar 2 is_pulsing: %s" % (pb2.is_pulsing))
pb5.pulse(True)
pb7.pulse(True)
global my_progressbar_run
@ -52,7 +54,9 @@ def begin_test(obj, *args, **kwargs):
my_progressbar_run = True
def end_test(obj, pb1, pb2, pb3, pb4, pb5, pb6, pb7, pb8):
print("Pbar 2 is_pulsing: %s" % (pb2.is_pulsing))
pb2.pulse(False)
print("Pbar 2 is_pulsing: %s" % (pb2.is_pulsing))
pb5.pulse(False)
pb7.pulse(False)
global my_progressbar_run