[NUI] Add AliveCount property to get currently alived View number
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / View.cs
index 2dc6cb6..947edad 100755 (executable)
@@ -71,33 +71,21 @@ namespace Tizen.NUI.BaseComponents
         private Size2D internalSize2D = null;
         private int layoutCount = 0;
         private ControlState propagatableControlStates = ControlState.All;
-        private bool dispatchTouchEvents = true;
-
-#if NUI_PROPERTY_CHANGE_DEBUG
-internal static int LayoutSetGetter = 0;
-internal static int SizeGetter = 0;
-internal static int SizeSetter = 0;
-internal static int Size2DGetter = 0;
-internal static int Size2DSetter = 0;
-internal static int MaximumSizeGetter = 0;
-internal static int MaximumSizeSetter = 0;
-internal static int MinimumSizeGetter = 0;
-internal static int MinimumSizeSetter = 0;
-internal static int PositionGetter = 0;
-internal static int PositionSetter = 0;
-internal static int Position2DGetter = 0;
-internal static int Position2DSetter = 0;
-internal static int SizeWidthGetter = 0;
-internal static int SizeWidthSetter = 0;
-internal static int SizeHeightGetter = 0;
-internal static int SizeHeightSetter = 0;
-internal static int PositionXGetter = 0;
-internal static int PositionXSetter = 0;
-internal static int PositionYGetter = 0;
-internal static int PositionYSetter = 0;
-internal static int PositionZGetter = 0;
-internal static int PositionZSetter = 0;
-#endif
+
+        private string internalName = string.Empty;
+        private Position internalCurrentParentOrigin = null;
+        private Position internalCurrentAnchorPoint = null;
+        private Vector3 internalTargetSize = null;
+        private Size2D internalCurrentSize = null;
+        private Position internalCurrentPosition = null;
+        private Vector3 internalCurrentWorldPosition = null;
+        private Vector3 internalCurrentScale = null;
+        private Vector3 internalCurrentWorldScale = null;
+        private Vector4 internalCurrentColor = null;
+        private Vector4 internalCurrentWorldColor = null;
+        private Vector2 internalCurrentScreenPosition = null;
+
+        private static int aliveCount = 0;
 
         static View()
         {
@@ -119,11 +107,65 @@ internal static int PositionZSetter = 0;
             RegisterAccessibilityDelegate();
         }
 
+        static internal new void Preload()
+        {
+            Container.Preload();
+
+            // Do nothing. Just call for load static values.
+            var temporalPositionPropertyGroup = positionPropertyGroup;
+            var temporalSizePropertyGroup = sizePropertyGroup;
+            var temporalScalePropertyGroup = scalePropertyGroup;
+        }
+
+        /// <summary>
+        /// Accessibility mode for controlling View's Accessible implementation.
+        /// It is only relevant when deriving custom controls from View directly,
+        /// as classes derived from CustomView (or any of its subclasses) get the
+        /// Custom mode by default.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public enum ViewAccessibilityMode
+        {
+            /// <summary>
+            /// Default accessibility implementation. Overriding View.Accessibility...()
+            /// virtual methods will have no effect.
+            /// </summary>
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Default,
+            /// <summary>
+            /// Custom accessibility implementation. Overriding View.Accessibility...()
+            /// will be necessary to provide accessibility support for the View.
+            /// </summary>
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Custom,
+        }
+
+        private static IntPtr NewWithAccessibilityMode(ViewAccessibilityMode accessibilityMode)
+        {
+            switch (accessibilityMode)
+            {
+                case ViewAccessibilityMode.Custom:
+                {
+                    return Interop.View.NewCustom();
+                }
+                case ViewAccessibilityMode.Default:
+                default:
+                {
+                    return Interop.View.New();
+                }
+            }
+        }
+
         /// <summary>
         /// Creates a new instance of a view.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        public View() : this(Interop.View.New(), true)
