[TCSACR-38] Rename gesture events and handlers
authorchanywa <cbible.kim@samsung.com>
Mon, 22 May 2017 11:24:12 +0000 (20:24 +0900)
committerchanywa <cbible.kim@samsung.com>
Mon, 19 Jun 2017 00:00:26 +0000 (09:00 +0900)
Change-Id: Ia0b23b4cc5f6b0bf105492d1abdfc52feffbd6a1

12 files changed:
src/Tizen.Maps/Interop/Interop.View.Event.Data.cs
src/Tizen.Maps/Tizen.Maps/Geocoordinates.cs
src/Tizen.Maps/Tizen.Maps/GestureType.cs
src/Tizen.Maps/Tizen.Maps/MapService.cs
src/Tizen.Maps/Tizen.Maps/MapView.cs
src/Tizen.Maps/Tizen.Maps/PlaceAddress.cs
src/Tizen.Maps/Tizen.Maps/PlaceAttribute.cs
src/Tizen.Maps/Tizen.Maps/PlaceCategory.cs
src/Tizen.Maps/Tizen.Maps/PlaceContact.cs
src/Tizen.Maps/Tizen.Maps/PlaceEditorial.cs
src/Tizen.Maps/Tizen.Maps/PlaceRating.cs
src/Tizen.Maps/Tizen.Maps/Polyline.cs

index c1cde38..dd5fd6a 100755 (executable)
@@ -36,10 +36,10 @@ internal static partial class Interop
         None, // MAPS_VIEW_GESTURE_NONE
         Scroll, // MAPS_VIEW_GESTURE_SCROLL
         Zoom, // MAPS_VIEW_GESTURE_ZOOM
-        Tap, // MAPS_VIEW_GESTURE_TAP
-        DoubleTap, // MAPS_VIEW_GESTURE_DOUBLE_TAP
-        TwoFingerTap, // MAPS_VIEW_GESTURE_2_FINGER_TAP
-        Rotate, // MAPS_VIEW_GESTURE_ROTATE
+        Click, // MAPS_VIEW_GESTURE_TAP
+        DoubleClick, // MAPS_VIEW_GESTURE_DOUBLE_TAP
+        TwoFingerClick, // MAPS_VIEW_GESTURE_2_FINGER_TAP
+        Rotation, // MAPS_VIEW_GESTURE_ROTATE
         LongPress, // MAPS_VIEW_GESTURE_LONG_PRESS
     }
 
index e6ba385..7a26724 100755 (executable)
@@ -67,6 +67,7 @@ namespace Tizen.Maps
         /// <summary>
         /// Returns a string that represents this object.
         /// </summary>
+        /// <returns>Returns a string which presents this object.</returns>
         public override string ToString()
         {
             return $"[{Latitude}, {Longitude}]";
index 4607787..f4ccfae 100755 (executable)
@@ -34,24 +34,24 @@ namespace Tizen.Maps
         /// </summary>
         Zoom = Interop.ViewGesture.Zoom,
         /// <summary>
-        /// Indicates the tap user gesture.
+        /// Indicates the click user gesture
         /// </summary>
-        Tap = Interop.ViewGesture.Tap,
+        Click = Interop.ViewGesture.Click,
         /// <summary>
-        /// Indicates the double tap user gesture.
+        /// Indicates the double click user gesture
         /// </summary>
-        DoubleTap = Interop.ViewGesture.DoubleTap,
+        DoubleClick = Interop.ViewGesture.DoubleClick,
         /// <summary>
-        /// Indicates the two-finger tap user gesture.
+        /// Indicates the two-finger click user gesture
         /// </summary>
-        TwoFingerTap = Interop.ViewGesture.TwoFingerTap,
+        TwoFingerClick = Interop.ViewGesture.TwoFingerClick,
         /// <summary>
         ///  Indicates the rotation user gesture.
         /// </summary>
-        Rotate = Interop.ViewGesture.Rotate,
+        Rotation = Interop.ViewGesture.Rotation,
         /// <summary>
         /// Indicates the long press user gesture.
         /// </summary>
         LongPress = Interop.ViewGesture.LongPress,
     }
-}
\ No newline at end of file
+}
index eba01fb..4c7648b 100755 (executable)
@@ -81,7 +81,7 @@ namespace Tizen.Maps
         /// <summary>
         /// Gets and sets a string representing keys for map service provider
         /// </summary>
