forked from enlightenment/efl
Elementary: Update documentation for progressbar example
Explanation of the format function and changed callback. Patch by: Daniel Willmann <d.willmann@samsung.com> SVN revision: 73244
This commit is contained in:
parent
a060189012
commit
37185b019f
|
@ -5112,7 +5112,7 @@
|
|||
* @until pb2
|
||||
*
|
||||
* Next, comes a progress bar with an @b icon, a primary label and a
|
||||
* @b custom unit label set. It's also made to grow its bar in an
|
||||
* unit label @b function set. It's also made to grow its bar in an
|
||||
* @b inverted manner, so check that out during the timer's progression:
|
||||
* @dontinclude progressbar_example.c
|
||||
* @skip ic1 =
|
||||
|
@ -5123,6 +5123,31 @@
|
|||
* manually, as you can see in the @ref progressbar_example_c
|
||||
* "complete code".
|
||||
*
|
||||
* The format callback is a simple function that gets passed the progress value
|
||||
* and returns a string. A free function should be provided as well, if the
|
||||
* format callback allocates memory.
|
||||
* @dontinclude progressbar_example.c
|
||||
* @skip Format callback
|
||||
* @until }
|
||||
* @until }
|
||||
*
|
||||
* The last horizontal progress bar has a callback that gets called when its
|
||||
* value is @b changed. This callback updates a label to provide an estimate
|
||||
* when the operation finishes.
|
||||
* @dontinclude progressbar_example.c
|
||||
* @skip pb3
|
||||
* @skip changed trigger
|
||||
* @until pb4
|
||||
*
|
||||
* The "changed" signal is emitted every time the progressbar value is updated
|
||||
* through @ref elm_progressbar_value_set(). This callback calculates and
|
||||
* displays the ETA based on the progress and time that has passed.
|
||||
* @dontinclude progressbar_example.c
|
||||
* @skip Callback for "changed" signal
|
||||
* @until }
|
||||
* @until }
|
||||
* @until }
|
||||
*
|
||||
* The next three progress bars are just variants on the ones already
|
||||
* shown, but now all being @b vertical. Another time we use one of
|
||||
* than to give the window a minimum vertical size, with
|
||||
|
|
|
@ -86,6 +86,7 @@ _progressbar_example_stop(void *data,
|
|||
}
|
||||
}
|
||||
|
||||
/* Format callback */
|
||||
static char *
|
||||
_progress_format_cb(double val)
|
||||
{
|
||||
|
@ -102,6 +103,7 @@ _progress_format_free(char *str)
|
|||
free(str);
|
||||
}
|
||||
|
||||
/* Callback for "changed" signal */
|
||||
static void
|
||||
_on_changed(void *data,
|
||||
Evas_Object *obj,
|
||||
|
|
Loading…
Reference in New Issue