+        public View() : this(ViewAccessibilityMode.Default)
+        {
+        }
+
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public View(ViewAccessibilityMode accessibilityMode) : this(NewWithAccessibilityMode(accessibilityMode), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
@@ -146,44 +188,30 @@ internal static int PositionZSetter = 0;
             SetVisible(shown);
         }
 
-        internal View(View uiControl, bool shown = true) : this(Interop.View.NewView(View.getCPtr(uiControl)), true)
+        internal View(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : this(cPtr, cMemoryOwn, shown)
         {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            if (!shown)
-            {
-                SetVisible(false);
-            }
-
-            backgroundExtraData = uiControl.backgroundExtraData == null ? null : new BackgroundExtraData(uiControl.backgroundExtraData);
+            InitializeStyle(viewStyle);
         }
 
-        internal View(global::System.IntPtr cPtr, bool cMemoryOwn, ViewStyle viewStyle, bool shown = true) : this(cPtr, cMemoryOwn, shown)
+        internal View(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : this(cPtr, cMemoryOwn, shown, cMemoryOwn)
         {
-            InitializeStyle(viewStyle);
         }
 
-        internal View(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown = true) : base(cPtr, cMemoryOwn)
+        internal View(global::System.IntPtr cPtr, bool cMemoryOwn, bool shown, bool cRegister) : base(cPtr, cMemoryOwn, cRegister)
         {
             if (HasBody())
             {
                 PositionUsesPivotPoint = false;
+                GrabTouchAfterLeave = defaultGrabTouchAfterLeave;
+                AllowOnlyOwnTouch = defaultAllowOnlyOwnTouch;
             }
 
-            onWindowSendEventCallback = SendViewAddedEventToWindow;
-            using ViewSignal signal = new ViewSignal(Interop.ActorSignal.ActorOnSceneSignal(SwigCPtr), false);
-            signal?.Connect(onWindowSendEventCallback);
-
-            hitTestResultDataCallback = OnHitTestResult;
-            using TouchDataSignal touchDataSignal = new TouchDataSignal(Interop.ActorSignal.ActorHitTestResultSignal(SwigCPtr), false);
-            touchDataSignal?.Connect(hitTestResultDataCallback);
-
             if (!shown)
             {
                 SetVisible(false);
             }
 
-            GrabTouchAfterLeave = defaultGrabTouchAfterLeave;
-            AllowOnlyOwnTouch = defaultAllowOnlyOwnTouch;
+            aliveCount++;
         }
 
         internal View(ViewImpl implementation, bool shown = true) : this(Interop.View.NewViewInternal(ViewImpl.getCPtr(implementation)), true)
@@ -214,9 +242,6 @@ internal static int PositionZSetter = 0;
         {
             get
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-LayoutSetGetter++;
-#endif
                 return layoutSet;
             }
         }
@@ -838,12 +863,24 @@ LayoutSetGetter++;
             {
                 using (var propertyValue = GetProperty(Property.TOOLTIP))
                 {
-                    if (propertyValue != null && propertyValue.Get(out string retrivedValue))
+                    using var propertyMap = new PropertyMap();
+                    if (propertyValue != null && propertyValue.Get(propertyMap))
                     {
-                        return retrivedValue;
+                        using var retrivedContentValue = propertyMap?.Find(NDalic.TooltipContent);
+                        if (retrivedContentValue != null)
+                        {
+                            using var contextPropertyMap = new PropertyMap();
+                            if (retrivedContentValue.Get(contextPropertyMap))
+                            {
+                                using var retrivedTextValue = contextPropertyMap?.Find(NDalic.TextVisualText);
+                                if (retrivedTextValue != null && retrivedTextValue.Get(out string retrivedValue))
+                                {
+                                    return retrivedValue;
+                                }
+                            }
+                        }
                     }
-                    NUILog.Error($"[ERROR] Fail to get TooltipText! Return error MSG (error to get TooltipText)!");
-                    return "error to get TooltipText";
+                    return "";
                 }
             }
             set
@@ -1210,7 +1247,7 @@ LayoutSetGetter++;
         /// <remarks>
         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
         /// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
-        /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time, 
+        /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
         /// and users can get the current actual values through them.
         /// </remarks>
         /// <since_tizen> 3 </since_tizen>
@@ -1247,10 +1284,6 @@ LayoutSetGetter++;
         {
             get
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-Size2DGetter++;
-#endif
-
                 var temp = (Size2D)GetValue(Size2DProperty);
 
                 if (this.Layout == null)
@@ -1263,10 +1296,6 @@ Size2DGetter++;
             }
             set
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-Size2DSetter++;
-#endif
-
                 SetValue(Size2DProperty, value);
 
                 NotifyPropertyChanged();
@@ -1280,7 +1309,7 @@ Size2DSetter++;
         /// <remarks>
         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
         /// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
-        /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time, 
+        /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
         /// and users can get the current actual values through them.
         /// </remarks>
         /// <since_tizen> 3 </since_tizen>
@@ -1341,18 +1370,10 @@ Size2DSetter++;
         {
             get
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-Position2DGetter++;
-#endif
-
                 return (Position2D)GetValue(Position2DProperty);
             }
             set
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-Position2DSetter++;
-#endif
-
                 SetValue(Position2DProperty, value);
                 NotifyPropertyChanged();
             }
