lib/efl/interfaces/efl_gfx_entity.eo \
lib/efl/interfaces/efl_gfx_color.eo \
lib/efl/interfaces/efl_gfx_image.eo \
- lib/efl/interfaces/efl_gfx_image_animation_controller.eo \
+ lib/efl/interfaces/efl_gfx_frame_controller.eo \
lib/efl/interfaces/efl_input_device.eo \
lib/efl/interfaces/efl_ui_draggable.eo \
lib/efl/interfaces/efl_ui_clickable.eo \
int i;
for (i = 0; i < 4; i++)
{
- double frameCnt = (double) efl_gfx_image_animated_frame_get(gvg[i]);
+ double frameCnt = (double) efl_gfx_frame_controller_frame_get(gvg[i]);
int frame = (int) (frameCnt * (progress / 1));
- efl_gfx_image_animated_frame_set(gvg[i], frame);
+ efl_gfx_frame_controller_frame_set(gvg[i], frame);
}
}
//Play custom animation
Eo *anim = efl_add(EFL_CANVAS_ANIMATION_CLASS, evas);
- efl_animation_duration_set(anim, efl_gfx_image_animated_frame_duration_get(vg, 0, 0));
+ efl_animation_duration_set(anim, efl_gfx_frame_controller_frame_duration_get(vg, 0, 0));
Eo *player = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, evas);
efl_animation_player_animation_set(player, anim);
Edje_Real_Part *ep = (Edje_Real_Part *)data;
int frame, frame_count;
- frame_count = efl_gfx_image_animated_frame_count_get(ep->object);
+ frame_count = efl_gfx_frame_controller_frame_count_get(ep->object);
if (ep->typedata.vector->backward)
frame = ep->typedata.vector->start_frame - (int) (frame_count * pos);
else
frame = ep->typedata.vector->start_frame + (int) (frame_count * pos);
- efl_gfx_image_animated_frame_set(ep->object, frame);
+ efl_gfx_frame_controller_frame_set(ep->object, frame);
if ((ep->typedata.vector->backward && (frame <= 0)) ||
(!ep->typedata.vector->backward && (frame >= frame_count)))
ep->typedata.vector->current_id = desc->vg.id;
}
- frame_duration = efl_gfx_image_animated_frame_duration_get(ep->object, 0, 0);
+ frame_duration = efl_gfx_frame_controller_frame_duration_get(ep->object, 0, 0);
efl_animation_duration_set(ep->typedata.vector->anim, frame_duration);
if (!ep->typedata.vector->is_playing)
{
- frame_count = efl_gfx_image_animated_frame_count_get(ep->object);
- efl_gfx_image_animated_frame_set(ep->object, (int)(frame_count * desc->vg.frame));
+ frame_count = efl_gfx_frame_controller_frame_count_get(ep->object);
+ efl_gfx_frame_controller_frame_set(ep->object, (int)(frame_count * desc->vg.frame));
}
}
_edje_part_vector_anim_stop(Edje *ed EINA_UNUSED, Edje_Real_Part *rp)
{
Edje_Part_Description_Vector *desc = (Edje_Part_Description_Vector *)rp->chosen_description;
- double frame_count = efl_gfx_image_animated_frame_count_get(rp->object);
+ double frame_count = efl_gfx_frame_controller_frame_count_get(rp->object);
efl_player_stop(rp->typedata.vector->player);
- efl_gfx_image_animated_frame_set(rp->object, (int)(frame_count * desc->vg.frame));
+ efl_gfx_frame_controller_frame_set(rp->object, (int)(frame_count * desc->vg.frame));
rp->typedata.vector->is_playing = EINA_FALSE;
}
{
if (rp->typedata.vector->is_playing)
{
- rp->typedata.vector->start_frame = efl_gfx_image_animated_frame_get(rp->object);
+ rp->typedata.vector->start_frame = efl_gfx_frame_controller_frame_get(rp->object);
efl_player_start(rp->typedata.vector->player);
}
}
{
rp->typedata.vector->backward = backward;
rp->typedata.vector->loop = loop;
- rp->typedata.vector->start_frame = efl_gfx_image_animated_frame_get(rp->object);
+ rp->typedata.vector->start_frame = efl_gfx_frame_controller_frame_get(rp->object);
rp->typedata.vector->is_playing = EINA_TRUE;
efl_player_start(rp->typedata.vector->player);
}
#include "interfaces/efl_duplicate.eo.h"
#include "interfaces/efl_file.eo.h"
#include "interfaces/efl_gfx_image.eo.h"
-#include "interfaces/efl_gfx_image_animation_controller.eo.h"
+#include "interfaces/efl_gfx_frame_controller.eo.h"
#include "interfaces/efl_gfx_image_load_controller.eo.h"
#include "interfaces/efl_part.eo.h"
#include "interfaces/efl_playable.eo.h"
#include "interfaces/efl_gfx_fill.eo.legacy.h"
#include "interfaces/efl_gfx_entity.eo.legacy.h"
#include "interfaces/efl_gfx_image.eo.legacy.h"
-#include "interfaces/efl_gfx_image_animation_controller.eo.legacy.h"
+#include "interfaces/efl_gfx_frame_controller.eo.legacy.h"
#include "interfaces/efl_input_device.eo.legacy.h"
#include "interfaces/efl_text_types.eot.h"
#endif
/* FIXME: invalid type from evas/emile! */
/* type @extern Evas.Animated_Loop_Hint: int; */
-enum Efl.Gfx.Image_Animation_Controller_Loop_Hint {
- [[Image animation loop modes]]
+enum Efl.Gfx.Frame_Controller_Loop_Hint {
+ [[Frame loop modes]]
none = 0, [[No looping order specified.]]
loop = 1, [[Standard loop: 1->2->3->1->2->3->1]]
pingpong = 2 [[Ping-pong bouncing loop: 1->2->3->2->1->2->3->1]]
}
-/* FIXME: rename to Efl.Gfx.Image_Animation_Controller when eo/eolian are fixed */
-
-interface Efl.Gfx.Image_Animation_Controller
+interface Efl.Gfx.Frame_Controller
{
- [[Efl animated image interface]]
- eo_prefix: efl_gfx_image;
+ [[Efl frame controller of frame based animated object interface.]]
methods {
@property animated {
get {
- [[Check if an image can be animated (has multiple frames).
+ [[Check if an object can be animated (has multiple frames).
- This will be $true for animated Gif files for instance but $false
- for still images.
+ This will be $true for animated object for instance but $false
+ for still image.
@since 1.1
]]
}
values {
- is_animated: bool; [[$true if the image is animated]]
+ is_animated: bool; [[$true if the object is animated]]
}
}
- @property animated_frame {
- [[Index of the current frame of an animated image.
+ @property frame {
+ [[Index of the current frame of an animated object.
- Ranges from 1 to @.animated_frame_count. Valid only if @.animated.
+ Ranges from 1 to @.frame_count. Valid only if @.animated.
]]
set {
- [[Set the frame to current frame of an image object.
+ [[Set the frame to current frame of an animated object.
@since 1.1
]]
frame_index: int; [[The index of current frame.]]
}
}
- @property animated_frame_count {
+ @property frame_count {
get {
- [[Get the total number of frames of the image, if animated.
+ [[Get the total number of frames of the object, if animated.
Returns -1 if not animated.
@since 1.1
]]
- return: int; [[The number of frames in the animated image.]]
+ return: int; [[The number of frames in the animated object.]]
}
}
- @property animated_loop_type {
+ @property loop_type {
/* FIXME: external type used from evas / emile */
get {
- [[Get the kind of looping the image object does.
+ [[Get the kind of looping the animated object does.
- This returns the kind of looping the image object wants to do.
+ This returns the kind of looping the animated object wants to do.
- If it returns @Efl.Gfx.Image_Animation_Controller_Loop_Hint.loop, you should
+ If it returns @Efl.Gfx.Frame_Controller_Loop_Hint.loop, you should
display frames in a sequence like: 1->2->3->1->2->3->1...
- If it returns @Efl.Gfx.Image_Animation_Controller_Loop_Hint.pingpong, it is
+ If it returns @Efl.Gfx.Frame_Controller_Loop_Hint.pingpong, it is
better to display frames in a sequence like:
1->2->3->2->1->2->3->1...
- The default type is @Efl.Gfx.Image_Animation_Controller_Loop_Hint.loop.
+ The default type is @Efl.Gfx.Frame_Controller_Loop_Hint.loop.
@since 1.1
]]
- return: Efl.Gfx.Image_Animation_Controller_Loop_Hint; [[Loop type of the image object.]]
+ return: Efl.Gfx.Frame_Controller_Loop_Hint; [[Loop type of the animated object.]]
}
}
- @property animated_loop_count {
+ @property loop_count {
get {
[[Get the number times the animation of the object loops.
- This returns loop count of image. The loop count is the number
+ This returns loop count of animated object. The loop count is the number
of times the animation will play fully from first to last frame
until the animation should stop (at the final frame).
@since 1.1
]]
- return: int; [[The number of loop of an animated image object.]]
+ return: int; [[The number of loop of an animated object.]]
}
}
- @property animated_frame_duration {
+ @property frame_duration {
get {
[[Get the duration of a sequence of frames.
]]
}
keys {
- start_frame: int; [[The first frame, rangers from 1 to @.animated_frame_count.]]
+ start_frame: int; [[The first frame, rangers from 1 to @.frame_count.]]
frame_num: int; [[Number of frames in the sequence, starts from 0.]]
}
values {
#include "interfaces/efl_control.eo.c"
#include "interfaces/efl_duplicate.eo.c"
#include "interfaces/efl_gfx_image.eo.c"
-#include "interfaces/efl_gfx_image_animation_controller.eo.c"
+#include "interfaces/efl_gfx_frame_controller.eo.c"
#include "interfaces/efl_gfx_image_load_controller.eo.c"
#include "interfaces/efl_part.eo.c"
#include "interfaces/efl_playable.eo.c"
'efl_gfx_entity.eo',
'efl_gfx_color.eo',
'efl_gfx_image.eo',
- 'efl_gfx_image_animation_controller.eo',
+ 'efl_gfx_frame_controller.eo',
'efl_input_device.eo',
'efl_ui_draggable.eo',
'efl_ui_clickable.eo',
}
EOLIAN static Eina_Bool
-_efl_canvas_image_efl_gfx_image_animation_controller_animated_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
+_efl_canvas_image_efl_gfx_frame_controller_animated_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
{
return _evas_image_animated_get(eo_obj);
}
}
EOLIAN static int
-_efl_canvas_image_efl_gfx_image_animation_controller_animated_frame_count_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
+_efl_canvas_image_efl_gfx_frame_controller_frame_count_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
{
return _evas_image_animated_frame_count_get(eo_obj);
}
-Efl_Gfx_Image_Animation_Controller_Loop_Hint
+Efl_Gfx_Frame_Controller_Loop_Hint
_evas_image_animated_loop_type_get(const Eo *eo_obj)
{
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
if (!ENFN->image_animated_loop_type_get ||
!evas_object_image_animated_get(eo_obj))
- return EFL_GFX_IMAGE_ANIMATION_CONTROLLER_LOOP_HINT_NONE;
+ return EFL_GFX_FRAME_CONTROLLER_LOOP_HINT_NONE;
- return (Efl_Gfx_Image_Animation_Controller_Loop_Hint) ENFN->image_animated_loop_type_get(ENC, o->engine_data);
+ return (Efl_Gfx_Frame_Controller_Loop_Hint) ENFN->image_animated_loop_type_get(ENC, o->engine_data);
}
-EOLIAN static Efl_Gfx_Image_Animation_Controller_Loop_Hint
-_efl_canvas_image_efl_gfx_image_animation_controller_animated_loop_type_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
+EOLIAN static Efl_Gfx_Frame_Controller_Loop_Hint
+_efl_canvas_image_efl_gfx_frame_controller_loop_type_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
{
return _evas_image_animated_loop_type_get(eo_obj);
}
}
EOLIAN static int
-_efl_canvas_image_efl_gfx_image_animation_controller_animated_loop_count_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
+_efl_canvas_image_efl_gfx_frame_controller_loop_count_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
{
return _evas_image_animated_loop_count_get(eo_obj);
}
}
EOLIAN static double
-_efl_canvas_image_efl_gfx_image_animation_controller_animated_frame_duration_get(const Eo *eo_obj, void *_pd EINA_UNUSED, int start_frame, int frame_num)
+_efl_canvas_image_efl_gfx_frame_controller_frame_duration_get(const Eo *eo_obj, void *_pd EINA_UNUSED, int start_frame, int frame_num)
{
return _evas_image_animated_frame_duration_get(eo_obj, start_frame, frame_num);
}
}
EOLIAN static Eina_Bool
-_efl_canvas_image_efl_gfx_image_animation_controller_animated_frame_set(Eo *eo_obj, void *_pd EINA_UNUSED, int frame_index)
+_efl_canvas_image_efl_gfx_frame_controller_frame_set(Eo *eo_obj, void *_pd EINA_UNUSED, int frame_index)
{
return _evas_image_animated_frame_set(eo_obj, frame_index);
}
}
EOLIAN static int
-_efl_canvas_image_efl_gfx_image_animation_controller_animated_frame_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
+_efl_canvas_image_efl_gfx_frame_controller_frame_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
{
return _evas_image_animated_frame_get(eo_obj);
}
class Efl.Canvas.Image extends Efl.Canvas.Image_Internal implements
- Efl.Gfx.Image_Load_Controller, Efl.Gfx.Image_Animation_Controller,
+ Efl.Gfx.Image_Load_Controller, Efl.Gfx.Frame_Controller,
Efl.File
{
[[Low-level Image object.
Efl.Gfx.Buffer.buffer_unmap;
Efl.File.mmap { get; set; }
Efl.File.load_error { get; }
- Efl.Gfx.Image_Animation_Controller.animated { get; }
- Efl.Gfx.Image_Animation_Controller.animated_frame { get; set; }
- Efl.Gfx.Image_Animation_Controller.animated_frame_count { get; }
- Efl.Gfx.Image_Animation_Controller.animated_loop_type { get; }
- Efl.Gfx.Image_Animation_Controller.animated_loop_count { get; }
- Efl.Gfx.Image_Animation_Controller.animated_frame_duration { get; }
+ Efl.Gfx.Frame_Controller.animated { get; }
+ Efl.Gfx.Frame_Controller.frame { get; set; }
+ Efl.Gfx.Frame_Controller.frame_count { get; }
+ Efl.Gfx.Frame_Controller.loop_type { get; }
+ Efl.Gfx.Frame_Controller.loop_count { get; }
+ Efl.Gfx.Frame_Controller.frame_duration { get; }
Efl.Gfx.Image_Load_Controller.load_async_start;
Efl.Gfx.Image_Load_Controller.load_async_cancel;
Efl.Gfx.Image_Load_Controller.load_dpi { get; set; }
/* animated feature */
EOLIAN static Eina_Bool
-_efl_canvas_vg_object_efl_gfx_image_animation_controller_animated_get(const Eo *eo_obj EINA_UNUSED,
+_efl_canvas_vg_object_efl_gfx_frame_controller_animated_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Vg_Object_Data *pd EINA_UNUSED EINA_UNUSED)
{
//TODO:
}
EOLIAN static int
-_efl_canvas_vg_object_efl_gfx_image_animation_controller_animated_frame_count_get(const Eo *eo_obj EINA_UNUSED,
+_efl_canvas_vg_object_efl_gfx_frame_controller_frame_count_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Vg_Object_Data *pd EINA_UNUSED)
{
if (!pd->vg_entry) return 0;
return evas_cache_vg_anim_frame_count_get(pd->vg_entry);
}
-EOLIAN static Efl_Gfx_Image_Animation_Controller_Loop_Hint
-_efl_canvas_vg_object_efl_gfx_image_animation_controller_animated_loop_type_get(const Eo *eo_obj EINA_UNUSED,
+EOLIAN static Efl_Gfx_Frame_Controller_Loop_Hint
+_efl_canvas_vg_object_efl_gfx_frame_controller_loop_type_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Vg_Object_Data *pd EINA_UNUSED)
{
//TODO:
- return EFL_GFX_IMAGE_ANIMATION_CONTROLLER_LOOP_HINT_NONE;
+ return EFL_GFX_FRAME_CONTROLLER_LOOP_HINT_NONE;
}
EOLIAN static int
-_efl_canvas_vg_object_efl_gfx_image_animation_controller_animated_loop_count_get(const Eo *eo_obj EINA_UNUSED,
+_efl_canvas_vg_object_efl_gfx_frame_controller_loop_count_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Vg_Object_Data *pd EINA_UNUSED)
{
//TODO:
}
EOLIAN static double
-_efl_canvas_vg_object_efl_gfx_image_animation_controller_animated_frame_duration_get(const Eo *eo_obj EINA_UNUSED,
+_efl_canvas_vg_object_efl_gfx_frame_controller_frame_duration_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Vg_Object_Data *pd,
int start_frame EINA_UNUSED,
int frame_num EINA_UNUSED)
}
EOLIAN static Eina_Bool
-_efl_canvas_vg_object_efl_gfx_image_animation_controller_animated_frame_set(Eo *eo_obj,
+_efl_canvas_vg_object_efl_gfx_frame_controller_frame_set(Eo *eo_obj,
Efl_Canvas_Vg_Object_Data *pd,
int frame_index)
{
}
EOLIAN static int
-_efl_canvas_vg_object_efl_gfx_image_animation_controller_animated_frame_get(const Eo *eo_obj EINA_UNUSED,
+_efl_canvas_vg_object_efl_gfx_frame_controller_frame_get(const Eo *eo_obj EINA_UNUSED,
Efl_Canvas_Vg_Object_Data *pd EINA_UNUSED)
{
return pd->frame_idx;
EAPI int
evas_object_vg_animated_frame_get(const Evas_Object *obj)
{
- return efl_gfx_image_animated_frame_get(obj);
+ return efl_gfx_frame_controller_frame_get(obj);
}
EAPI double
evas_object_vg_animated_frame_duration_get(const Evas_Object *obj, int start_frame, int frame_num)
{
- return efl_gfx_image_animated_frame_duration_get(obj, start_frame, frame_num);
+ return efl_gfx_frame_controller_frame_duration_get(obj, start_frame, frame_num);
}
EAPI int
evas_object_vg_animated_frame_count_get(const Evas_Object *obj)
{
- return efl_gfx_image_animated_frame_count_get(obj);
+ return efl_gfx_frame_controller_frame_count_get(obj);
}
EAPI Eina_Bool
evas_object_vg_animated_frame_set(Evas_Object *obj, int frame_index)
{
- return efl_gfx_image_animated_frame_set(obj, frame_index);
+ return efl_gfx_frame_controller_frame_set(obj, frame_index);
}
EAPI Eina_Bool
class Efl.Canvas.Vg.Object extends Efl.Canvas.Object implements Efl.File,
//TIZEN_ONLY(20180831): evas json: new feature for lottie - #4
- Efl.Gfx.Image_Animation_Controller
+ Efl.Gfx.Frame_Controller
//
{
[[Efl vector graphics class]]
Efl.File.mmap { get; set; }
Efl.File.file { get; set; }
Efl.File.save;
- Efl.Gfx.Image_Animation_Controller.animated { get; }
- Efl.Gfx.Image_Animation_Controller.animated_frame { get; set; }
- Efl.Gfx.Image_Animation_Controller.animated_frame_count { get; }
- Efl.Gfx.Image_Animation_Controller.animated_loop_type { get; }
- Efl.Gfx.Image_Animation_Controller.animated_loop_count { get; }
- Efl.Gfx.Image_Animation_Controller.animated_frame_duration { get; }
+ Efl.Gfx.Frame_Controller.animated { get; }
+ Efl.Gfx.Frame_Controller.frame { get; set; }
+ Efl.Gfx.Frame_Controller.frame_count { get; }
+ Efl.Gfx.Frame_Controller.loop_type { get; }
+ Efl.Gfx.Frame_Controller.loop_count { get; }
+ Efl.Gfx.Frame_Controller.frame_duration { get; }
}
}
/* Efl.Image_Animation_Controller */
Eina_Bool _evas_image_animated_get(const Eo *eo_obj);
int _evas_image_animated_frame_count_get(const Eo *eo_obj);
-Efl_Gfx_Image_Animation_Controller_Loop_Hint _evas_image_animated_loop_type_get(const Eo *eo_obj);
+Efl_Gfx_Frame_Controller_Loop_Hint _evas_image_animated_loop_type_get(const Eo *eo_obj);
int _evas_image_animated_loop_count_get(const Eo *eo_obj);
double _evas_image_animated_frame_duration_get(const Eo *eo_obj, int start_frame, int frame_num);
Eina_Bool _evas_image_animated_frame_set(Eo *eo_obj, int frame_index);