summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-05-24 14:12:34 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-05-24 19:21:44 +0900
commit5ef7d816c8d2f19d1c2cc46cb1b68aa3920c6c44 (patch)
treec6487369267530052592da735d1b0ffaa7753333
parent60584015903cf2ec4f82c68e6dcf01467f256e55 (diff)
downloadefl-5ef7d816c8d2f19d1c2cc46cb1b68aa3920c6c44.tar.gz
Efl.Ui.Progressbar: add pulse_mode & pulse as eo API
and mark pulse_set/get, pulse and is_pulsing_get() as legacy APIs ref T5360 Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
-rw-r--r--src/lib/elementary/efl_ui_progressbar.c32
-rw-r--r--src/lib/elementary/efl_ui_progressbar.eo44
-rw-r--r--src/lib/elementary/elm_progressbar_legacy.h67
3 files changed, 121 insertions, 22 deletions
diff --git a/src/lib/elementary/efl_ui_progressbar.c b/src/lib/elementary/efl_ui_progressbar.c
index d042d58e2e..0a71905233 100644
--- a/src/lib/elementary/efl_ui_progressbar.c
+++ b/src/lib/elementary/efl_ui_progressbar.c
@@ -367,7 +367,7 @@ _efl_ui_progressbar_efl_object_constructor(Eo *obj, Efl_Ui_Progressbar_Data *_pd
}
EOLIAN static void
-_efl_ui_progressbar_pulse_set(Eo *obj EINA_UNUSED, Efl_Ui_Progressbar_Data *sd, Eina_Bool pulse)
+_efl_ui_progressbar_pulse_mode_set(Eo *obj EINA_UNUSED, Efl_Ui_Progressbar_Data *sd, Eina_Bool pulse)
{
pulse = !!pulse;
if (sd->pulse == pulse) return;
@@ -378,7 +378,7 @@ _efl_ui_progressbar_pulse_set(Eo *obj EINA_UNUSED, Efl_Ui_Progressbar_Data *sd,
}
EOLIAN static Eina_Bool
-_efl_ui_progressbar_pulse_get(Eo *obj EINA_UNUSED, Efl_Ui_Progressbar_Data *sd)
+_efl_ui_progressbar_pulse_mode_get(Eo *obj EINA_UNUSED, Efl_Ui_Progressbar_Data *sd)
{
return sd->pulse;
}
@@ -458,7 +458,7 @@ _efl_ui_progressbar_efl_ui_progress_unit_format_get(Eo *obj EINA_UNUSED, Efl_Ui_
}
EOLIAN static void
-_efl_ui_progressbar_pulse(Eo *obj, Efl_Ui_Progressbar_Data *sd, Eina_Bool state)
+_efl_ui_progressbar_pulse_set(Eo *obj, Efl_Ui_Progressbar_Data *sd, Eina_Bool state)
{
state = !!state;
if ((!sd->pulse) || (sd->pulse_state == state)) return;
@@ -472,7 +472,7 @@ _efl_ui_progressbar_pulse(Eo *obj, Efl_Ui_Progressbar_Data *sd, Eina_Bool state)
}
EOLIAN static Eina_Bool
-_efl_ui_progressbar_is_pulsing_get(const Eo *obj EINA_UNUSED, Efl_Ui_Progressbar_Data *sd)
+_efl_ui_progressbar_pulse_get(Eo *obj EINA_UNUSED, Efl_Ui_Progressbar_Data *sd)
{
return (sd->pulse_state && sd->pulse);
}
@@ -671,3 +671,27 @@ ELM_PART_OVERRIDE_CONTENT_SET(efl_ui_progressbar, EFL_UI_PROGRESSBAR, ELM_LAYOUT
EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_progressbar)
#include "efl_ui_progressbar.eo.c"
+
+EAPI void
+elm_progressbar_pulse_set(Evas_Object *obj, Eina_Bool pulse)
+{
+ efl_ui_progressbar_pulse_mode_set(obj, pulse);
+}
+
+EAPI Eina_Bool
+elm_progressbar_pulse_get(const Evas_Object *obj)
+{
+ return efl_ui_progressbar_pulse_mode_get(obj);
+}
+
+EAPI void
+elm_progressbar_pulse(Evas_Object *obj, Eina_Bool state)
+{
+ efl_ui_progressbar_pulse_set(obj, state);
+}
+
+EAPI Eina_Bool
+elm_progressbar_is_pulsing_get(const Evas_Object *obj)
+{
+ return efl_ui_progressbar_pulse_get(obj);
+} \ No newline at end of file
diff --git a/src/lib/elementary/efl_ui_progressbar.eo b/src/lib/elementary/efl_ui_progressbar.eo
index f96c5fba5d..d067e117c1 100644
--- a/src/lib/elementary/efl_ui_progressbar.eo
+++ b/src/lib/elementary/efl_ui_progressbar.eo
@@ -2,9 +2,9 @@ class Efl.Ui.Progressbar (Elm.Layout, Efl.Ui.Progress,
Efl.Orientation)
{
[[Elementary progressbar class]]
- legacy_prefix: elm_progressbar;
+ //legacy_prefix: elm_progressbar;
methods {
- @property pulse {
+ @property pulse_mode {
[[Control whether a given progress bar widget is at "pulsing mode" or not.
By default, progress bars will display values from the low to
@@ -15,7 +15,11 @@ class Efl.Ui.Progressbar (Elm.Layout, Efl.Ui.Progress,
without exact progress values. In the default theme, it will
animate its bar with the contents filling in constantly and back
to non-filled, in a loop. To start and stop this pulsing
- animation, one has to explicitly call elm_progressbar_pulse().]]
+ animation, one has to explicitly call elm_progressbar_pulse().
+
+ @since 1.20
+ ]]
+
set {
}
get {
@@ -24,6 +28,25 @@ class Efl.Ui.Progressbar (Elm.Layout, Efl.Ui.Progress,
pulse: bool; [[$true to put $obj in pulsing mode, $false to put it back to its default one]]
}
}
+ @property pulse {
+ set {
+ [[Start/stop a given progress bar "pulsing" animation, if its under that mode
+
+ Note: This call won't do anything if $obj is not under "pulsing mode".
+
+ @since 1.20
+ ]]
+ }
+ get {
+ [[ Get the pulsing state on a given progressbar widget.
+
+ @since 1.20
+ ]]
+ }
+ values {
+ state: bool; [[$true, to start the pulsing animation, $false to stop it]]
+ }
+ }
part_value_set {
[[Set the progress value (in percentage) on a given progress bar widget for the given part name
@@ -44,21 +67,6 @@ class Efl.Ui.Progressbar (Elm.Layout, Efl.Ui.Progress,
@in part: string; [[The part name of the progress bar]]
}
}
- pulse {
- [[Start/stop a given progress bar "pulsing" animation, if its under that mode
-
- Note: This call won't do anything if $obj is not under "pulsing mode".]]
- params {
- @in state: bool; [[$true, to start the pulsing animation, $false to stop it]]
- }
- }
- is_pulsing_get @const {
- [[Get the pulsing state on a given progressbar widget.
-
- @since 1.19]]
-
- return: bool; [[$true if the $obj is currently pulsing ]]
- }
}
implements {
class.constructor;
diff --git a/src/lib/elementary/elm_progressbar_legacy.h b/src/lib/elementary/elm_progressbar_legacy.h
index 588173d0bd..57ae0a8c13 100644
--- a/src/lib/elementary/elm_progressbar_legacy.h
+++ b/src/lib/elementary/elm_progressbar_legacy.h
@@ -186,4 +186,71 @@ EAPI const char *elm_progressbar_unit_format_get(const Evas_Object *obj);
*/
EAPI void elm_progressbar_unit_format_function_set(Evas_Object *obj, progressbar_func_type func, progressbar_freefunc_type free_func);
+/**
+ * @brief Control whether a given progress bar widget is at "pulsing mode" or
+ * not.
+ *
+ * By default, progress bars will display values from the low to high value
+ * boundaries. There are, though, contexts in which the progress of a given
+ * task is unknown. For such cases, one can set a progress bar widget to a
+ * "pulsing state", to give the user an idea that some computation is being
+ * held, but without exact progress values. In the default theme, it will
+ * animate its bar with the contents filling in constantly and back to
+ * non-filled, in a loop. To start and stop this pulsing animation, one has to
+ * explicitly call elm_progressbar_pulse().
+ *
+ * @param[in] pulse @c true to put @c obj in pulsing mode, @c false to put it
+ * back to its default one
+ *
+ * @ingroup Elm_Progressbar
+ */
+EAPI void elm_progressbar_pulse_set(Evas_Object *obj, Eina_Bool pulse);
+
+
+/**
+ * @brief Control whether a given progress bar widget is at "pulsing mode" or
+ * not.
+ *
+ * By default, progress bars will display values from the low to high value
+ * boundaries. There are, though, contexts in which the progress of a given
+ * task is unknown. For such cases, one can set a progress bar widget to a
+ * "pulsing state", to give the user an idea that some computation is being
+ * held, but without exact progress values. In the default theme, it will
+ * animate its bar with the contents filling in constantly and back to
+ * non-filled, in a loop. To start and stop this pulsing animation, one has to
+ * explicitly call elm_progressbar_pulse().
+ *
+ * @return @c true to put @c obj in pulsing mode, @c false to put it back to
+ * its default one
+ *
+ * @ingroup Elm_Progressbar
+ */
+EAPI Eina_Bool elm_progressbar_pulse_get(const Evas_Object *obj);
+
+
+/**
+ * @brief Start/stop a given progress bar "pulsing" animation, if its under
+ * that mode
+ *
+ * @note This call won't do anything if @c obj is not under "pulsing mode".
+ *
+ * @param[in] state @c true, to start the pulsing animation, @c false to stop
+ * it
+ *
+ * @ingroup Elm_Progressbar
+ */
+EAPI void elm_progressbar_pulse(Evas_Object *obj, Eina_Bool state);
+
+
+/**
+ * @brief Get the pulsing state on a given progressbar widget.
+ *
+ * @return @c true if the @c obj is currently pulsing
+ *
+ * @since 1.19
+ *
+ * @ingroup Elm_Progressbar
+ */
+EAPI Eina_Bool elm_progressbar_is_pulsing_get(const Evas_Object *obj);
+
#include "efl_ui_progressbar.eo.legacy.h" \ No newline at end of file