@@ -1366,11 +1387,24 @@ Position2DSetter++;
         {
             get
             {
-                Vector2 temp = new Vector2(0.0f, 0.0f);
-                var pValue = GetProperty(View.Property.ScreenPosition);
-                pValue.Get(temp);
-                pValue.Dispose();
-                return temp;
+                return GetCurrentScreenPosition();
+            }
+        }
+
+        /// <summary>
+        /// Retrieves the screen position and size of the view.<br />
+        /// </summary>
+        /// <remarks>
+        /// The float type Rectangle class is not ready yet.
+        /// Therefore, it transmits data in Vector4 class.
+        /// This type should later be changed to the appropriate data type.
+        /// </remarks>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public Vector4 ScreenPositionSize
+        {
+            get
+            {
+                return GetCurrentScreenPositionSize();
             }
         }
 
@@ -1422,17 +1456,11 @@ Position2DSetter++;
         {
             get
             {
-                bool temp = false;
-                var pValue = GetProperty(View.Property.PositionUsesAnchorPoint);
-                pValue.Get(out temp);
-                pValue.Dispose();
-                return temp;
+                return Object.InternalGetPropertyBool(SwigCPtr, View.Property.PositionUsesAnchorPoint);
             }
             set
             {
-                var temp = new Tizen.NUI.PropertyValue(value);
-                SetProperty(View.Property.PositionUsesAnchorPoint, temp);
-                temp.Dispose();
+                Object.InternalSetPropertyBool(SwigCPtr, View.Property.PositionUsesAnchorPoint, value);
                 NotifyPropertyChanged();
             }
         }
@@ -1517,9 +1545,12 @@ Position2DSetter++;
             {
                 Vector3 temp = GetNaturalSize();
                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw new InvalidOperationException("FATAL: get Exception", NDalicPINVOKE.SWIGPendingException.Retrieve());
-
-                Size2D sz = new Size2D((int)temp.Width, (int)temp.Height);
-                temp.Dispose();
+                Size2D sz = null;
+                if (temp != null)
+                {
+                    sz = new Size2D((int)temp.Width, (int)temp.Height);
+                    temp.Dispose();
+                }
                 return sz;
             }
         }
@@ -1598,18 +1629,10 @@ Position2DSetter++;
         {
             get
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-SizeWidthGetter++;
-#endif
-
                 return (float)GetValue(SizeWidthProperty);
             }
             set
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-SizeWidthSetter++;
-#endif
-
                 SetValue(SizeWidthProperty, value);
                 NotifyPropertyChanged();
             }
@@ -1631,18 +1654,10 @@ SizeWidthSetter++;
         {
             get
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-SizeHeightGetter++;
-#endif
-
                 return (float)GetValue(SizeHeightProperty);
             }
             set
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-SizeHeightSetter++;
-#endif
-
                 SetValue(SizeHeightProperty, value);
                 NotifyPropertyChanged();
             }
