summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_button_legacy.h
blob: 05760f82dbda7a8bd26f466d79b52f7dbb687373 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/**
 * Add a new button to the parent's canvas
 *
 * @param parent The parent object
 * @return The new object or NULL if it cannot be created
 *
 * @ingroup Elm_Button
 */
EAPI Evas_Object                 *elm_button_add(Evas_Object *parent);

/**
 * @brief The initial timeout before the autorepeat event is generated
 *
 * Sets the timeout, in seconds, since the button is pressed until the first
 * @c repeated signal is emitted. If @c t is 0.0 or less, there won't be any
 * delay and the event will be fired the moment the button is pressed.
 *
 * See also @ref elm_button_autorepeat_set,
 * @ref elm_button_autorepeat_gap_timeout_set.
 *
 * @param[in] t Timeout in seconds
 *
 * @ingroup Elm_Button
 */

EAPI void                        elm_button_autorepeat_initial_timeout_set(Evas_Object *obj, double t);

/**
 * @brief The initial timeout before the autorepeat event is generated
 *
 * Sets the timeout, in seconds, since the button is pressed until the first
 * @c repeated signal is emitted. If @c t is 0.0 or less, there won't be any
 * delay and the event will be fired the moment the button is pressed.
 *
 * See also @ref elm_button_autorepeat_set,
 * @ref elm_button_autorepeat_gap_timeout_set.
 *
 * @return Timeout in seconds
 *
 * @ingroup Elm_Button
 */

EAPI double                      elm_button_autorepeat_initial_timeout_get(const Evas_Object *obj);

/**
 * @brief The interval between each generated autorepeat event
 *
 * After the first @c repeated event is fired, all subsequent ones will follow
 * after a delay of @c t seconds for each.
 *
 * See also @ref elm_button_autorepeat_initial_timeout_set.
 *
 * @param[in] t Interval in seconds
 *
 * @ingroup Elm_Button
 */
EAPI void                        elm_button_autorepeat_gap_timeout_set(Evas_Object *obj, double t);

/**
 * @brief The interval between each generated autorepeat event
 *
 * After the first @c repeated event is fired, all subsequent ones will follow
 * after a delay of @c t seconds for each.
 *
 * See also @ref elm_button_autorepeat_initial_timeout_set.
 *
 * @return Interval in seconds
 *
 * @ingroup Elm_Button
 */
EAPI double                      elm_button_autorepeat_gap_timeout_get(const Evas_Object *obj);

/**
 * @brief Turn on/off the autorepeat event generated when the button is kept
 * pressed
 *
 * When off, no autorepeat is performed and buttons emit a normal @c clicked
 * signal when they are clicked.
 *
 * When on, keeping a button pressed will continuously emit a @c repeated
 * signal until the button is released. The time it takes until it starts
 * emitting the signal is given by @ref elm_button_autorepeat_initial_timeout_set,
 * and the time between each new emission by
 * @ref elm_button_autorepeat_gap_timeout_set.
 *
 * @param[in] on A bool to turn on/off the event
 *
 * @ingroup Elm_Button
 */
EAPI void                        elm_button_autorepeat_set(Evas_Object *obj, Eina_Bool on);

/**
 * @brief Turn on/off the autorepeat event generated when the button is kept
 * pressed
 *
 * When off, no autorepeat is performed and buttons emit a normal @c clicked
 * signal when they are clicked.
 *
 * When on, keeping a button pressed will continuously emit a @c repeated
 * signal until the button is released. The time it takes until it starts
 * emitting the signal is given by @ref elm_button_autorepeat_initial_timeout_set,
 * and the time between each new emission by
 * @ref elm_button_autorepeat_gap_timeout_set.
 *
 * @return A bool to turn on/off the event
 *
 * @ingroup Elm_Button
 */
EAPI Eina_Bool                   elm_button_autorepeat_get(const Evas_Object *obj);

#include "efl_ui_button.eo.legacy.h"