efl_gfx_image_animation_controller: Rename '*.Image_Animation_*' to '*.Frame_*'

Summary:
Efl.Gfx.Image_Animation_Controller name refers to the control of an animatable image.
However, the method we use is closer to controlling the frame.
We can change the name to Efl.Gfx.Frame_Controller and enhance the functionality of the frame control.

Test Plan: N/A

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: segfaultxavi, cedric, woohyun, #reviewers, Jaehyun_Cho, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7769
This commit is contained in:
junsu choi 2019-01-29 19:16:34 +09:00 committed by Hermet Park
parent 391339332f
commit 09ce84bbad
8 changed files with 51 additions and 54 deletions

View File

@ -4,7 +4,7 @@ efl_eolian_legacy_files = \
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 \

View File

@ -86,7 +86,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
#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"
@ -227,7 +227,7 @@ EAPI Eina_Future *efl_ui_view_factory_create_with_event(Efl_Ui_Factory *factory,
#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

View File

@ -1,42 +1,39 @@
/* 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
]]
@ -47,43 +44,43 @@ interface Efl.Gfx.Image_Animation_Controller
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).
@ -92,10 +89,10 @@ interface Efl.Gfx.Image_Animation_Controller
@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.
@ -110,7 +107,7 @@ interface Efl.Gfx.Image_Animation_Controller
]]
}
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 {

View File

@ -15,7 +15,7 @@
#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"

View File

@ -5,7 +5,7 @@ pub_legacy_eo_files = [
'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',

View File

@ -409,7 +409,7 @@ _evas_image_animated_get(const Eo *eo_obj)
}
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);
}
@ -429,12 +429,12 @@ _evas_image_animated_frame_count_get(const Eo *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);
@ -442,13 +442,13 @@ _evas_image_animated_loop_type_get(const Eo *eo_obj)
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);
}
@ -467,7 +467,7 @@ _evas_image_animated_loop_count_get(const Eo *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);
}
@ -491,7 +491,7 @@ _evas_image_animated_frame_duration_get(const Eo *eo_obj, int start_frame, int f
}
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);
}
@ -533,7 +533,7 @@ _evas_image_animated_frame_set(Eo *eo_obj, int frame_index)
}
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);
}
@ -549,7 +549,7 @@ _evas_image_animated_frame_get(const Eo *eo_obj)
}
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);
}

View File

@ -1,5 +1,5 @@
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.
@ -18,12 +18,12 @@ class Efl.Canvas.Image extends Efl.Canvas.Image_Internal implements
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; }

View File

@ -187,7 +187,7 @@ void _evas_image_orientation_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Image_Orie
/* 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);