From 5866b21d95c254a3e87e678c9a480f7d4d81096a Mon Sep 17 00:00:00 2001 From: SungHyun Min Date: Mon, 7 Aug 2017 15:28:02 +0900 Subject: [PATCH] Fix GestureLayer to inherit Widget instead of EvasObject - to fix parent class of GestureLayer according to EFL spec - for enabling/disabling GestureLayer Change-Id: I57b27b97931110d3223f6cbd3dc17b7f48368fd2 --- src/ElmSharp/ElmSharp/GestureLayer.cs | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) mode change 100755 => 100644 src/ElmSharp/ElmSharp/GestureLayer.cs diff --git a/src/ElmSharp/ElmSharp/GestureLayer.cs b/src/ElmSharp/ElmSharp/GestureLayer.cs old mode 100755 new mode 100644 index 9bf1553..c6bce6c --- a/src/ElmSharp/ElmSharp/GestureLayer.cs +++ b/src/ElmSharp/ElmSharp/GestureLayer.cs @@ -22,9 +22,9 @@ namespace ElmSharp { /// /// The GestureLayer is used to detect gestures. - /// Inherits EvasObject + /// Inherits Widget /// - public class GestureLayer : EvasObject + public class GestureLayer : Widget { private readonly Interop.Elementary.GestureEventCallback _gestureCallback; @@ -51,34 +51,42 @@ namespace ElmSharp /// N fingers single taps /// Tap = 1, + /// /// N fingers single long-taps /// LongTap, + /// /// N fingers double-single taps /// DoubleTap, + /// /// N fingers triple-single taps /// TripleTap, + /// /// Reports momentum in the direction of move /// Momentum, + /// /// N fingers line gesture /// Line, + /// /// N fingers flick gesture /// Flick, + /// /// Zoom /// Zoom, + /// /// Rotate /// @@ -94,18 +102,22 @@ namespace ElmSharp /// Gesture not started /// Undefined = -1, + /// /// Gesture started /// Start, + /// /// Gesture is ongoing /// Move, + /// /// Gesture completed /// End, + /// /// Ongoing gesture is aborted /// @@ -113,6 +125,7 @@ namespace ElmSharp } #region Properties + /// /// Sets or gets the repeat-events setting. /// @@ -337,6 +350,7 @@ namespace ElmSharp Interop.Elementary.elm_gesture_layer_zoom_wheel_factor_set(Handle, value); } } + #endregion Properties /// @@ -416,6 +430,7 @@ namespace ElmSharp } #region Typed callback setting methods + // Following methods have been added for convenience, so the user will not have to convert Info structures himself /// /// Set the tap callback. @@ -477,6 +492,7 @@ namespace ElmSharp { SetCallback(GestureType.Rotate, state, action); } + #endregion Typed callback setting methods /// @@ -525,16 +541,20 @@ namespace ElmSharp case GestureType.TripleTap: action(Marshal.PtrToStructure(event_info)); break; + case GestureType.Momentum: action(Marshal.PtrToStructure(event_info)); break; + case GestureType.Line: case GestureType.Flick: action(Marshal.PtrToStructure(event_info)); break; + case GestureType.Zoom: action(Marshal.PtrToStructure(event_info)); break; + case GestureType.Rotate: action(Marshal.PtrToStructure(event_info)); break; @@ -542,6 +562,7 @@ namespace ElmSharp } #region Info structures + /// /// The struct of TapData /// @@ -559,6 +580,7 @@ namespace ElmSharp public Int32 Y; #pragma warning disable 3003 + /// /// The number of fingers tapped. /// @@ -568,6 +590,7 @@ namespace ElmSharp /// The timestamp. /// public UInt32 Timestamp; + #pragma warning restore 3003 } @@ -598,6 +621,7 @@ namespace ElmSharp public Int32 Y2; #pragma warning disable 3003 + /// /// Timestamp of start of final x-swipe. /// @@ -622,6 +646,7 @@ namespace ElmSharp /// Number of fingers. /// public UInt32 FingersCount; + #pragma warning restore 3003 } @@ -652,6 +677,7 @@ namespace ElmSharp public Int32 Y2; #pragma warning disable 3003 + /// /// Timestamp of start of final x-swipe. /// @@ -676,6 +702,7 @@ namespace ElmSharp /// Number of fingers. /// public UInt32 FingersCount; + #pragma warning restore 3003 /// @@ -754,6 +781,7 @@ namespace ElmSharp } #endregion Info structures + /// /// Config is a static class, it provides gestureLayer's timeout information. /// @@ -804,4 +832,4 @@ namespace ElmSharp } } } -} +} \ No newline at end of file -- 2.7.4