kuuko pushed a commit to branch master. http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=f7e96cf0afb47618e1785296b0cf904e6aacb9a3
commit f7e96cf0afb47618e1785296b0cf904e6aacb9a3 Author: Kai Huuhko <[email protected]> Date: Mon Aug 29 18:44:35 2016 +0300 Elm.Spinner: Add two missing signals and fix documentation issues --- doc/elementary/spinner.rst | 2 ++ efl/elementary/spinner.pxi | 30 +++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/doc/elementary/spinner.rst b/doc/elementary/spinner.rst index 547260c..3f0d236 100644 --- a/doc/elementary/spinner.rst +++ b/doc/elementary/spinner.rst @@ -31,6 +31,8 @@ Emitted signals the user. This will be called only when the user stops dragging for a very short period or when they release their finger/mouse, so it avoids possibly expensive reactions to the value change. +- ``spinner,drag,start`` - When dragging has started. +- ``spinner,drag,stop`` - When dragging has stopped. Available styles diff --git a/efl/elementary/spinner.pxi b/efl/elementary/spinner.pxi index 47de51a..1c7a32e 100644 --- a/efl/elementary/spinner.pxi +++ b/efl/elementary/spinner.pxi @@ -299,7 +299,7 @@ cdef class Spinner(LayoutClass): Rounding works as follows: - ``rounded_val = base + (double)(((value - base) / round) round)`` + ``rounded_val = base + (double)(((value - base) / round) * round)`` Where rounded_val, value and base are doubles, and round is an integer. @@ -307,11 +307,9 @@ cdef class Spinner(LayoutClass): of "round" starting from the value of this property. The default base for rounding is 0. - Example: round = 3, base = 2 - Values: 3, 6, 9, 12, 15, ... + Example: round = 3, base = 2 Values: ..., -2, 0, 2, 5, 8, 11, 14, ... - Example: round = 2, base = 5.5 - Values: 5.5, 7.5, 9.5, 11.5, ... + Example: round = 2, base = 5.5 Values: ..., -0.5, 1.5, 3.5, 5.5, 7.5, 9.5, 11.5, ... .. seealso:: :py:attr:`round` @@ -367,5 +365,27 @@ cdef class Spinner(LayoutClass): def callback_delay_changed_del(self, func): self._callback_del("delay,changed", func) + def callback_drag_start_add(self, func, *args, **kwargs): + """When dragging has started. + + .. versionadded:: 1.19 + + """ + self._callback_add("spinner,drag,start", func, args, kwargs) + + def callback_drag_start_del(self, func): + self._callback_del("spinner,drag,start", func) + + def callback_drag_stop_add(self, func, *args, **kwargs): + """When dragging has stopped. + + .. versionadded:: 1.19 + + """ + self._callback_add("spinner,drag,stop", func, args, kwargs) + + def callback_drag_stop_del(self, func): + self._callback_del("spinner,drag,stop", func) + _object_mapping_register("Elm_Spinner", Spinner) --
