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:
parent
391339332f
commit
09ce84bbad
|
@ -4,7 +4,7 @@ efl_eolian_legacy_files = \
|
||||||
lib/efl/interfaces/efl_gfx_entity.eo \
|
lib/efl/interfaces/efl_gfx_entity.eo \
|
||||||
lib/efl/interfaces/efl_gfx_color.eo \
|
lib/efl/interfaces/efl_gfx_color.eo \
|
||||||
lib/efl/interfaces/efl_gfx_image.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_input_device.eo \
|
||||||
lib/efl/interfaces/efl_ui_draggable.eo \
|
lib/efl/interfaces/efl_ui_draggable.eo \
|
||||||
lib/efl/interfaces/efl_ui_clickable.eo \
|
lib/efl/interfaces/efl_ui_clickable.eo \
|
||||||
|
|
|
@ -86,7 +86,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
|
||||||
#include "interfaces/efl_duplicate.eo.h"
|
#include "interfaces/efl_duplicate.eo.h"
|
||||||
#include "interfaces/efl_file.eo.h"
|
#include "interfaces/efl_file.eo.h"
|
||||||
#include "interfaces/efl_gfx_image.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_gfx_image_load_controller.eo.h"
|
||||||
#include "interfaces/efl_part.eo.h"
|
#include "interfaces/efl_part.eo.h"
|
||||||
#include "interfaces/efl_playable.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_fill.eo.legacy.h"
|
||||||
#include "interfaces/efl_gfx_entity.eo.legacy.h"
|
#include "interfaces/efl_gfx_entity.eo.legacy.h"
|
||||||
#include "interfaces/efl_gfx_image.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_input_device.eo.legacy.h"
|
||||||
#include "interfaces/efl_text_types.eot.h"
|
#include "interfaces/efl_text_types.eot.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,42 +1,39 @@
|
||||||
/* FIXME: invalid type from evas/emile! */
|
/* FIXME: invalid type from evas/emile! */
|
||||||
/* type @extern Evas.Animated_Loop_Hint: int; */
|
/* type @extern Evas.Animated_Loop_Hint: int; */
|
||||||
|
|
||||||
enum Efl.Gfx.Image_Animation_Controller_Loop_Hint {
|
enum Efl.Gfx.Frame_Controller_Loop_Hint {
|
||||||
[[Image animation loop modes]]
|
[[Frame loop modes]]
|
||||||
none = 0, [[No looping order specified.]]
|
none = 0, [[No looping order specified.]]
|
||||||
loop = 1, [[Standard loop: 1->2->3->1->2->3->1]]
|
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]]
|
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.Frame_Controller
|
||||||
|
|
||||||
interface Efl.Gfx.Image_Animation_Controller
|
|
||||||
{
|
{
|
||||||
[[Efl animated image interface]]
|
[[Efl frame controller of frame based animated object interface.]]
|
||||||
eo_prefix: efl_gfx_image;
|
|
||||||
|
|
||||||
methods {
|
methods {
|
||||||
@property animated {
|
@property animated {
|
||||||
get {
|
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
|
This will be $true for animated object for instance but $false
|
||||||
for still images.
|
for still image.
|
||||||
|
|
||||||
@since 1.1
|
@since 1.1
|
||||||
]]
|
]]
|
||||||
}
|
}
|
||||||
values {
|
values {
|
||||||
is_animated: bool; [[$true if the image is animated]]
|
is_animated: bool; [[$true if the object is animated]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@property animated_frame {
|
@property frame {
|
||||||
[[Index of the current frame of an animated image.
|
[[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 {
|
||||||
[[Set the frame to current frame of an image object.
|
[[Set the frame to current frame of an animated object.
|
||||||
|
|
||||||
@since 1.1
|
@since 1.1
|
||||||
]]
|
]]
|
||||||
|
@ -47,43 +44,43 @@ interface Efl.Gfx.Image_Animation_Controller
|
||||||
frame_index: int; [[The index of current frame.]]
|
frame_index: int; [[The index of current frame.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@property animated_frame_count {
|
@property frame_count {
|
||||||
get {
|
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.
|
Returns -1 if not animated.
|
||||||
|
|
||||||
@since 1.1
|
@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 */
|
/* FIXME: external type used from evas / emile */
|
||||||
get {
|
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...
|
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:
|
better to display frames in a sequence like:
|
||||||
1->2->3->2->1->2->3->1...
|
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
|
@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 {
|
||||||
[[Get the number times the animation of the object loops.
|
[[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
|
of times the animation will play fully from first to last frame
|
||||||
until the animation should stop (at the final frame).
|
until the animation should stop (at the final frame).
|
||||||
|
|
||||||
|
@ -92,10 +89,10 @@ interface Efl.Gfx.Image_Animation_Controller
|
||||||
|
|
||||||
@since 1.1
|
@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 {
|
||||||
[[Get the duration of a sequence of frames.
|
[[Get the duration of a sequence of frames.
|
||||||
|
|
||||||
|
@ -110,7 +107,7 @@ interface Efl.Gfx.Image_Animation_Controller
|
||||||
]]
|
]]
|
||||||
}
|
}
|
||||||
keys {
|
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.]]
|
frame_num: int; [[Number of frames in the sequence, starts from 0.]]
|
||||||
}
|
}
|
||||||
values {
|
values {
|
|
@ -15,7 +15,7 @@
|
||||||
#include "interfaces/efl_control.eo.c"
|
#include "interfaces/efl_control.eo.c"
|
||||||
#include "interfaces/efl_duplicate.eo.c"
|
#include "interfaces/efl_duplicate.eo.c"
|
||||||
#include "interfaces/efl_gfx_image.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_gfx_image_load_controller.eo.c"
|
||||||
#include "interfaces/efl_part.eo.c"
|
#include "interfaces/efl_part.eo.c"
|
||||||
#include "interfaces/efl_playable.eo.c"
|
#include "interfaces/efl_playable.eo.c"
|
||||||
|
|
|
@ -5,7 +5,7 @@ pub_legacy_eo_files = [
|
||||||
'efl_gfx_entity.eo',
|
'efl_gfx_entity.eo',
|
||||||
'efl_gfx_color.eo',
|
'efl_gfx_color.eo',
|
||||||
'efl_gfx_image.eo',
|
'efl_gfx_image.eo',
|
||||||
'efl_gfx_image_animation_controller.eo',
|
'efl_gfx_frame_controller.eo',
|
||||||
'efl_input_device.eo',
|
'efl_input_device.eo',
|
||||||
'efl_ui_draggable.eo',
|
'efl_ui_draggable.eo',
|
||||||
'efl_ui_clickable.eo',
|
'efl_ui_clickable.eo',
|
||||||
|
|
|
@ -409,7 +409,7 @@ _evas_image_animated_get(const Eo *eo_obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Eina_Bool
|
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);
|
return _evas_image_animated_get(eo_obj);
|
||||||
}
|
}
|
||||||
|
@ -429,12 +429,12 @@ _evas_image_animated_frame_count_get(const Eo *eo_obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static int
|
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);
|
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_image_animated_loop_type_get(const Eo *eo_obj)
|
||||||
{
|
{
|
||||||
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
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 ||
|
if (!ENFN->image_animated_loop_type_get ||
|
||||||
!evas_object_image_animated_get(eo_obj))
|
!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
|
EOLIAN static Efl_Gfx_Frame_Controller_Loop_Hint
|
||||||
_efl_canvas_image_efl_gfx_image_animation_controller_animated_loop_type_get(const Eo *eo_obj, void *_pd EINA_UNUSED)
|
_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);
|
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
|
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);
|
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
|
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);
|
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
|
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);
|
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
|
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);
|
return _evas_image_animated_frame_get(eo_obj);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class Efl.Canvas.Image extends Efl.Canvas.Image_Internal implements
|
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
|
Efl.File
|
||||||
{
|
{
|
||||||
[[Low-level Image object.
|
[[Low-level Image object.
|
||||||
|
@ -18,12 +18,12 @@ class Efl.Canvas.Image extends Efl.Canvas.Image_Internal implements
|
||||||
Efl.Gfx.Buffer.buffer_unmap;
|
Efl.Gfx.Buffer.buffer_unmap;
|
||||||
Efl.File.mmap { get; set; }
|
Efl.File.mmap { get; set; }
|
||||||
Efl.File.load_error { get; }
|
Efl.File.load_error { get; }
|
||||||
Efl.Gfx.Image_Animation_Controller.animated { get; }
|
Efl.Gfx.Frame_Controller.animated { get; }
|
||||||
Efl.Gfx.Image_Animation_Controller.animated_frame { get; set; }
|
Efl.Gfx.Frame_Controller.frame { get; set; }
|
||||||
Efl.Gfx.Image_Animation_Controller.animated_frame_count { get; }
|
Efl.Gfx.Frame_Controller.frame_count { get; }
|
||||||
Efl.Gfx.Image_Animation_Controller.animated_loop_type { get; }
|
Efl.Gfx.Frame_Controller.loop_type { get; }
|
||||||
Efl.Gfx.Image_Animation_Controller.animated_loop_count { get; }
|
Efl.Gfx.Frame_Controller.loop_count { get; }
|
||||||
Efl.Gfx.Image_Animation_Controller.animated_frame_duration { get; }
|
Efl.Gfx.Frame_Controller.frame_duration { get; }
|
||||||
Efl.Gfx.Image_Load_Controller.load_async_start;
|
Efl.Gfx.Image_Load_Controller.load_async_start;
|
||||||
Efl.Gfx.Image_Load_Controller.load_async_cancel;
|
Efl.Gfx.Image_Load_Controller.load_async_cancel;
|
||||||
Efl.Gfx.Image_Load_Controller.load_dpi { get; set; }
|
Efl.Gfx.Image_Load_Controller.load_dpi { get; set; }
|
||||||
|
|
|
@ -187,7 +187,7 @@ void _evas_image_orientation_set(Eo *eo_obj, Evas_Image_Data *o, Evas_Image_Orie
|
||||||
/* Efl.Image_Animation_Controller */
|
/* Efl.Image_Animation_Controller */
|
||||||
Eina_Bool _evas_image_animated_get(const Eo *eo_obj);
|
Eina_Bool _evas_image_animated_get(const Eo *eo_obj);
|
||||||
int _evas_image_animated_frame_count_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);
|
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);
|
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);
|
Eina_Bool _evas_image_animated_frame_set(Eo *eo_obj, int frame_index);
|
||||||
|
|
Loading…
Reference in New Issue