-        /// <remarks>Regaularly, the provider key is issued by each maps provider, after signing up for a plan in the web site.
+        /// <remarks>Typically, the provider key is issued by each maps provider, after signing up for a plan in the web site.
         /// Depending on the plan and its provider which you have signed, you might pay for the network traffic.</remarks>
         public string ProviderKey
         {
@@ -261,11 +261,11 @@ namespace Tizen.Maps
         /// Creates a reverse geocode search request for given latitude and longitude.
         /// </summary>
         /// <param name="latitude">Latitude of interested place</param>
-        /// <param name="longitute">Longitude of interested place</param>
+        /// <param name="longitude">Longitude of interested place</param>
         /// <returns>Returns ReverseGeocodeRequest object created with location coordinates</returns>
-        public ReverseGeocodeRequest CreateReverseGeocodeRequest(double latitude, double longitute)
+        public ReverseGeocodeRequest CreateReverseGeocodeRequest(double latitude, double longitude)
         {
-            return new ReverseGeocodeRequest(this, latitude, longitute);
+            return new ReverseGeocodeRequest(this, latitude, longitude);
         }
 
         /// <summary>
index 8814536..12c1631 100755 (executable)
@@ -37,11 +37,11 @@ namespace Tizen.Maps
         private Interop.ViewOnEventCallback _viewReadyEventCallback;
 
         private event EventHandler<MapGestureEventArgs> _scrolledEventHandler;
-        private event EventHandler<MapGestureEventArgs> _zoomedEventHandler;
-        private event EventHandler<MapGestureEventArgs> _tappedEventHandler;
-        private event EventHandler<MapGestureEventArgs> _doubleTappedEventHandler;
-        private event EventHandler<MapGestureEventArgs> _twoFingerTappedEventHandler;
-        private event EventHandler<MapGestureEventArgs> _rotatedEventHandler;
+        private event EventHandler<MapGestureEventArgs> _twoFingerZoomedEventHandler;
+        private event EventHandler<MapGestureEventArgs> _clickedEventHandler;
+        private event EventHandler<MapGestureEventArgs> _doubleClickedEventHandler;
+        private event EventHandler<MapGestureEventArgs> _twoFingerClickedEventHandler;
+        private event EventHandler<MapGestureEventArgs> _twoFingerRotatedEventHandler;
         private event EventHandler<MapGestureEventArgs> _longPressedEventHandler;
         private event EventHandler _viewReadyEventHandler;
 
@@ -64,7 +64,7 @@ namespace Tizen.Maps
             this.Resize(1, 1);
 
             // We need to keep Gesture Tap event enabled for object event to work
-            handle.SetGestureEnabled(Interop.ViewGesture.Tap, true);
+            handle.SetGestureEnabled(Interop.ViewGesture.Click, true);
             SetObjectEventCallback();
         }
 
@@ -99,20 +99,20 @@ namespace Tizen.Maps
         /// </summary>
         /// <value>Event handlers to get zoomed gesture event</value>
         /// <exception cref="System.NotSupportedException">Thrown when the required feature is not supported.</exception>
