summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2016-08-29 18:44:35 +0300
committerKai Huuhko <kai.huuhko@gmail.com>2016-08-29 18:44:35 +0300
commitf7e96cf0afb47618e1785296b0cf904e6aacb9a3 (patch)
treef8bb6e32159f3c4fc076133c4d288356487c8964
parent58cfedf5af6be32c9187347528a8b0cbdaafbf91 (diff)
Elm.Spinner: Add two missing signals and fix documentation issues
-rw-r--r--doc/elementary/spinner.rst2
-rw-r--r--efl/elementary/spinner.pxi30
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
31 the user. This will be called only when the user stops dragging 31 the user. This will be called only when the user stops dragging
32 for a very short period or when they release their finger/mouse, 32 for a very short period or when they release their finger/mouse,
33 so it avoids possibly expensive reactions to the value change. 33 so it avoids possibly expensive reactions to the value change.
34- ``spinner,drag,start`` - When dragging has started.
35- ``spinner,drag,stop`` - When dragging has stopped.
34 36
35 37
36Available styles 38Available 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):
299 299
300 Rounding works as follows: 300 Rounding works as follows:
301 301
302 ``rounded_val = base + (double)(((value - base) / round) round)`` 302 ``rounded_val = base + (double)(((value - base) / round) * round)``
303 303
304 Where rounded_val, value and base are doubles, and round is an integer. 304 Where rounded_val, value and base are doubles, and round is an integer.
305 305
@@ -307,11 +307,9 @@ cdef class Spinner(LayoutClass):
307 of "round" starting from the value of this property. The default 307 of "round" starting from the value of this property. The default
308 base for rounding is 0. 308 base for rounding is 0.
309 309
310 Example: round = 3, base = 2 310 Example: round = 3, base = 2 Values: ..., -2, 0, 2, 5, 8, 11, 14, ...
311 Values: 3, 6, 9, 12, 15, ...
312 311
313 Example: round = 2, base = 5.5 312 Example: round = 2, base = 5.5 Values: ..., -0.5, 1.5, 3.5, 5.5, 7.5, 9.5, 11.5, ...
314 Values: 5.5, 7.5, 9.5, 11.5, ...
315 313
316 .. seealso:: :py:attr:`round` 314 .. seealso:: :py:attr:`round`
317 315
@@ -367,5 +365,27 @@ cdef class Spinner(LayoutClass):
367 def callback_delay_changed_del(self, func): 365 def callback_delay_changed_del(self, func):
368 self._callback_del("delay,changed", func) 366 self._callback_del("delay,changed", func)
369 367
368 def callback_drag_start_add(self, func, *args, **kwargs):
369 """When dragging has started.
370
371 .. versionadded:: 1.19
372
373 """
374 self._callback_add("spinner,drag,start", func, args, kwargs)
375
376 def callback_drag_start_del(self, func):
377 self._callback_del("spinner,drag,start", func)
378
379 def callback_drag_stop_add(self, func, *args, **kwargs):
380 """When dragging has stopped.
381
382 .. versionadded:: 1.19
383
384 """
385 self._callback_add("spinner,drag,stop", func, args, kwargs)
386
387 def callback_drag_stop_del(self, func):
388 self._callback_del("spinner,drag,stop", func)
389
370 390
371_object_mapping_register("Elm_Spinner", Spinner) 391_object_mapping_register("Elm_Spinner", Spinner)