@@ -1678,18 +1693,10 @@ SizeHeightSetter++;
         {
             get
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-PositionGetter++;
-#endif
-
                 return (Position)GetValue(PositionProperty);
             }
             set
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-PositionSetter++;
-#endif
-
                 SetValue(PositionProperty, value);
                 NotifyPropertyChanged();
             }
@@ -1711,16 +1718,10 @@ PositionSetter++;
         {
             get
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-PositionXGetter++;
-#endif
                 return (float)GetValue(PositionXProperty);
             }
             set
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-PositionXSetter++;
-#endif
                 SetValue(PositionXProperty, value);
                 NotifyPropertyChanged();
             }
@@ -1742,16 +1743,10 @@ PositionXSetter++;
         {
             get
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-PositionYGetter++;
-#endif
                 return (float)GetValue(PositionYProperty);
             }
             set
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-PositionYSetter++;
-#endif
                 SetValue(PositionYProperty, value);
                 NotifyPropertyChanged();
             }
@@ -1773,18 +1768,10 @@ PositionYSetter++;
         {
             get
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-PositionZGetter++;
-#endif
-
                 return (float)GetValue(PositionZProperty);
             }
             set
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-PositionZSetter++;
-#endif
-
                 SetValue(PositionZProperty, value);
                 NotifyPropertyChanged();
             }
@@ -1798,11 +1785,7 @@ PositionZSetter++;
         {
             get
             {
-                Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
-                var pValue = GetProperty(View.Property.WorldPosition);
-                pValue.Get(temp);
-                pValue.Dispose();
-                return temp;
+                return GetCurrentWorldPosition();
             }
         }
 
@@ -1971,11 +1954,7 @@ PositionZSetter++;
         {
             get
             {
-                Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
-                var pValue = GetProperty(View.Property.WorldScale);
-                pValue.Get(temp);
-                pValue.Dispose();
-                return temp;
+                return GetCurrentWorldScale();
             }
         }
 
@@ -1999,11 +1978,7 @@ PositionZSetter++;
         {
             get
             {
-                bool temp = false;
-                var pValue = GetProperty(View.Property.VISIBLE);
-                pValue.Get(out temp);
-                pValue.Dispose();
-                return temp;
+                return Object.InternalGetPropertyBool(SwigCPtr, View.Property.VISIBLE);
             }
         }
 
@@ -2015,11 +1990,7 @@ PositionZSetter++;
         {
             get
             {
-                Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
-                var pValue = GetProperty(View.Property.WorldColor);
-                pValue.Get(temp);
-                pValue.Dispose();
-                return temp;
+                return GetCurrentWorldColor();
             }
         }
 
@@ -2348,16 +2319,10 @@ PositionZSetter++;
         {
             get
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-MinimumSizeGetter++;
-#endif
                 return (Size2D)GetValue(MinimumSizeProperty);
             }
             set
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-MinimumSizeSetter++;
-#endif
                 if (value == null)
                 {
                     throw new ArgumentNullException(nameof(value));
@@ -2394,16 +2359,10 @@ MinimumSizeSetter++;
         {
             get
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-MaximumSizeGetter++;
-#endif
                 return (Size2D)GetValue(MaximumSizeProperty);
             }
             set
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-MaximumSizeSetter++;
-#endif
                 // We don't have Layout.Maximum(Width|Height) so we cannot apply it to layout.
                 // MATCH_PARENT spec + parent container size can be used to limit
                 if (layout != null)
@@ -2492,19 +2451,11 @@ MaximumSizeSetter++;
         {
             get
             {
-                Position temp = new Position(0.0f, 0.0f, 0.0f);
-                var pValue = GetProperty(View.Property.AnchorPoint);
-                pValue.Get(temp);
-                pValue.Dispose();
-                Position ret = new Position(OnAnchorPointChanged, temp.X, temp.Y, temp.Z);
-                temp.Dispose();
-                return ret;
+                return GetCurrentAnchorPoint();
             }
             set
             {
-                var temp = new Tizen.NUI.PropertyValue(value);
-                SetProperty(View.Property.AnchorPoint, temp);
-                temp.Dispose();
+                SetAnchorPoint(value);
                 NotifyPropertyChanged();
             }
         }
@@ -2540,16 +2491,10 @@ MaximumSizeSetter++;
         {
             get
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-SizeGetter++;
-#endif
                 return (Size)GetValue(SizeProperty);
             }
             set
             {
-#if NUI_PROPERTY_CHANGE_DEBUG
-SizeSetter++;
-#endif
                 SetValue(SizeProperty, value);
                 NotifyPropertyChanged();
             }
@@ -2706,11 +2651,7 @@ SizeSetter++;
                 widthPolicy = value;
                 if (widthPolicy >= 0)
                 {
-                    if (heightPolicy >= 0) // Policy an exact value
-                    {
-                        // Create Size2D only both _widthPolicy and _heightPolicy are set.
-                        Size2D = new Size2D(widthPolicy, heightPolicy);
-                    }
+                    SizeWidth = widthPolicy;
                 }
                 layout?.RequestLayout();
             }
