summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2019-11-12 14:30:10 +0900
committerJunsuChoi <jsuya.choi@samsung.com>2019-11-12 14:30:10 +0900
commitbcfffc07cfdae0a95cd5ce6a5d7ca1f402b52210 (patch)
tree6042074477a56060bfad2f1edda0f5a06b7c5968
parent93551ca58e8c5676b116d98eba07a8061c4ec8fd (diff)
Efl.Gfx.Frame_Controller: Add sector property
Summary: These APIs to get and set frames for a specific section for playing section. Depends on D10505 Test Plan: N/A Reviewers: Hermet, smohanty, kimcinoo Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10506
-rw-r--r--src/lib/efl/interfaces/efl_gfx_frame_controller.eo19
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object.c24
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object.eo1
3 files changed, 44 insertions, 0 deletions
diff --git a/src/lib/efl/interfaces/efl_gfx_frame_controller.eo b/src/lib/efl/interfaces/efl_gfx_frame_controller.eo
index bedacf33d7..2d8481d184 100644
--- a/src/lib/efl/interfaces/efl_gfx_frame_controller.eo
+++ b/src/lib/efl/interfaces/efl_gfx_frame_controller.eo
@@ -98,5 +98,24 @@ interface @beta Efl.Gfx.Frame_Controller
98 duration: double; [[Duration in seconds]] 98 duration: double; [[Duration in seconds]]
99 } 99 }
100 } 100 }
101 @property sector {
102 [[The sector for playing section.
103
104 Returns the start and end frame of the sector specified by the name.
105 ]]
106 set {
107 return: bool; [[ Returns $true if sector and frame set success. ]]
108 }
109 get {
110 return: bool; [[ Returns $true if frames get success. ]]
111 }
112 keys {
113 name: string; [[ The name of sector ]]
114 }
115 values {
116 startframe: int; [[ The start frame of sector ]]
117 endframe: int; [[ The end frame of sector ]]
118 }
119 }
101 } 120 }
102} 121}
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.c b/src/lib/evas/canvas/efl_canvas_vg_object.c
index 1027907a8d..3c3c0d81d6 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_object.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_object.c
@@ -943,6 +943,30 @@ _efl_canvas_vg_object_efl_gfx_frame_controller_frame_duration_get(const Eo *eo_o
943 return evas_cache_vg_anim_duration_get(pd->vg_entry); 943 return evas_cache_vg_anim_duration_get(pd->vg_entry);
944} 944}
945 945
946Eina_Bool _efl_canvas_vg_object_efl_gfx_frame_controller_sector_set(Eo *obj EINA_UNUSED,
947 Efl_Canvas_Vg_Object_Data *pd,
948 const char *name,
949 int startframe,
950 int endframe)
951{
952 if (!pd->vg_entry) return EINA_FALSE;
953 if (!evas_cache_vg_anim_sector_set(pd->vg_entry, name, startframe, endframe))
954 return EINA_FALSE;
955 return EINA_TRUE;
956}
957
958Eina_Bool _efl_canvas_vg_object_efl_gfx_frame_controller_sector_get(const Eo *obj EINA_UNUSED,
959 Efl_Canvas_Vg_Object_Data *pd,
960 const char *name,
961 int *startframe,
962 int *endframe)
963{
964 if (!pd->vg_entry) return EINA_FALSE;
965 if (!evas_cache_vg_anim_sector_get(pd->vg_entry, name, startframe, endframe))
966 return EINA_FALSE;
967 return EINA_TRUE;
968}
969
946EOLIAN static Eina_Bool 970EOLIAN static Eina_Bool
947_efl_canvas_vg_object_efl_gfx_frame_controller_frame_set(Eo *eo_obj, 971_efl_canvas_vg_object_efl_gfx_frame_controller_frame_set(Eo *eo_obj,
948 Efl_Canvas_Vg_Object_Data *pd, 972 Efl_Canvas_Vg_Object_Data *pd,
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.eo b/src/lib/evas/canvas/efl_canvas_vg_object.eo
index 2213c232ae..51eded82d5 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_object.eo
+++ b/src/lib/evas/canvas/efl_canvas_vg_object.eo
@@ -89,5 +89,6 @@ class @beta Efl.Canvas.Vg.Object extends Efl.Canvas.Object implements Efl.File,
89 Efl.Gfx.Frame_Controller.loop_type { get; } 89 Efl.Gfx.Frame_Controller.loop_type { get; }
90 Efl.Gfx.Frame_Controller.loop_count { get; } 90 Efl.Gfx.Frame_Controller.loop_count { get; }
91 Efl.Gfx.Frame_Controller.frame_duration { get; } 91 Efl.Gfx.Frame_Controller.frame_duration { get; }
92 Efl.Gfx.Frame_Controller.sector { set; get; }
92 } 93 }
93} 94}