summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2020-01-15 14:35:03 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2020-01-15 14:40:38 +0100
commit090df4331b9c680d50b884ccac8f39c0f312fc16 (patch)
treea416c18d196d51d7d5e755a39c9e053ce79b8e6c
parente1a329a3e90e75ddc5272fd745e96c4fdfa79ebc (diff)
evas_gesture: change getter methods to read-only properties
Summary: From language bindings' perspective, it seems better that read-only properties are provided instead of getter methods. ref T8557 Reviewers: segfaultxavi, CHAN Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8557 Differential Revision: https://phab.enlightenment.org/D11094
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_flick.c4
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_flick.eo20
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_momentum.c2
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_momentum.eo10
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_zoom.c4
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_zoom.eo20
6 files changed, 40 insertions, 20 deletions
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_flick.c b/src/lib/evas/gesture/efl_canvas_gesture_flick.c
index 1095a84652..faa8e3812f 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_flick.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_flick.c
@@ -16,13 +16,13 @@ _efl_canvas_gesture_flick_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_Fli
16} 16}
17 17
18EOLIAN static Eina_Vector2 18EOLIAN static Eina_Vector2
19_efl_canvas_gesture_flick_momentum_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Flick_Data *pd) 19_efl_canvas_gesture_flick_momentum_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Flick_Data *pd)
20{ 20{
21 return pd->momentum; 21 return pd->momentum;
22} 22}
23 23
24EOLIAN static double 24EOLIAN static double
25_efl_canvas_gesture_flick_angle_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Flick_Data *pd) 25_efl_canvas_gesture_flick_angle_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Flick_Data *pd)
26{ 26{
27 return pd->angle; 27 return pd->angle;
28} 28}
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_flick.eo b/src/lib/evas/gesture/efl_canvas_gesture_flick.eo
index bec2f127c8..a624a529f9 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_flick.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_flick.eo
@@ -10,15 +10,23 @@ class @beta Efl.Canvas.Gesture_Flick extends Efl.Canvas.Gesture
10 ]] 10 ]]
11 c_prefix: efl_gesture_flick; 11 c_prefix: efl_gesture_flick;
12 methods { 12 methods {
13 momentum_get { 13 @property momentum {
14 [[Gets flick gesture momentum value, this is, the direction in which the 14 [[The flick gesture momentum value, this is, the direction in which the
15 pointer was flicked.]] 15 pointer was flicked.]]
16 return: Eina.Vector2; [[The momentum vector.]] 16 get {
17 }
18 values {
19 momentum: Eina.Vector2; [[The momentum vector.]]
20 }
17 } 21 }
18 angle_get { 22 @property angle {
19 [[Gets flick gesture direction angle, this is, the angle in which the 23 [[The flick gesture direction angle, this is, the angle in which the
20 pointer was flicked.]] 24 pointer was flicked.]]
21 return: double; [[The angle value.]] 25 get {
26 }
27 values {
28 angle: double; [[The angle value.]]
29 }
22 } 30 }
23 } 31 }
24 implements { 32 implements {
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_momentum.c b/src/lib/evas/gesture/efl_canvas_gesture_momentum.c
index e7eb34ad2b..91d2ca8f1d 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_momentum.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_momentum.c
@@ -16,7 +16,7 @@ _efl_canvas_gesture_momentum_efl_object_constructor(Eo *obj, Efl_Canvas_Gesture_
16} 16}
17 17
18EOLIAN static Eina_Vector2 18EOLIAN static Eina_Vector2
19_efl_canvas_gesture_momentum_momentum_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Momentum_Data *pd) 19_efl_canvas_gesture_momentum_momentum_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Momentum_Data *pd)
20{ 20{
21 return pd->momentum; 21 return pd->momentum;
22} 22}
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_momentum.eo b/src/lib/evas/gesture/efl_canvas_gesture_momentum.eo
index d3bd578e1c..715743c49b 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_momentum.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_momentum.eo
@@ -10,9 +10,13 @@ class @beta Efl.Canvas.Gesture_Momentum extends Efl.Canvas.Gesture
10 ]] 10 ]]
11 c_prefix: efl_gesture_momentum; 11 c_prefix: efl_gesture_momentum;
12 methods { 12 methods {
13 momentum_get { 13 @property momentum {
14 [[Gets the momentum value, this is, the direction in which the action occurred.]] 14 [[The momentum value, this is, the direction in which the action occurred.]]
15 return: Eina.Vector2; [[The momentum vector.]] 15 get {
16 }
17 values {
18 momentum: Eina.Vector2; [[The momentum vector.]]
19 }
16 } 20 }
17 } 21 }
18 implements { 22 implements {
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_zoom.c b/src/lib/evas/gesture/efl_canvas_gesture_zoom.c
index 3ac4ffcbf4..9ea7533aeb 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_zoom.c
+++ b/src/lib/evas/gesture/efl_canvas_gesture_zoom.c
@@ -21,13 +21,13 @@ _efl_canvas_gesture_zoom_efl_object_destructor(Eo *obj, Efl_Canvas_Gesture_Zoom_
21} 21}
22 22
23EOLIAN static double 23EOLIAN static double
24_efl_canvas_gesture_zoom_radius_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Zoom_Data *pd) 24_efl_canvas_gesture_zoom_radius_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Zoom_Data *pd)
25{ 25{
26 return pd->radius; 26 return pd->radius;
27} 27}
28 28
29EOLIAN static double 29EOLIAN static double
30_efl_canvas_gesture_zoom_zoom_get(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Zoom_Data *pd) 30_efl_canvas_gesture_zoom_zoom_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Zoom_Data *pd)
31{ 31{
32 return pd->zoom; 32 return pd->zoom;
33} 33}
diff --git a/src/lib/evas/gesture/efl_canvas_gesture_zoom.eo b/src/lib/evas/gesture/efl_canvas_gesture_zoom.eo
index 1471a9401c..1663a76440 100644
--- a/src/lib/evas/gesture/efl_canvas_gesture_zoom.eo
+++ b/src/lib/evas/gesture/efl_canvas_gesture_zoom.eo
@@ -8,16 +8,24 @@ class @beta Efl.Canvas.Gesture_Zoom extends Efl.Canvas.Gesture
8 ]] 8 ]]
9 c_prefix: efl_gesture_zoom; 9 c_prefix: efl_gesture_zoom;
10 methods { 10 methods {
11 radius_get { 11 @property radius {
12 [[Gets the current radius (i.e. the distance between the two fingers) of the gesture.]] 12 [[The current radius (i.e. the distance between the two fingers) of the gesture.]]
13 return: double; [[The radius value in pixels.]] 13 get {
14 }
15 values {
16 radius: double; [[The radius value in pixels.]]
17 }
14 } 18 }
15 zoom_get { 19 @property zoom {
16 [[Gets the current zoom value of the gesture. When the gesture begins, the finger 20 [[The current zoom value of the gesture. When the gesture begins, the finger
17 distance is recorded. When the distance becomes greater than the initial one, a 21 distance is recorded. When the distance becomes greater than the initial one, a
18 zoom value greater than $[1.0] is reported. When it becomes smaller, a zoom value 22 zoom value greater than $[1.0] is reported. When it becomes smaller, a zoom value
19 lesser than $[1.0] is reported.]] 23 lesser than $[1.0] is reported.]]
20 return: double; [[The zoom value. $[1.0] means no zoom.]] 24 get {
25 }
26 values {
27 zoom: double; [[The zoom value. $[1.0] means no zoom.]]
28 }
21 } 29 }
22 } 30 }
23 implements { 31 implements {