-        public event EventHandler<MapGestureEventArgs> ZoomChanged
+        public event EventHandler<MapGestureEventArgs> TwoFingerZoomed
         {
             add
             {
                 SetGestureEventCallback();
                 handle.SetGestureEnabled(Interop.ViewGesture.Zoom, true);
-                _zoomedEventHandler += value;
-                Log.Info(string.Format("ZoomChanged event handler is added"));
+                _twoFingerZoomedEventHandler += value;
+                Log.Info(string.Format("TwoFingerZoomed event handler is added"));
             }
             remove
             {
-                _zoomedEventHandler -= value;
-                Log.Info(string.Format("ZoomChanged event handler is removed"));
-                if (_zoomedEventHandler == null)
+                _twoFingerZoomedEventHandler -= value;
+                Log.Info(string.Format("TwoFingerZoomed event handler is removed"));
+                if (_twoFingerZoomedEventHandler == null)
                 {
                     handle.SetGestureEnabled(Interop.ViewGesture.Zoom, false);
                     UnsetGestureEventCallback();
@@ -130,17 +130,17 @@ namespace Tizen.Maps
             add
             {
                 SetGestureEventCallback();
-                //handle.SetGestureEnabled(Interop.ViewGesture.Tap, true);
-                _tappedEventHandler += value;
+                //handle.SetGestureEnabled(Interop.ViewGesture.Click, true);
+                _clickedEventHandler += value;
                 Log.Info(string.Format("Clicked event handler is added"));
             }
             remove
             {
-                _tappedEventHandler -= value;
+                _clickedEventHandler -= value;
                 Log.Info(string.Format("Clicked event handler is removed"));
-                if (_tappedEventHandler == null)
+                if (_clickedEventHandler == null)
                 {
-                    //handle.SetGestureEnabled(Interop.ViewGesture.Tap, false);
+                    //handle.SetGestureEnabled(Interop.ViewGesture.Click, false);
                     UnsetGestureEventCallback();
                 }
             }
@@ -156,17 +156,17 @@ namespace Tizen.Maps
             add
             {
                 SetGestureEventCallback();
-                handle.SetGestureEnabled(Interop.ViewGesture.DoubleTap, true);
-                _doubleTappedEventHandler += value;
+                handle.SetGestureEnabled(Interop.ViewGesture.DoubleClick, true);
+                _doubleClickedEventHandler += value;
                 Log.Info(string.Format("DoubleClicked event handler is removed"));
             }
             remove
             {
-                _doubleTappedEventHandler -= value;
+                _doubleClickedEventHandler -= value;
                 Log.Info(string.Format("DoubleClicked event handler is removed"));
-                if (_doubleTappedEventHandler == null)
+                if (_doubleClickedEventHandler == null)
                 {
-                    handle.SetGestureEnabled(Interop.ViewGesture.DoubleTap, false);
+                    handle.SetGestureEnabled(Interop.ViewGesture.DoubleClick, false);
                     UnsetGestureEventCallback();
                 }
             }
@@ -177,22 +177,22 @@ namespace Tizen.Maps
         /// </summary>
         /// <value>Event handlers to get clicked gesture event</value>
         /// <exception cref="System.NotSupportedException">Thrown when the required feature is not supported.</exception>
-        public event EventHandler<MapGestureEventArgs> TwoFingerPressed
+        public event EventHandler<MapGestureEventArgs> TwoFingerClicked
         {
             add
             {
                 SetGestureEventCallback();
-                handle.SetGestureEnabled(Interop.ViewGesture.TwoFingerTap, true);
-                _twoFingerTappedEventHandler += value;
-                Log.Info(string.Format("TwoFingerPressed event handler is added"));
+                handle.SetGestureEnabled(Interop.ViewGesture.TwoFingerClick, true);
+                _twoFingerClickedEventHandler += value;
+                Log.Info(string.Format("TwoFingerClicked event handler is added"));
             }
             remove
             {
-                _twoFingerTappedEventHandler -= value;
-                Log.Info(string.Format("TwoFingerPressed event handler is removed"));
-                if (_twoFingerTappedEventHandler == null)
+                _twoFingerClickedEventHandler -= value;
+                Log.Info(string.Format("TwoFingerClicked event handler is removed"));
+                if (_twoFingerClickedEventHandler == null)
                 {
-                    handle.SetGestureEnabled(Interop.ViewGesture.TwoFingerTap, false);
+                    handle.SetGestureEnabled(Interop.ViewGesture.TwoFingerClick, false);
                     UnsetGestureEventCallback();
                 }
             }
@@ -203,22 +203,22 @@ namespace Tizen.Maps
         /// </summary>
         /// <value>Event handlers to get rotated gesture event</value>
         /// <exception cref="System.NotSupportedException">Thrown when the required feature is not supported.</exception>
-        public event EventHandler<MapGestureEventArgs> Rotated
+        public event EventHandler<MapGestureEventArgs> TwoFingerRotated
         {
             add
             {
                 SetGestureEventCallback();
-                handle.SetGestureEnabled(Interop.ViewGesture.Rotate, true);
-                _rotatedEventHandler += value;
+                handle.SetGestureEnabled(Interop.ViewGesture.Rotation, true);
+                _twoFingerRotatedEventHandler += value;
                 Log.Info(string.Format("Rotated event handler is added"));
             }
             remove
             {
-                _rotatedEventHandler -= value;
+                _twoFingerRotatedEventHandler -= value;
                 Log.Info(string.Format("Rotated event handler is removed"));
-                if (_rotatedEventHandler == null)
+                if (_twoFingerRotatedEventHandler == null)
                 {
-                    handle.SetGestureEnabled(Interop.ViewGesture.Rotate, false);
+                    handle.SetGestureEnabled(Interop.ViewGesture.Rotation, false);
                     UnsetGestureEventCallback();
                 }
             }
@@ -648,11 +648,11 @@ namespace Tizen.Maps
                     switch (eventArg.GestureType)
                     {
                         case GestureType.Scroll: _scrolledEventHandler?.Invoke(this, eventArg); break;
-                        case GestureType.Zoom: _zoomedEventHandler?.Invoke(this, eventArg); break;
-                        case GestureType.Tap: _tappedEventHandler?.Invoke(this, eventArg); break;
-                        case GestureType.DoubleTap: _doubleTappedEventHandler?.Invoke(this, eventArg); break;
-                        case GestureType.TwoFingerTap: _twoFingerTappedEventHandler?.Invoke(this, eventArg); break;
-                        case GestureType.Rotate: _rotatedEventHandler?.Invoke(this, eventArg); break;
+                        case GestureType.Zoom: _twoFingerZoomedEventHandler?.Invoke(this, eventArg); break;
+                        case GestureType.Click: _clickedEventHandler?.Invoke(this, eventArg); break;
+                        case GestureType.DoubleClick: _doubleClickedEventHandler?.Invoke(this, eventArg); break;
+                        case GestureType.TwoFingerClick: _twoFingerClickedEventHandler?.Invoke(this, eventArg); break;
+                        case GestureType.Rotation: _twoFingerRotatedEventHandler?.Invoke(this, eventArg); break;
                         case GestureType.LongPress: _longPressedEventHandler?.Invoke(this, eventArg); break;
                     }
                 };
@@ -663,9 +663,9 @@ namespace Tizen.Maps
 
         private void UnsetGestureEventCallback()
         {
-            if (_scrolledEventHandler != null || _zoomedEventHandler != null
-                || _tappedEventHandler != null || _doubleTappedEventHandler != null
-                || _twoFingerTappedEventHandler != null || _rotatedEventHandler != null
+            if (_scrolledEventHandler != null || _twoFingerZoomedEventHandler != null
+                || _clickedEventHandler != null || _doubleClickedEventHandler != null
+                || _twoFingerClickedEventHandler != null || _twoFingerRotatedEventHandler != null
                 || _longPressedEventHandler != null)
             {
                 return;
@@ -686,12 +686,12 @@ namespace Tizen.Maps
                     var eventArg = new Interop.ObjectEventDataHandle(eventData);
                     switch (eventArg.GestureType)
                     {
-                        case Interop.ViewGesture.Tap:
-                            {
-                                var mapObject = _handleToObjectTable[eventArg.ViewObject];
-                                mapObject?.HandleClickedEvent();
-                                break;
-                            }
+                        case Interop.ViewGesture.Click:
+                        {
+                            var mapObject = _handleToObjectTable[eventArg.ViewObject];
+                            mapObject?.HandleClickedEvent();
+                            break;
+                        }
                     }
                 };
                 handle.SetEventCb(Interop.ViewEventType.Object, _objectEventCallback, IntPtr.Zero);
index e9c9fb9..6c90609 100755 (executable)
@@ -192,6 +192,7 @@ namespace Tizen.Maps
         /// <summary>
         /// Returns a string that represents this object.
         /// </summary>
+        /// <returns>Returns a string which presents this object.</returns>
         public override string ToString()
         {
             return $"{Freetext}";
index 0e5d65f..89230cf 100755 (executable)
@@ -57,6 +57,7 @@ namespace Tizen.Maps
         /// <summary>
         /// Returns a string that represents this object.
         /// </summary>
+        /// <returns>Returns a string which presents this object.</returns>
         public override string ToString()
         {
             return $"{Label}: {Text}";
index acbb1f0..dae19e5 100755 (executable)
@@ -70,6 +70,7 @@ namespace Tizen.Maps
         /// <summary>
         /// Returns a string that represents this object.
         /// </summary>
+        /// <returns>Returns a string which presents this object.</returns>
         public override string ToString()
         {
             return $"{Name}";
index e06ed72..b542ca6 100755 (executable)
@@ -57,6 +57,7 @@ namespace Tizen.Maps
         /// <summary>
         /// Returns a string that represents this object.
         /// </summary>
+        /// <returns>Returns a string which presents this object.</returns>
         public override string ToString()
         {
             return $"{Label}: {Value}";
index 4a702a3..9e11380 100755 (executable)
@@ -56,6 +56,7 @@ namespace Tizen.Maps
         /// <summary>
         /// Returns a string that represents this object.
         /// </summary>
+        /// <returns>Returns a string which presents this object.</returns>
         public override string ToString()
         {
             return $"{Description}";
index 617fcb5..99a8789 100755 (executable)
@@ -45,6 +45,7 @@ namespace Tizen.Maps
         /// <summary>
         /// Returns a string that represents this object.
         /// </summary>
+        /// <returns>Returns a string which presents this object.</returns>
         public override string ToString()
         {
             return $"{Average}({UserCount} reviews)";
index b1522b0..58f053d 100755 (executable)
@@ -54,6 +54,9 @@ namespace Tizen.Maps
         /// </summary>
         public event EventHandler Clicked;
 
+        /// <summary>
+        /// Gets or sets visibility for the polyline.
+        /// </summary>
         public override bool IsVisible
         {
             get { return handle.IsVisible; }