forked from enlightenment/efl
Elm_Animation_View : Change some EAPI to EOAPI
Summary: enum Elm_Animation_View_State -> enum Elm.Animation_View.State elm_animation_view_state_get -> Elm.Animation_View.state.get elm_animation_view_is_playing_back -> Elm.Animation_View.is_playing_back elm_animation_view_frame_count_get -> Elm.Animation_View.frame_count.get Test Plan: N/A Reviewers: Hermet Reviewed By: Hermet Subscribers: cedric, SanghyeonLee, #reviewers, smohanty, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7632
This commit is contained in:
parent
83a254434a
commit
346a21ef1c
|
@ -543,6 +543,24 @@ _elm_animation_view_default_size_get(const Eo *obj EINA_UNUSED,
|
|||
return efl_canvas_vg_object_default_size_get(pd->vg);
|
||||
}
|
||||
|
||||
EOLIAN static Elm_Animation_View_State
|
||||
_elm_animation_view_state_get(const Eo *obj EINA_UNUSED, Elm_Animation_View_Data *pd)
|
||||
{
|
||||
return pd->state;
|
||||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_elm_animation_view_is_playing_back(Eo *obj EINA_UNUSED, Elm_Animation_View_Data *pd)
|
||||
{
|
||||
return pd->play_back;
|
||||
}
|
||||
|
||||
EOLIAN static int
|
||||
_elm_animation_view_frame_count_get(const Eo *obj EINA_UNUSED, Elm_Animation_View_Data *pd)
|
||||
{
|
||||
return evas_object_vg_animated_frame_count_get(pd->vg);
|
||||
}
|
||||
|
||||
EAPI Elm_Animation_View*
|
||||
elm_animation_view_add(Evas_Object *parent)
|
||||
{
|
||||
|
@ -556,32 +574,6 @@ elm_animation_view_file_set(Elm_Animation_View *obj, const char *file, const cha
|
|||
return efl_file_set(obj, file, key);
|
||||
}
|
||||
|
||||
EAPI Elm_Animation_View_State
|
||||
elm_animation_view_state_get(const Elm_Animation_View *obj)
|
||||
{
|
||||
ELM_ANIMATION_VIEW_DATA_GET(obj, pd);
|
||||
if (!pd) return ELM_ANIMATION_VIEW_STATE_NOT_READY;
|
||||
|
||||
return pd->state;
|
||||
}
|
||||
|
||||
EAPI Eina_Bool
|
||||
elm_animation_view_is_playing_back(const Elm_Animation_View *obj)
|
||||
{
|
||||
ELM_ANIMATION_VIEW_DATA_GET(obj, pd);
|
||||
if (!pd) return EINA_FALSE;
|
||||
|
||||
return pd->play_back;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
elm_animation_view_frame_count_get(const Elm_Animation_View *obj)
|
||||
{
|
||||
ELM_ANIMATION_VIEW_DATA_GET(obj, pd);
|
||||
if (!pd) return 0;
|
||||
return evas_object_vg_animated_frame_count_get(pd->vg);
|
||||
}
|
||||
|
||||
/* Internal EO APIs and hidden overrides */
|
||||
|
||||
#define ELM_ANIMATION_VIEW_EXTRA_OPS \
|
||||
|
|
|
@ -1,3 +1,13 @@
|
|||
|
||||
enum Elm.Animation_View.State
|
||||
{
|
||||
not_ready, [[Animation is not ready to play. (Probably, it didn't file set yet or failed to read file. @since 1.22]]
|
||||
play, [[Animation is on playing. see @.play @since 1.22]]
|
||||
play_back, [[Animation is on playing back (rewinding). see @.back @since 1.22]]
|
||||
pause, [[Animation has been paused. To continue animation, call @.resume. see @.pause @since 1.22]]
|
||||
stop [[Animation view successfully loaded a file then readied for playing. Otherwise after finished animation or stopped forcely by request. see @.stop @since 1.22]]
|
||||
}
|
||||
|
||||
class Elm.Animation_View (Efl.Ui.Widget, Efl.Gfx.View, Efl.Ui.Legacy, Efl.File)
|
||||
{
|
||||
[[Elementary Animation View class]]
|
||||
|
@ -150,6 +160,32 @@ class Elm.Animation_View (Efl.Ui.Widget, Efl.Gfx.View, Efl.Ui.Legacy, Efl.File)
|
|||
size: Eina.Size2D;
|
||||
}
|
||||
}
|
||||
@property state {
|
||||
get{
|
||||
[[Get current animation view state.
|
||||
see @.State
|
||||
@since 1.22]]
|
||||
}
|
||||
values {
|
||||
state: Elm.Animation_View.State; [[Current animation view state]]
|
||||
}
|
||||
}
|
||||
is_playing_back {
|
||||
[[Returns the status whether current animation is on playing forward or backward.
|
||||
warning: If animation view is not on playing, it will return $false.
|
||||
@since 1.22]]
|
||||
return: bool; [[$true, if animation on playing back, $false otherwise.]]
|
||||
}
|
||||
@property frame_count {
|
||||
get {
|
||||
[[Get the index of end frame of the animation view, if it's animated.
|
||||
note : frame number starts with 0.
|
||||
@since 1.22]]
|
||||
}
|
||||
values {
|
||||
frame_count: int; [[ The number of frames. 0, if it's not animated.]]
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Efl.Object.constructor;
|
||||
|
|
|
@ -1,14 +1,5 @@
|
|||
typedef Eo Elm_Animation_View;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ELM_ANIMATION_VIEW_STATE_NOT_READY, /*< Animation is not ready to play. (Probably, it didn't file set yet or failed to read file. @since 1.22 @ingroup Elm_Animation_View */
|
||||
ELM_ANIMATION_VIEW_STATE_PLAY, /*< Animation is on playing. @see elm_animation_play() @since 1.22 @ingroup Elm_Animation_View */
|
||||
ELM_ANIMATION_VIEW_STATE_PLAY_BACK, /*< Animation is on playing back (rewinding). @see elm_animation_back() @since 1.22 @ingroup Elm_Animation_View */
|
||||
ELM_ANIMATION_VIEW_STATE_PAUSE, /*< Animation has been paused. To continue animation, call elm_animation_view_resume(). @see elm_animation_pause() @since 1.22 @ingroup Elm_Animation_View */
|
||||
ELM_ANIMATION_VIEW_STATE_STOP /*< Animation view successfully loaded a file then readied for playing. Otherwise after finished animation or stopped forcely by request. @see elm_animation_stop() @since 1.22 @ingroup Elm_Animation_View */
|
||||
} Elm_Animation_View_State;
|
||||
|
||||
/**
|
||||
* Add a new animation view widget to the parent's canvas
|
||||
*
|
||||
|
@ -42,41 +33,4 @@ NULL, otherwise.
|
|||
*/
|
||||
EAPI Eina_Bool elm_animation_view_file_set(Elm_Animation_View *obj, const char *file, const char *key);
|
||||
|
||||
/**
|
||||
* @brief Get current animation view state.
|
||||
*
|
||||
* @return Current animation view state
|
||||
*
|
||||
* @see Elm_Animation_View_State
|
||||
*
|
||||
* @ingroup Elm_Animation_View
|
||||
*
|
||||
* @since 1.22
|
||||
*/
|
||||
EAPI Elm_Animation_View_State elm_animation_view_state_get(const Elm_Animation_View *obj);
|
||||
|
||||
/**
|
||||
* @brief Returns the status whether current animation is on playing forward or backward.
|
||||
*
|
||||
* @return @c EINA_TRUE, if animation on playing back, @c EINA_FALSE otherwise.
|
||||
*
|
||||
* @ingroup Elm_Animation_View
|
||||
*
|
||||
* @warning If animation view is not on playing, it will return @c EINA_FALSE.
|
||||
*
|
||||
* @since 1.22
|
||||
*/
|
||||
EAPI Eina_Bool elm_animation_view_is_playing_back(const Elm_Animation_View *obj);
|
||||
|
||||
/**
|
||||
* @brief Get the total number of frames of the animation view, if it's animated.
|
||||
*
|
||||
* @return The number of frames. 0, if it's not animated.
|
||||
*
|
||||
* @ingroup Elm_Animation_View
|
||||
*
|
||||
* @since 1.22
|
||||
*/
|
||||
EAPI int elm_animation_view_frame_count_get(const Elm_Animation_View *obj);
|
||||
|
||||
#include "elm_animation_view.eo.legacy.h"
|
||||
|
|
Loading…
Reference in New Issue