@@ -2763,11 +2704,7 @@ SizeSetter++;
                 heightPolicy = value;
                 if (heightPolicy >= 0)
                 {
-                    if (widthPolicy >= 0) // Policy an exact value
-                    {
-                        // Create Size2D only both _widthPolicy and _heightPolicy are set.
-                        Size2D = new Size2D(widthPolicy, heightPolicy);
-                    }
+                    SizeHeight = heightPolicy;
                 }
                 layout?.RequestLayout();
             }
@@ -3175,12 +3112,7 @@ SizeSetter++;
             {
                 backgroundImageSynchronousLoading = value;
 
-                string bgUrl = null;
-                var pValue = Background.Find(ImageVisualProperty.URL);
-                pValue?.Get(out bgUrl);
-                pValue?.Dispose();
-
-                if (!string.IsNullOrEmpty(bgUrl))
+                if (!string.IsNullOrEmpty(BackgroundImage))
                 {
                     PropertyMap bgMap = this.Background;
                     var temp = new PropertyValue(backgroundImageSynchronousLoading);
@@ -3309,17 +3241,22 @@ SizeSetter++;
         {
             get
             {
-                bool temp = false;
-                var pValue = GetProperty(View.Property.CaptureAllTouchAfterStart);
-                pValue.Get(out temp);
-                pValue.Dispose();
-                return temp;
+                return Object.InternalGetPropertyBool(SwigCPtr, View.Property.CaptureAllTouchAfterStart);
             }
             set
             {
-                var temp = new Tizen.NUI.PropertyValue(value);
-                SetProperty(View.Property.CaptureAllTouchAfterStart, temp);
-                temp.Dispose();
+                Object.InternalSetPropertyBool(SwigCPtr, View.Property.CaptureAllTouchAfterStart, value);
+
+                // Use custom HitTest callback only if GrabTouchAfterLeave is true.
+                if (value)
+                {
+                    RegisterHitTestCallback();
+                }
+                else
+                {
+                    UnregisterHitTestCallback();
+                }
+
                 NotifyPropertyChanged();
             }
         }
@@ -3345,17 +3282,11 @@ SizeSetter++;
         {
             get
             {
-                bool temp = false;
-                var pValue = GetProperty(View.Property.AllowOnlyOwnTouch);
-                pValue.Get(out temp);
-                pValue.Dispose();
-                return temp;
+                return Object.InternalGetPropertyBool(SwigCPtr, View.Property.AllowOnlyOwnTouch);
             }
             set
             {
-                var temp = new Tizen.NUI.PropertyValue(value);
-                SetProperty(View.Property.AllowOnlyOwnTouch, temp);
-                temp.Dispose();
+                Object.InternalSetPropertyBool(SwigCPtr, View.Property.AllowOnlyOwnTouch, value);
                 NotifyPropertyChanged();
             }
         }
@@ -3382,17 +3313,11 @@ SizeSetter++;
         {
             get
             {
-                int temp = 0;
-                var pValue = GetProperty(View.Property.BlendEquation);
-                pValue.Get(out temp);
-                pValue.Dispose();
-                return (BlendEquationType)temp;
+                return (BlendEquationType)Object.InternalGetPropertyInt(SwigCPtr, View.Property.BlendEquation);
             }
             set
             {
-                var temp = new Tizen.NUI.PropertyValue((int)value);
-                SetProperty(View.Property.BlendEquation, temp);
-                temp.Dispose();
+                Object.InternalSetPropertyInt(SwigCPtr, View.Property.BlendEquation, (int)value);
                 NotifyPropertyChanged();
             }
         }
@@ -3502,11 +3427,7 @@ SizeSetter++;
         {
             get
             {
-                bool temp = false;
-                var pValue = GetProperty(View.Property.Culled);
-                pValue.Get(out temp);
-                pValue.Dispose();
-                return temp;
+                return Object.InternalGetPropertyBool(SwigCPtr, View.Property.Culled);
             }
         }
 
@@ -3541,61 +3462,6 @@ SizeSetter++;
         }
 
         /// <summary>
-        /// Gets or sets the status of whether the view should emit key event signals.
-        /// If a View's DispatchKeyEvents is set to false, then it's children will not emit a key event signal either.
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public bool DispatchKeyEvents
-        {
-            get
-            {
-                return (bool)GetValue(DispatchKeyEventsProperty);
-            }
-            set
-            {
-                SetValue(DispatchKeyEventsProperty, value);
-                NotifyPropertyChanged();
-            }
-        }
-
-        /// <summary>
-        /// Gets or sets the status of whether touch events can be dispatched.
-        /// If a View's DispatchTouchEvents is set to false, then it's can not will receive touch and parents will not receive a touch event signal either.
-        /// This works without adding a TouchEvent callback in the View.
-        /// <note>
-        /// If the <see cref="Tizen.NUI.BaseComponents.View.Sensitive"/> is a property that determines whether or not to be hittable, then this property prevents the propagation of the hit touch event.
-        /// </note>
-        /// </summary>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public bool DispatchTouchEvents
-        {
-            get
-            {
-                return dispatchTouchEvents;
-            }
-            set
-            {
-                if (dispatchTouchEvents != value)
-                {
-                    dispatchTouchEvents = value;
-                    if (dispatchTouchEvents == false)
-                    {
-                        TouchEvent += OnDispatchTouchEvent;
-                    }
-                    else
-                    {
-                        TouchEvent -= OnDispatchTouchEvent;
-                    }
-                }
-            }
-        }
-
-        private bool OnDispatchTouchEvent(object source, View.TouchEventArgs e)
-        {
-            return true;
-        }
-
-        /// <summary>
         /// Called when the view is hit through TouchEvent or GestureEvent.
         /// If it returns true, it means that it was hit, and the touch/gesture event is called from the view.
         /// If it returns false, it means that it will not be hit, and the hit-test continues to the next view.
@@ -3616,7 +3482,7 @@ SizeSetter++;
         /// <remarks>
         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
         /// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
-        /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time, 
+        /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
         /// and users can get the current actual values through them.
         /// </remarks>
         [EditorBrowsable(EditorBrowsableState.Never)]
@@ -3628,11 +3494,17 @@ SizeSetter++;
         /// <remarks>
         /// The <see cref="Size"/>, <see cref="Position"/>, <see cref="Color"/>, and <see cref="Scale"/> properties are set in the main thread.
         /// Therefore, it is not updated in real time when the value is changed in the render thread (for example, the value is changed during animation).
-        /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time, 
+        /// However, <see cref="CurrentSize"/>, <see cref="CurrentPosition"/>, <see cref="CurrentColor"/>, and <see cref="CurrentScale"/> properties are updated in real time,
         /// and users can get the current actual values through them.
         /// </remarks>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public Vector3 CurrentScale => GetCurrentScale();
 
+        /// <summary>
+        /// Gets the number of currently alived View object.
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static int AliveCount => aliveCount;
+
     }
 }