efl_interpolator: change Efl.Interpolator class to interface
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Fri, 23 Nov 2018 10:30:36 +0000 (19:30 +0900)
committerHermet Park <hermetpark@gmail.com>
Wed, 5 Dec 2018 05:37:06 +0000 (14:37 +0900)
Since Efl.Interpolator's subclasses are used as interpolator class,
Efl.Interpolator class is changed to be an interface.

This change allows Efl.Canvas.Animation to have Efl.Interpolator as its
property in efl_canvas_animation.eo.

20 files changed:
src/Makefile_Ecore.am
src/Makefile_Efl.am
src/lib/ecore/CMakeLists.txt
src/lib/ecore/Ecore_Eo.h
src/lib/ecore/efl_interpolator.c [deleted file]
src/lib/ecore/efl_interpolator_accelerate.eo
src/lib/ecore/efl_interpolator_bounce.eo
src/lib/ecore/efl_interpolator_cubic_bezier.eo
src/lib/ecore/efl_interpolator_decelerate.eo
src/lib/ecore/efl_interpolator_divisor.eo
src/lib/ecore/efl_interpolator_linear.eo
src/lib/ecore/efl_interpolator_sinusoidal.eo
src/lib/ecore/efl_interpolator_spring.eo
src/lib/ecore/meson.build
src/lib/efl/CMakeLists.txt
src/lib/efl/Efl.h
src/lib/efl/interfaces/efl_interfaces_main.c
src/lib/efl/interfaces/efl_interpolator.eo [moved from src/lib/ecore/efl_interpolator.eo with 74% similarity]
src/lib/efl/interfaces/meson.build
src/lib/evas/canvas/efl_canvas_animation.eo

index 5143fcb..e9d6f5f 100644 (file)
@@ -33,7 +33,6 @@ ecore_eolian_files_public = \
        lib/ecore/efl_io_file.eo \
         lib/ecore/efl_io_copier.eo \
         lib/ecore/efl_io_buffered_stream.eo \
-       lib/ecore/efl_interpolator.eo \
        lib/ecore/efl_interpolator_linear.eo \
        lib/ecore/efl_interpolator_accelerate.eo \
        lib/ecore/efl_interpolator_decelerate.eo \
@@ -127,7 +126,6 @@ lib/ecore/efl_model_composite_boolean.c \
 lib/ecore/efl_model_composite_selection.c \
 lib/ecore/efl_model_accessor_view.c \
 lib/ecore/efl_model_accessor_view_private.h \
-lib/ecore/efl_interpolator.c \
 lib/ecore/efl_interpolator_linear.c \
 lib/ecore/efl_interpolator_accelerate.c \
 lib/ecore/efl_interpolator_decelerate.c \
index 551e907..8234cad 100644 (file)
@@ -77,6 +77,7 @@ efl_eolian_files = \
       lib/efl/interfaces/efl_gfx_color_class.eo \
       lib/efl/interfaces/efl_gfx_text_class.eo \
       lib/efl/interfaces/efl_gfx_size_class.eo \
+      lib/efl/interfaces/efl_interpolator.eo \
       $(efl_eolian_legacy_files) \
       $(NULL)
 
