efl/gesture: expose 'continues' as a public property for recognizers
authorMike Blumenkrantz <zmike@samsung.com>
Fri, 24 Jan 2020 18:58:40 +0000 (13:58 -0500)
committerJongmin Lee <jm105.lee@samsung.com>
Tue, 11 Feb 2020 21:58:35 +0000 (06:58 +0900)
we still access this using private data in the in-tree recognizers, but
now it's also accessible normally to custom recognizers

ref T8503

Reviewed-by: woochan lee <wc0917.lee@samsung.com>
Differential Revision: https://phab.enlightenment.org/D11175

src/lib/evas/gesture/efl_canvas_gesture_recognizer.c
src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo

index 790f9ea..3094e73 100644 (file)
@@ -1,6 +1,8 @@
+#define EFL_CANVAS_GESTURE_RECOGNIZER_PROTECTED
 #include "efl_canvas_gesture_private.h"
 
 #define MY_CLASS                                    EFL_CANVAS_GESTURE_RECOGNIZER_CLASS
+#include "efl_canvas_gesture_recognizer.eo.h"
 
 EOLIAN static Eina_Value *
 _efl_canvas_gesture_recognizer_config_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Recognizer_Data *pd, const char *name)
@@ -14,6 +16,19 @@ _efl_canvas_gesture_recognizer_reset(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Rec
 {
 }
 
+
+EOLIAN static Eina_Bool
+_efl_canvas_gesture_recognizer_continues_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Recognizer_Data *pd)
+{
+   return pd->continues;
+}
+
+EOLIAN static void
+_efl_canvas_gesture_recognizer_continues_set(Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Recognizer_Data *pd, Eina_Bool value)
+{
+   pd->continues = !!value;
+}
+
 int
 _direction_get(Evas_Coord xx1, Evas_Coord xx2)
 {
index 0307aa2..02665f1 100644 (file)
@@ -51,5 +51,17 @@ abstract @beta Efl.Canvas.Gesture_Recognizer extends Efl.Object
             value: any_value_ref; [[Value of the property.]]
          }
       }
+      @property continues {
+         [[This property determines whether a gesture recognizer should continue
+           to try processing events after returning @Efl.Canvas.Gesture_Recognizer_Result.finish
+           or @Efl.Canvas.Gesture_Recognizer_Result.cancel.]]
+         get @protected {
+         }
+         set @protected {
+         }
+         values {
+            value: bool; [[Value of the property.]]
+         }
+      }
    }
 }