summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_slider_legacy.h
diff options
context:
space:
mode:
authorYeshwanth Reddivari <r.yeshwanth@samsung.com>2016-04-07 16:50:03 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-04-07 16:50:57 +0900
commit7f9036dce57045f8835a635d8b8acb16d868c37a (patch)
tree424330bccf0f77a3cd0843ba71259e2d5c866d4e /src/lib/elementary/elm_slider_legacy.h
parentd03b45f030ea1bf2fd515b179f5b81ef573de8a8 (diff)
Interface: Progress - Add common interface for Slider and Progressbar
Summary: Implement common interface efl_ui_progress and inherit slider and progressbar from common interface. Currently legacy APIs will also call interface functions and later it can be deprecated. This interface will be moved to EFL in src/lib/efl/interfaces when elementary is merged into efl. Test Plan: elementary_test -to 'slider' elementary_test -to 'progressbar' Reviewers: singh.amitesh, raster, tasn, felipealmeida, woohyun, cedric, jpeg Subscribers: saurabhbunty, alok25 Differential Revision: https://phab.enlightenment.org/D3759
Diffstat (limited to 'src/lib/elementary/elm_slider_legacy.h')
-rw-r--r--src/lib/elementary/elm_slider_legacy.h148
1 files changed, 148 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_slider_legacy.h b/src/lib/elementary/elm_slider_legacy.h
index 57cb1aa..e6e67de 100644
--- a/src/lib/elementary/elm_slider_legacy.h
+++ b/src/lib/elementary/elm_slider_legacy.h
@@ -11,4 +11,152 @@
11 */ 11 */
12EAPI Evas_Object *elm_slider_add(Evas_Object *parent); 12EAPI Evas_Object *elm_slider_add(Evas_Object *parent);
13 13
14/**
15 * @brief Set the orientation of a given slider widget.
16 *
17 * Use this function to change how your slider is to be disposed: vertically or
18 * horizontally.
19 *
20 * By default it's displayed horizontally.
21 *
22 * @param[in] horizontal
23 *
24 * @ingroup Elm_Slider
25 */
26EAPI void elm_slider_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
27
28/** Get the orientation of a given slider widget.
29 *
30 * @ingroup Elm_Slider
31 */
32EAPI Eina_Bool elm_slider_horizontal_get(const Evas_Object *obj);
33
34/**
35 * @brief Set the value the slider displays.
36 *
37 * Value will be presented on the unit label following format specified with
38 * @ref elm_slider_unit_format_set and on indicator with
39 * @ref elm_slider_indicator_format_set.
40 *
41 * @note The value must to be between min and max values. This values are set
42 * by @ref elm_slider_min_max_set.
43 *
44 * @param[in] val The value to be displayed.
45 *
46 * @ingroup Elm_Slider
47 */
48EAPI void elm_slider_value_set(Evas_Object *obj, double val);
49
50/**
51 * @brief Get the value displayed by the slider.
52 *
53 * @return The value to be displayed.
54 *
55 * @ingroup Elm_Slider
56 */
57EAPI double elm_slider_value_get(const Evas_Object *obj);
58
59/**
60 * @brief Invert a given slider widget's displaying values order
61 *
62 * A slider may be inverted, in which state it gets its values inverted, with
63 * high vales being on the left or top and low values on the right or bottom,
64 * as opposed to normally have the low values on the former and high values on
65 * the latter, respectively, for horizontal and vertical modes.
66 *
67 * @param[in] inverted Use @c true to make @c obj inverted, @c false to bring
68 * it back to default, non-inverted values.
69 *
70 * @ingroup Elm_Slider
71 */
72EAPI void elm_slider_inverted_set(Evas_Object *obj, Eina_Bool inverted);
73
74/**
75 * @brief Get whether a given slider widget's displaying values are inverted or
76 * not.
77 *
78 * @return Use @c true to make @c obj inverted, @c false to bring it back to
79 * default, non-inverted values.
80 *
81 * @ingroup Elm_Slider
82 */
83EAPI Eina_Bool elm_slider_inverted_get(const Evas_Object *obj);
84
85/**
86 * @brief Set the (exact) length of the bar region of a given slider widget.
87 *
88 * This sets the minimum width (when in horizontal mode) or height (when in
89 * vertical mode) of the actual bar area of the slider @c obj. This in turn
90 * affects the object's minimum size. Use this when you're not setting other
91 * size hints expanding on the given direction (like weight and alignment
92 * hints) and you would like it to have a specific size.
93 *
94 * @note Icon, end, label, indicator and unit text around @c obj will require
95 * their own space, which will make @c obj to require more the @c size,
96 * actually.
97 *
98 * @param[in] size The length of the slider's bar region.
99 *
100 * @ingroup Elm_Slider
101 */
102EAPI void elm_slider_span_size_set(Evas_Object *obj, Evas_Coord size);
103
104/**
105 * @brief Get the length set for the bar region of a given slider widget
106 *
107 * If that size was not set previously, with @ref elm_slider_span_size_set,
108 * this call will return $0.
109 *
110 * @return The length of the slider's bar region.
111 *
112 * @ingroup Elm_Slider
113 */
114EAPI Evas_Coord elm_slider_span_size_get(const Evas_Object *obj);
115
116/**
117 * @brief Set the format string for the unit label.
118 *
119 * Unit label is displayed all the time, if set, after slider's bar. In
120 * horizontal mode, at right and in vertical mode, at bottom.
121 *
122 * If @c null, unit label won't be visible. If not it sets the format string
123 * for the label text. To the label text is provided a floating point value, so
124 * the label text can display up to 1 floating point value. Note that this is
125 * optional.
126 *
127 * Use a format string such as "%1.2f meters" for example, and it will display
128 * values like: "3.14 meters" for a value equal to 3.14159.
129 *
130 * Default is unit label disabled.
131 *
132 * @param[in] units The format string for the unit display.
133 *
134 * @ingroup Elm_Slider
135 */
136EAPI void elm_slider_unit_format_set(Evas_Object *obj, const char *units);
137
138/**
139 * @brief Get the unit label format of the slider.
140 *
141 * Unit label is displayed all the time, if set, after slider's bar. In
142 * horizontal mode, at right and in vertical mode, at bottom.
143 *
144 * @return The format string for the unit display.
145 *
146 * @ingroup Elm_Slider
147 */
148EAPI const char *elm_slider_unit_format_get(const Evas_Object *obj);
149
150/**
151 * @brief Set the format function pointer for the units label
152 *
153 * Set the callback function to format the units string.
154 *
155 * @param[in] func The units format function.
156 * @param[in] free_func The freeing function for the format string.
157 *
158 * @ingroup Elm_Slider
159 */
160EAPI void elm_slider_units_format_function_set(Evas_Object *obj, slider_func_type func, slider_freefunc_type free_func);
161
14#include "elm_slider.eo.legacy.h" \ No newline at end of file 162#include "elm_slider.eo.legacy.h" \ No newline at end of file