index 4fb4b0a..c52c5f4 100644 (file)
@@ -38,7 +38,6 @@ set(PUBLIC_EO_FILES
   efl_loop_timer.eo
   efl_loop_user.eo
   efl_promise.eo
-  efl_interpolator.eo
   efl_interpolator_linear.eo
   efl_interpolator_accelerate.eo
   efl_interpolator_decelerate.eo
index a1ab188..9550c2e 100644 (file)
@@ -82,7 +82,6 @@ EAPI Eina_Promise *efl_loop_promise_new(const Eo *obj, Eina_Promise_Cancel_Cb ca
 #include "efl_loop_fd.eo.h"
 #include "efl_loop_handler.eo.h"
 
-#include "efl_interpolator.eo.h"
 #include "efl_interpolator_linear.eo.h"
 #include "efl_interpolator_accelerate.eo.h"
 #include "efl_interpolator_decelerate.eo.h"
diff --git a/src/lib/ecore/efl_interpolator.c b/src/lib/ecore/efl_interpolator.c
deleted file mode 100644 (file)
index 573d5c5..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "Ecore.h"
-#include "ecore_private.h"
-
-#define MY_CLASS EFL_INTERPOLATOR_CLASS
-
-typedef struct _Efl_Interpolator_Data Efl_Interpolator_Data;
-
-struct _Efl_Interpolator_Data
-{
-};
-
-EOLIAN static double
-_efl_interpolator_interpolate(Eo *eo_obj EINA_UNUSED,
-                              Efl_Interpolator_Data *pd EINA_UNUSED,
-                              double progress)
-{
-   return progress;
-}
-
-#include "efl_interpolator.eo.c"
index dc087a5..3f2ef94 100644 (file)
@@ -1,4 +1,4 @@
-class Efl.Interpolator_Accelerate (Efl.Interpolator)
+class Efl.Interpolator_Accelerate (Efl.Object, Efl.Interpolator)
 {
    [[Efl accelerate interpolator class
 
index 8df3807..cd77b8b 100644 (file)
@@ -1,4 +1,4 @@
-class Efl.Interpolator_Bounce (Efl.Interpolator)
+class Efl.Interpolator_Bounce (Efl.Object, Efl.Interpolator)
 {
    [[Efl bounce interpolator class]]
    data: Efl_Interpolator_Bounce_Data;
index 3a10fdc..4e3906d 100644 (file)
@@ -1,4 +1,4 @@
-class Efl.Interpolator_Cubic_Bezier (Efl.Interpolator)
+class Efl.Interpolator_Cubic_Bezier (Efl.Object, Efl.Interpolator)
 {
    [[Efl cubic_bezier interpolator class]]
    data: Efl_Interpolator_Cubic_Bezier_Data;
index 99d86c7..25a4d05 100644 (file)
@@ -1,4 +1,4 @@
-class Efl.Interpolator_Decelerate (Efl.Interpolator)
+class Efl.Interpolator_Decelerate (Efl.Object, Efl.Interpolator)
 {
    [[Efl decelerate interpolator class
 
index 63201d5..d9a1cef 100644 (file)
@@ -1,4 +1,4 @@
-class Efl.Interpolator_Divisor (Efl.Interpolator)
+class Efl.Interpolator_Divisor (Efl.Object, Efl.Interpolator)
 {
    [[Efl divisor interpolator class]]
    data: Efl_Interpolator_Divisor_Data;
index 26e054e..b61c7d1 100644 (file)
@@ -1,4 +1,4 @@
-class Efl.Interpolator_Linear (Efl.Interpolator)
+class Efl.Interpolator_Linear (Efl.Object, Efl.Interpolator)
 {
    [[Efl linear interpolator class]]
    data: Efl_Interpolator_Linear_Data;
index 0a1d923..3971852 100644 (file)
@@ -1,4 +1,4 @@
-class Efl.Interpolator_Sinusoidal (Efl.Interpolator)
+class Efl.Interpolator_Sinusoidal (Efl.Object, Efl.Interpolator)
 {
    [[Efl sinusoidal interpolator class
 
index 2d1047e..ef3eee0 100644 (file)
@@ -1,4 +1,4 @@
-class Efl.Interpolator_Spring (Efl.Interpolator)
+class Efl.Interpolator_Spring (Efl.Object, Efl.Interpolator)
 {
    [[Efl spring interpolator class]]
    data: Efl_Interpolator_Spring_Data;
index dbb511e..993437f 100644 (file)
@@ -57,7 +57,6 @@ pub_eo_files = [
   'efl_io_file.eo',
   'efl_io_copier.eo',
   'efl_io_buffered_stream.eo',
-  'efl_interpolator.eo',
   'efl_interpolator_linear.eo',
   'efl_interpolator_accelerate.eo',
   'efl_interpolator_decelerate.eo',
@@ -154,7 +153,6 @@ ecore_src = [
   'efl_model_composite_selection.c',
   'efl_model_accessor_view.c',
   'efl_model_accessor_view_private.h',
-  'efl_interpolator.c',
   'efl_interpolator_linear.c',
   'efl_interpolator_accelerate.c',
   'efl_interpolator_decelerate.c',
index 0c03b5c..7f16729 100644 (file)
@@ -29,6 +29,7 @@ set(PUBLIC_EO_FILES
   interfaces/efl_image_load.eo
   interfaces/efl_input_device.eo
   interfaces/efl_input_types.eot
+  interfaces/efl_interpolator.eo
   interfaces/efl_io_buffer.eo
   interfaces/efl_io_closer.eo
   interfaces/efl_io_positioner.eo
index 6cebb21..8548ac9 100644 (file)
@@ -117,6 +117,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
 
 /* Core interface */
 #include "interfaces/efl_animator.eo.h"
+#include "interfaces/efl_interpolator.eo.h"
 
 /* Graphics */
 #include "interfaces/efl_gfx_entity.eo.h"
index f5b8634..a21d750 100644 (file)
@@ -61,6 +61,7 @@
 
 #include "interfaces/efl_model.eo.c"
 #include "interfaces/efl_animator.eo.c"
+#include "interfaces/efl_interpolator.eo.c"
 #include "interfaces/efl_orientation.eo.c"
 #include "interfaces/efl_ui_base.eo.c"
 #include "interfaces/efl_ui_direction.eo.c"
similarity index 74%
rename from src/lib/ecore/efl_interpolator.eo
rename to src/lib/efl/interfaces/efl_interpolator.eo
index f24c601..4c25d9c 100644 (file)
@@ -1,7 +1,6 @@
-class Efl.Interpolator (Efl.Object)
+interface Efl.Interpolator ()
 {
-   [[Efl interpolator class]]
-   data: Efl_Interpolator_Data;
+   [[Efl interpolator interface]]
    methods {
       interpolate {
          [[Interpolate the given value.]]
index 012bc12..03d88e2 100644 (file)
@@ -71,6 +71,7 @@ pub_eo_files = [
   'efl_gfx_size_hint.eo',
   'efl_model.eo',
   'efl_animator.eo',
+  'efl_interpolator.eo',
   'efl_orientation.eo',
   'efl_container.eo',
   'efl_content.eo',
index 7773ca3..8040ac9 100644 (file)
@@ -62,7 +62,7 @@ class Efl.Canvas.Animation (Efl.Object, Efl.Playable)
          get {
          }
          values {
-            interpolator: Efl.Object; [[Interpolator which indicates interpolation fucntion. Efl_Interpolator is required.]]
+            interpolator: Efl.Interpolator; [[Interpolator which indicates interpolation fucntion. Efl_Interpolator is required.]]
          }
       }
       animation_apply {