elementary transit: add a convenient API.

Summary:
elm_transit_current_repeat_times_get() returns
current repeating count of transition.

@feature

Reviewers: #committers, devilhorns

Reviewed By: #committers, devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7200
This commit is contained in:
Hermet Park 2018-10-23 20:43:17 +09:00
parent 36fc2e6a93
commit e6924b9c72
2 changed files with 23 additions and 0 deletions

View File

@ -739,6 +739,13 @@ elm_transit_repeat_times_set(Elm_Transit *transit, int repeat)
transit->repeat.current = 0;
}
EAPI int
elm_transit_current_repeat_times_get(const Elm_Transit *transit)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit, 0);
return transit->repeat.current;
}
EAPI int
elm_transit_repeat_times_get(const Elm_Transit *transit)
{

View File

@ -418,6 +418,22 @@ EAPI void elm_transit_repeat_times_set(Elm_Transit *transit, i
*/
EAPI int elm_transit_repeat_times_get(const Elm_Transit *transit);
/**
* Get current transit repeated count.
*
* @see elm_transit_repeat_times_set()
*
* @param transit The Transit object.
* @return Current repeated count. If @p transit is NULL
* 0 is returned
*
* @warning Return value is only valid when repeat times is set.
* @since 1.22
*
* @ingroup Elm_Transit
*/
EAPI int elm_transit_current_repeat_times_get(const Elm_Transit *transit);
/**
* Set the transit animation acceleration type.
*