Support for as keyword instead of DownCast
authorUmar <m.umar@partner.samsung.com>
Fri, 23 Jun 2017 16:14:50 +0000 (17:14 +0100)
committerUmar <m.umar@partner.samsung.com>
Fri, 23 Jun 2017 17:23:42 +0000 (18:23 +0100)
Change-Id: I81ce0ec9639b6759f7cb02213e78b547260a6deb

74 files changed:
NUISamples/NUISamples/NUISamples.TizenTV/examples/control-dashboard.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/dali-test.cs
NUISamples/NUISamples/NUISamples.TizenTV/examples/date-picker-using-json/date-picker-using-json.cs
src/Tizen.NUI/src/internal/AccessibilityManager.cs
src/Tizen.NUI/src/internal/Alignment.cs
src/Tizen.NUI/src/internal/CustomAlgorithmInterface.cs
src/Tizen.NUI/src/internal/GaussianBlurView.cs
src/Tizen.NUI/src/internal/ItemView.cs
src/Tizen.NUI/src/internal/LongPressGestureDetector.cs
src/Tizen.NUI/src/internal/Model3dView.cs
src/Tizen.NUI/src/internal/NDalicPINVOKE.cs
src/Tizen.NUI/src/internal/PageTurnLandscapeView.cs
src/Tizen.NUI/src/internal/PageTurnPortraitView.cs
src/Tizen.NUI/src/internal/PageTurnView.cs
src/Tizen.NUI/src/internal/PanGestureDetector.cs
src/Tizen.NUI/src/internal/PinchGestureDetector.cs
src/Tizen.NUI/src/internal/Registry.cs
src/Tizen.NUI/src/internal/Slider.cs
src/Tizen.NUI/src/internal/TapGestureDetector.cs
src/Tizen.NUI/src/public/AlphaFunction.cs
src/Tizen.NUI/src/public/Animation.cs
src/Tizen.NUI/src/public/BaseComponents/ImageView.cs
src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs
src/Tizen.NUI/src/public/BaseComponents/TextField.cs
src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs
src/Tizen.NUI/src/public/BaseComponents/View.cs
src/Tizen.NUI/src/public/BaseHandle.cs
src/Tizen.NUI/src/public/Color.cs
src/Tizen.NUI/src/public/Degree.cs
src/Tizen.NUI/src/public/FlexContainer.cs
src/Tizen.NUI/src/public/FocusManager.cs
src/Tizen.NUI/src/public/Geometry.cs
src/Tizen.NUI/src/public/Gesture.cs
src/Tizen.NUI/src/public/Hover.cs
src/Tizen.NUI/src/public/Key.cs
src/Tizen.NUI/src/public/KeyFrames.cs
src/Tizen.NUI/src/public/Layer.cs
src/Tizen.NUI/src/public/Position.cs
src/Tizen.NUI/src/public/Position2D.cs
src/Tizen.NUI/src/public/ProgressBar.cs
src/Tizen.NUI/src/public/Property.cs
src/Tizen.NUI/src/public/PropertyBuffer.cs
src/Tizen.NUI/src/public/Radian.cs
src/Tizen.NUI/src/public/Rectangle.cs
src/Tizen.NUI/src/public/RelativeVector2.cs
src/Tizen.NUI/src/public/RelativeVector3.cs
src/Tizen.NUI/src/public/RelativeVector4.cs
src/Tizen.NUI/src/public/RelayoutContainer.cs
src/Tizen.NUI/src/public/Renderer.cs
src/Tizen.NUI/src/public/Rotation.cs
src/Tizen.NUI/src/public/Sampler.cs
src/Tizen.NUI/src/public/Scrollable.cs
src/Tizen.NUI/src/public/Shader.cs
src/Tizen.NUI/src/public/Size2D.cs
src/Tizen.NUI/src/public/StyleManager.cs
src/Tizen.NUI/src/public/TableView.cs
src/Tizen.NUI/src/public/Texture.cs
src/Tizen.NUI/src/public/TextureSet.cs
src/Tizen.NUI/src/public/Timer.cs
src/Tizen.NUI/src/public/TransitionData.cs
src/Tizen.NUI/src/public/UIComponents/Button.cs
src/Tizen.NUI/src/public/UIComponents/CheckBoxButton.cs
src/Tizen.NUI/src/public/UIComponents/Popup.cs
src/Tizen.NUI/src/public/UIComponents/PushButton.cs
src/Tizen.NUI/src/public/UIComponents/RadioButton.cs
src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs
src/Tizen.NUI/src/public/UIComponents/ScrollView.cs
src/Tizen.NUI/src/public/UIComponents/ToggleButton.cs
src/Tizen.NUI/src/public/Vector2.cs
src/Tizen.NUI/src/public/Vector3.cs
src/Tizen.NUI/src/public/Vector4.cs
src/Tizen.NUI/src/public/VideoView.cs
src/Tizen.NUI/src/public/ViewWrapper.cs
src/Tizen.NUI/src/public/Wheel.cs

index d876810..d76e91a 100644 (file)
@@ -123,7 +123,7 @@ namespace ControlDashboard
         {
             if (!e.ProposedView && !e.CurrentView)
             {
-                e.ProposedView = View.DownCast(_contentContainer.GetChildAt(1));
+                e.ProposedView = _contentContainer.GetChildAt(1);
             }
             return e.ProposedView;
         }
@@ -336,7 +336,7 @@ namespace ControlDashboard
                     {
                         _window.Add(_popup);
                         _popup.SetDisplayState(Popup.DisplayStateType.Shown);
-                        FocusManager.Instance.SetCurrentFocusView(View.DownCast((_popup.FindChildByName("Footer")).FindChildByName("OKButton")));
+                        FocusManager.Instance.SetCurrentFocusView((_popup.FindChildByName("Footer")).FindChildByName("OKButton"));
                         return true;
                     };
                     _contentContainer.AddChild(button, new TableView.CellPosition(((uint)idx / 5) * 2 + 1, (uint)idx % 5));
index 6a43310..be7571d 100755 (executable)
@@ -608,8 +608,8 @@ namespace DaliTest
             view2.Focusable = true;
             view1.RightFocusableView = view2;
             view2.LeftFocusableView = view1;
-            Window.Add(view1);
-            Window.Add(view2);
+            Window.Instance.Add(view1);
+            Window.Instance.Add(view2);
             FocusManager.Instance.SetCurrentFocusView(view1);
 
             PushButton button = new PushButton();
@@ -627,7 +627,7 @@ namespace DaliTest
                 FocusManager.Instance.MoveFocusBackward();
                 return true;
             };
-            Window.Add(button);
+            Window.Instance.Add(button);
         }
 
         public void WindowDevelPropertyTest()
@@ -748,7 +748,7 @@ namespace DaliTest
           View myLabelView  = container.FindChildByName("MyLabelName");
           if(myLabelView)
           {
-            TextLabel newLabel = View.DownCast<TextLabel>(myLabelView);
+            TextLabel newLabel = myLabelView as TextLabel;
             if(newLabel)
             {
               Tizen.Log.Debug("NUI", "Downcast to TextLabel successful: newLabel Name = " + newLabel.Name + ", Text = " + newLabel.Text);
@@ -772,7 +772,7 @@ namespace DaliTest
           View myViewView  = container.FindChildByName("MyViewName");
           if(myViewView)
           {
-            MyView newView = View.DownCast<MyView>(myViewView);
+            MyView newView = myViewView as MyView;
             if(newView)
             {
               Tizen.Log.Debug("NUI", "Downcast to MyView successful: newView Name = " + newView.Name + ", MyOwnName = " + newView.MyOwnName + ", myCurrentValue = " + newView._myCurrentValue);
@@ -797,7 +797,7 @@ namespace DaliTest
           View myButtonView  = container.FindChildByName("MyButtonName");
           if(myButtonView)
           {
-            MyButton newButton = View.DownCast<MyButton>(myButtonView);
+            MyButton newButton = myButtonView as MyButton;
             if(newButton)
             {
               Tizen.Log.Debug("NUI", "Downcast to MyButton successful: newButton Name = " + newButton.Name + ", MyOwnName = " + newButton.MyOwnName + ", LabelText = " + myButton.LabelText + ", myCurrentValue = " + newButton._myCurrentValue);
@@ -820,7 +820,7 @@ namespace DaliTest
           View spinView  = container.FindChildByName("SpinName");
           if(spinView)
           {
-            Spin newSpin = View.DownCast<Spin>(spinView);
+            Spin newSpin = spinView as Spin;
             if(newSpin)
             {
               Tizen.Log.Debug("NUI", "Downcast to Spin successful: newSpin Name = " + newSpin.Name + ", MaxValue = " + newSpin.MaxValue);
@@ -845,7 +845,7 @@ namespace DaliTest
           View mySpinView  = container.FindChildByName("MySpinName");
           if(mySpinView)
           {
-            MySpin newSpin = View.DownCast<MySpin>(mySpinView);
+            MySpin newSpin = mySpinView as MySpin;
             if(newSpin)
             {
               Tizen.Log.Debug("NUI", "Downcast to MySpin successful: newSpin Name = " + newSpin.Name + ", MyOwnName = " + newSpin.MyOwnName + ", MaxValue = " + newSpin.MaxValue + ", currentValue = " + newSpin._myCurrentValue);
@@ -875,8 +875,7 @@ namespace DaliTest
 
             for (uint i = 0; i < parent.ChildCount; i++)
             {
-                View child = parent.GetChildAt(i);
-                View childView = View.DownCast<View>(child);
+                View childView = parent.GetChildAt(i);
                 if (childView)
                 {
                     Tizen.Log.Debug("NUI", "Type[" + childView.GetTypeName() + "] BGColor[" + childView.BackgroundColor.R + "]" + " Name[" + childView.Name + "]");
index 5e854e5..dd26180 100644 (file)
@@ -72,9 +72,9 @@ namespace DatePickerUsingJson
             View day  = actorTree.FindChildByName("Day");
 
             // need to get the actual C# Spin object associated with the actor,
-            _spinYear = View.DownCast<Spin>( year );
-            _spinMonth = View.DownCast<Spin>( month );
-            _spinDay = View.DownCast<Spin>( day );
+            _spinYear = year as Spin;
+            _spinMonth = month as Spin;
+            _spinDay = day as Spin;
 
             _spinYear.Value = 2099;
             _spinMonth.Value = 5;
index f2a9ed3..4fe8cd2 100755 (executable)
@@ -2202,8 +2202,8 @@ namespace Tizen.NUI
             FocusChangedEventArgs e = new FocusChangedEventArgs();
 
             // Populate all members of "e" (FocusChangedEventArgs) with real data
-            e.ViewCurrent = View.GetViewFromPtr(view1);
-            e.ViewNext = View.GetViewFromPtr(view2);
+            e.ViewCurrent = Registry.GetManagedBaseHandleFromNativePtr(view1) as View;
+            e.ViewNext = Registry.GetManagedBaseHandleFromNativePtr(view2) as View;
 
             if (_accessibilityManagerFocusChangedEventHandler != null)
             {
@@ -2249,7 +2249,7 @@ namespace Tizen.NUI
             FocusedViewActivatedEventArgs e = new FocusedViewActivatedEventArgs();
 
             // Populate all members of "e" (FocusedViewActivatedEventArgs) with real data
-            e.View = View.GetViewFromPtr(view);
+            e.View = Registry.GetManagedBaseHandleFromNativePtr(view) as View;
 
             if (_accessibilityManagerFocusedViewActivatedEventHandler != null)
             {
@@ -2296,7 +2296,7 @@ namespace Tizen.NUI
             FocusOvershotEventArgs e = new FocusOvershotEventArgs();
 
             // Populate all members of "e" (FocusOvershotEventArgs) with real data
-            e.CurrentFocusedView = View.GetViewFromPtr(currentFocusedView);
+            e.CurrentFocusedView = Registry.GetManagedBaseHandleFromNativePtr(currentFocusedView) as View;
             e.FocusOvershotDirection = direction;
 
             if (_accessibilityManagerFocusOvershotEventHandler != null)
index d1e588b..e43fe34 100755 (executable)
@@ -64,9 +64,6 @@ namespace Tizen.NUI
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
index 9ff7657..5733df1 100755 (executable)
@@ -137,7 +137,10 @@ namespace Tizen.NUI
 
         private global::System.IntPtr SwigDirectorGetNextFocusableView(global::System.IntPtr current, global::System.IntPtr proposed, int direction)
         {
-            return View.getCPtr(GetNextFocusableView(new View(current, true), new View(proposed, true), (View.FocusDirection)direction)).Handle;
+            View currentView = Registry.GetManagedBaseHandleFromNativePtr(current) as View;
+            View proposedView = Registry.GetManagedBaseHandleFromNativePtr(proposed) as View;
+
+            return View.getCPtr(GetNextFocusableView(currentView, proposedView, (View.FocusDirection)direction)).Handle;
         }
 
         internal delegate global::System.IntPtr SwigDelegateCustomAlgorithmInterface_0(global::System.IntPtr current, global::System.IntPtr proposed, int direction);
index 180eb91..4bde8c3 100755 (executable)
@@ -68,9 +68,6 @@ namespace Tizen.NUI
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
@@ -145,7 +142,7 @@ namespace Tizen.NUI
             FinishedEventArgs e = new FinishedEventArgs();
 
             // Populate all members of "e" (FinishedEventArgs) with real data
-            e.GaussianBlurView = GaussianBlurView.GetGaussianBlurViewFromPtr(data);
+            e.GaussianBlurView = Registry.GetManagedBaseHandleFromNativePtr(data) as GaussianBlurView;
 
             if (_gaussianFinishedEventHandler != null)
             {
@@ -154,14 +151,6 @@ namespace Tizen.NUI
             }
         }
 
-        public static GaussianBlurView GetGaussianBlurViewFromPtr(global::System.IntPtr cPtr)
-        {
-            GaussianBlurView ret = new GaussianBlurView(cPtr, false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-
         public GaussianBlurView() : this(NDalicPINVOKE.GaussianBlurView_New__SWIG_0(), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
index 15d9bc6..ae97da1 100755 (executable)
@@ -66,9 +66,6 @@ namespace Tizen.NUI
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
index 4977c03..bb41a9d 100755 (executable)
@@ -150,7 +150,7 @@ namespace Tizen.NUI
             DetectedEventArgs e = new DetectedEventArgs();
 
             // Populate all members of "e" (LongPressGestureEventArgs) with real data
-            e.View = View.GetViewFromPtr(actor);
+            e.View = Registry.GetManagedBaseHandleFromNativePtr(actor) as View;
             e.LongPressGesture = Tizen.NUI.LongPressGesture.GetLongPressGestureFromPtr(longPressGesture);
 
             if (_longPressGestureEventHandler != null)
index 7f1b0fb..7c66870 100755 (executable)
@@ -64,9 +64,6 @@ namespace Tizen.NUI
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
index 7cff7dd..9f3e342 100755 (executable)
@@ -10904,6 +10904,10 @@ class NDalicPINVOKE {
 
   [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_ViewResourceReadySignal")]
   public static extern void delete_ViewResourceReadySignal(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetRefObjectPtr")]
+  public static extern global::System.IntPtr GetRefObjectPtr(global::System.IntPtr jarg1);
+
   [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_BaseObject_SWIGUpcast")]
   public static extern global::System.IntPtr BaseObject_SWIGUpcast(global::System.IntPtr jarg1);
 
index 5ca22ec..e9baf50 100755 (executable)
@@ -60,9 +60,6 @@ namespace Tizen.NUI
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
index 11b6d07..1d728a4 100755 (executable)
@@ -60,9 +60,6 @@ namespace Tizen.NUI
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
index 6f2b240..61cbfd1 100755 (executable)
@@ -50,9 +50,6 @@ namespace Tizen.NUI
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
index 0b0857d..79dd80a 100755 (executable)
@@ -152,7 +152,7 @@ namespace Tizen.NUI
             DetectedEventArgs e = new DetectedEventArgs();
 
             // Populate all members of "e" (PanGestureEventArgs) with real data
-            e.View = View.GetViewFromPtr(actor);
+            e.View = Registry.GetManagedBaseHandleFromNativePtr(actor) as View;
             e.PanGesture = Tizen.NUI.PanGesture.GetPanGestureFromPtr(panGesture);
 
             if (_panGestureEventHandler != null)
index fc81c72..c6ecd48 100755 (executable)
@@ -153,7 +153,7 @@ namespace Tizen.NUI
             DetectedEventArgs e = new DetectedEventArgs();
 
             // Populate all members of "e" (DetectedEventArgs) with real data
-            e.View = View.GetViewFromPtr(actor);
+            e.View = Registry.GetManagedBaseHandleFromNativePtr(actor) as View;
             e.PinchGesture = Tizen.NUI.PinchGesture.GetPinchGestureFromPtr(pinchGesture);
 
             if (_pinchGestureEventHandler != null)
index ffb9c78..c7a3597 100755 (executable)
@@ -85,28 +85,26 @@ namespace Tizen.NUI
 
         internal static BaseHandle GetManagedBaseHandleFromNativePtr(BaseHandle baseHandle)
         {
-            // we store a dictionary of ref-obects (C++ land) to managed obects (C# land)
-
             RefObject refObj = baseHandle.GetObjectPtr();
             IntPtr refObjectPtr = (IntPtr)RefObject.getCPtr(refObj);
 
-            WeakReference viewReference;
-            if (Instance._controlMap.TryGetValue(refObjectPtr, out viewReference))
-            {
-                BaseHandle ret = viewReference.Target as BaseHandle;
-                return ret;
-            }
-            else
-            {
-                return null;
-            }
+            // we store a dictionary of ref-obects (C++ land) to managed obects (C# land)
+            return GetManagedBaseHandleFromRefObject(refObjectPtr);
         }
 
-        internal static BaseHandle GetManagedBaseHandleFromRefObject(IntPtr refObjectPtr)
+        internal static BaseHandle GetManagedBaseHandleFromNativePtr(IntPtr cPtr)
         {
+            IntPtr refObjectPtr = NDalicPINVOKE.GetRefObjectPtr(cPtr);
+
             // we store a dictionary of ref-obects (C++ land) to managed obects (C# land)
+            return GetManagedBaseHandleFromRefObject(refObjectPtr);
+        }
 
+        internal static BaseHandle GetManagedBaseHandleFromRefObject(IntPtr refObjectPtr)
+        {
+            // we store a dictionary of ref-obects (C++ land) to managed obects (C# land)
             WeakReference weakReference;
+
             if (Instance._controlMap.TryGetValue(refObjectPtr, out weakReference))
             {
                 BaseHandle ret = weakReference.Target as BaseHandle;
index e7fcdd1..fad752c 100755 (executable)
@@ -72,9 +72,6 @@ namespace Tizen.NUI.UIComponents
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
index ded1004..cd52f2a 100755 (executable)
@@ -150,7 +150,7 @@ namespace Tizen.NUI
             DetectedEventArgs e = new DetectedEventArgs();
 
             // Populate all members of "e" (DetectedEventArgs) with real data
-            e.View = View.GetViewFromPtr(actor);
+            e.View = Registry.GetManagedBaseHandleFromNativePtr(actor) as View;
             e.TapGesture = Tizen.NUI.TapGesture.GetTapGestureFromPtr(tapGesture);
 
             if (_tapGestureEventHandler != null)
index 834d163..ed35633 100755 (executable)
@@ -40,8 +40,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam)
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
index 42c553c..d999316 100755 (executable)
@@ -201,13 +201,6 @@ namespace Tizen.NUI
             }
         }
 
-        internal static Animation GetAnimationFromPtr(global::System.IntPtr cPtr)
-        {
-            Animation ret = new Animation(cPtr, false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         private float MilliSecondsToSeconds(int millisec)
         {
             return (float)millisec / 1000.0f;
index 7152e60..ce3a7d4 100755 (executable)
@@ -113,7 +113,7 @@ namespace Tizen.NUI.BaseComponents
             ResourceReadyEventArgs e = new ResourceReadyEventArgs();
             if(data != null)
             {
-                e.View = View.GetViewFromPtr(data);
+                e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
             }
 
             if (_resourceReadyEventHandler != null)
@@ -191,19 +191,6 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
-        /// Downcasts a handle to ImageView handle.<br>
-        /// If handle points to a ImageView, the downcast produces valid handle.<br>
-        /// If not, the returned handle is left uninitialized.<br>
-        /// </summary>
-        /// <param name="handle">Handle to an object</param>
-        /// <returns>Handle to a ImageView or an uninitialized handle</returns>
-        internal new static ImageView DownCast(BaseHandle handle)
-        {
-            ImageView ret = new ImageView(NDalicPINVOKE.ImageView_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-        /// <summary>
         /// Sets this ImageView from the given URL.<br>
         /// If the URL is empty, ImageView will not display anything.<br>
         /// </summary>
index 26fd4c2..366d821 100755 (executable)
@@ -141,7 +141,7 @@ namespace Tizen.NUI.BaseComponents
             TextChangedEventArgs e = new TextChangedEventArgs();
 
             // Populate all members of "e" (TextChangedEventArgs) with real data
-            e.TextEditor = TextEditor.GetTextEditorFromPtr(textEditor);
+            e.TextEditor = Registry.GetManagedBaseHandleFromNativePtr(textEditor) as TextEditor;
 
             if (_textEditorTextChangedEventHandler != null)
             {
@@ -227,7 +227,7 @@ namespace Tizen.NUI.BaseComponents
             if (textEditor != null)
             {
                 // Populate all members of "e" (ScrollStateChangedEventArgs) with real data
-                e.TextEditor = TextEditor.GetTextEditorFromPtr(textEditor);
+                e.TextEditor = Registry.GetManagedBaseHandleFromNativePtr(textEditor) as TextEditor;
                 e.ScrollState = state;
             }
 
@@ -238,14 +238,6 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
-        internal static TextEditor GetTextEditorFromPtr(global::System.IntPtr cPtr)
-        {
-            TextEditor ret = new TextEditor(cPtr, false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-
         internal class Property
         {
             internal static readonly int RENDERING_BACKEND = NDalicPINVOKE.TextEditor_Property_RENDERING_BACKEND_get();
@@ -330,18 +322,6 @@ namespace Tizen.NUI.BaseComponents
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        /// <summary>
-        /// Downcasts a handle to TextEditor.
-        /// </summary>
-        /// <param name="handle">Handle to an object</param>
-        /// <returns>Handle to a TextEditor or an empty handle</returns>
-        internal new static TextEditor DownCast(BaseHandle handle)
-        {
-            TextEditor ret = new TextEditor(NDalicPINVOKE.TextEditor_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         internal TextEditorSignal TextChangedSignal()
         {
             TextEditorSignal ret = new TextEditorSignal(NDalicPINVOKE.TextEditor_TextChangedSignal(swigCPtr), false);
index db3c3e7..c898ac8 100755 (executable)
@@ -170,7 +170,7 @@ namespace Tizen.NUI.BaseComponents
             TextChangedEventArgs e = new TextChangedEventArgs();
 
             // Populate all members of "e" (TextChangedEventArgs) with real data
-            e.TextField = TextField.GetTextFieldFromPtr(textField);
+            e.TextField = Registry.GetManagedBaseHandleFromNativePtr(textField) as TextField;
 
             if (_textFieldTextChangedEventHandler != null)
             {
@@ -209,7 +209,7 @@ namespace Tizen.NUI.BaseComponents
             MaxLengthReachedEventArgs e = new MaxLengthReachedEventArgs();
 
             // Populate all members of "e" (MaxLengthReachedEventArgs) with real data
-            e.TextField = TextField.GetTextFieldFromPtr(textField);
+            e.TextField = Registry.GetManagedBaseHandleFromNativePtr(textField) as TextField;
 
             if (_textFieldMaxLengthReachedEventHandler != null)
             {
@@ -219,14 +219,6 @@ namespace Tizen.NUI.BaseComponents
 
         }
 
-        internal static TextField GetTextFieldFromPtr(global::System.IntPtr cPtr)
-        {
-            TextField ret = new TextField(cPtr, false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-
         internal class Property
         {
             internal static readonly int RENDERING_BACKEND = NDalicPINVOKE.TextField_Property_RENDERING_BACKEND_get();
@@ -311,18 +303,6 @@ namespace Tizen.NUI.BaseComponents
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        /// <summary>
-        /// Downcasts a handle to TextField.
-        /// </summary>
-        /// <param name="handle">Handle to an object</param>
-        /// <returns>Handle to a TextField or an empty handle</returns>
-        internal new static TextField DownCast(BaseHandle handle)
-        {
-            TextField ret = new TextField(NDalicPINVOKE.TextField_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         internal TextFieldSignal TextChangedSignal()
         {
             TextFieldSignal ret = new TextFieldSignal(NDalicPINVOKE.TextField_TextChangedSignal(swigCPtr), false);
index 0ebbfe1..10d6acb 100755 (executable)
@@ -137,18 +137,6 @@ namespace Tizen.NUI.BaseComponents
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-
-        /// <summary>
-        /// Downcasts a handle to TextLabel.
-        /// </summary>
-        /// <param name="handle">Handle to an object</param>
-        internal new static TextLabel DownCast(BaseHandle handle)
-        {
-            TextLabel ret = new TextLabel(NDalicPINVOKE.TextLabel_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         /// <summary>
         /// Text property.<br>
         /// The text to display in UTF-8 format.<br>
index 80b3a38..698d0d2 100755 (executable)
@@ -30,9 +30,6 @@ namespace Tizen.NUI.BaseComponents
         internal View(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
         {
             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-
-            // Register this instance of view in the registry.
-            Registry.Register(this);
         }
 
         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
@@ -59,9 +56,6 @@ namespace Tizen.NUI.BaseComponents
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
@@ -666,7 +660,7 @@ namespace Tizen.NUI.BaseComponents
             VisibilityChangedEventArgs e = new VisibilityChangedEventArgs();
             if (data != null)
             {
-                e.View = View.GetViewFromPtr(data);
+                e.View = Registry.GetManagedBaseHandleFromNativePtr(data) as View;
             }
             e.Visibility = visibility;
             e.Type = type;
@@ -720,14 +714,6 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
-
-        internal static View GetViewFromPtr(global::System.IntPtr cPtr)
-        {
-            View ret = new View(cPtr, false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         internal IntPtr GetPtrfromView()
         {
             return (IntPtr)swigCPtr;
@@ -838,22 +824,6 @@ namespace Tizen.NUI.BaseComponents
             return ret;
         }
 
-        /// <summary>
-        /// Downcasts a handle to class which inherit View handle.
-        /// </summary>
-        /// <typeparam name="T">Class which inherit View</typeparam>
-        /// <param name="view">View to an object</param>
-        /// <returns>A object which inherit View</returns>
-        public static T DownCast<T>(View view) where T : View
-        {
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(view) as View;
-            if (ret != null)
-            {
-                return (T)ret;
-            }
-            return null;
-        }
-
         private View ConvertIdToView(uint id)
         {
             View view = null;
@@ -2088,17 +2058,12 @@ namespace Tizen.NUI.BaseComponents
         public View GetChildAt(uint index)
         {
             IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
-            cPtr = NDalicPINVOKE.View_SWIGUpcast(cPtr);
-            cPtr = NDalicPINVOKE.Handle_SWIGUpcast(cPtr);
 
-            BaseHandle ret = new BaseHandle(cPtr, false);
-
-            View temp = Registry.GetManagedBaseHandleFromNativePtr(ret) as View;
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
 
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
-            return temp ?? null;
+            return ret ?? null;
         }
 
         /// <summary>
@@ -2110,7 +2075,10 @@ namespace Tizen.NUI.BaseComponents
         /// <returns>A handle to the view if found, or an empty handle if not</returns>
         public View FindChildByName(string viewName)
         {
-            View ret = new View(NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName), true);
+            IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
+
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -2118,7 +2086,10 @@ namespace Tizen.NUI.BaseComponents
 
         internal View FindChildById(uint id)
         {
-            View ret = new View(NDalicPINVOKE.Actor_FindChildById(swigCPtr, id), true);
+            IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
+
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -2126,7 +2097,10 @@ namespace Tizen.NUI.BaseComponents
 
         internal View GetParent()
         {
-            View ret = new View(NDalicPINVOKE.Actor_GetParent(swigCPtr), true);
+            IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
+
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
index ce7dc6e..a59453e 100755 (executable)
@@ -20,6 +20,9 @@ namespace Tizen.NUI
         {
             swigCMemOwn = cMemoryOwn;
             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+
+            // Register this instance of BaseHandle in the registry.
+            Registry.Register(this);
         }
 
         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BaseHandle obj)
@@ -79,6 +82,9 @@ namespace Tizen.NUI
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
+            //Unreference this instance from Registry.
+            Registry.Unregister(this);
+
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
index 505feb6..e943d8c 100755 (executable)
@@ -40,8 +40,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam)
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
index fcebba7..6e7e6d8 100755 (executable)
@@ -31,13 +31,11 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
         protected bool disposed = false;
-        
+
         ~Degree()
         {
             if(!isDisposeQueued)
index 0e598d6..e82bc4c 100755 (executable)
@@ -113,13 +113,6 @@ namespace Tizen.NUI
 
         }
 
-        internal new static FlexContainer DownCast(BaseHandle handle)
-        {
-            FlexContainer ret = new FlexContainer(NDalicPINVOKE.FlexContainer_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         /// <summary>
         /// Enumeration for the direction of the main axis in the flex container. This determines
         /// the direction that flex items are laid out in the flex container.
index 4ebae95..29e937d 100755 (executable)
@@ -181,11 +181,11 @@ namespace Tizen.NUI
 
             if (current != global::System.IntPtr.Zero)
             {
-                e.CurrentView = View.GetViewFromPtr(current);
+                e.CurrentView = Registry.GetManagedBaseHandleFromNativePtr(current) as View;
             }
             if (proposed != global::System.IntPtr.Zero)
             {
-                e.ProposedView = View.GetViewFromPtr(proposed);
+                e.ProposedView = Registry.GetManagedBaseHandleFromNativePtr(proposed) as View;
             }
             e.Direction = direction;
 
@@ -273,8 +273,8 @@ namespace Tizen.NUI
         {
             FocusChangedEventArgs e = new FocusChangedEventArgs();
 
-            e.CurrentView = View.GetViewFromPtr(current);
-            e.NextView = View.GetViewFromPtr(next);
+            e.CurrentView = Registry.GetManagedBaseHandleFromNativePtr(current) as View;
+            e.NextView = Registry.GetManagedBaseHandleFromNativePtr(next) as View;
 
             if (_focusChangedEventHandler != null)
             {
@@ -351,7 +351,7 @@ namespace Tizen.NUI
         {
             FocusGroupChangedEventArgs e = new FocusGroupChangedEventArgs();
 
-            e.CurrentView = View.GetViewFromPtr(current);
+            e.CurrentView = Registry.GetManagedBaseHandleFromNativePtr(current) as View;
             e.ForwardDirection = forwardDirection;
 
             if (_focusGroupChangedEventHandler != null)
@@ -414,7 +414,7 @@ namespace Tizen.NUI
         {
             FocusedViewActivatedEventArgs e = new FocusedViewActivatedEventArgs();
 
-            e.View = View.GetViewFromPtr(view);
+            e.View = Registry.GetManagedBaseHandleFromNativePtr(view) as View;
 
             if (_focusedViewEnterKeyEventHandler != null)
             {
@@ -455,12 +455,9 @@ namespace Tizen.NUI
         /// <returns>A handle to the current focused View or an empty handle if no View is focused</returns>
         public View GetCurrentFocusView()
         {
-            View ret = new View(NDalicManualPINVOKE.FocusManager_GetCurrentFocusActor(swigCPtr), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            if (ret.HasBody() == false)
-            {
-                return null;
-            }
+            IntPtr cPtr = NDalicManualPINVOKE.FocusManager_GetCurrentFocusActor(swigCPtr);
+
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
             return ret;
         }
 
@@ -555,12 +552,18 @@ namespace Tizen.NUI
         /// <returns>The focus group the given view belongs to or an empty handle if the given view</returns>
         public View GetFocusGroup(View view)
         {
-            View ret = new View(NDalicManualPINVOKE.FocusManager_GetFocusGroup(swigCPtr, View.getCPtr(view)), true);
+            IntPtr cPtr = NDalicManualPINVOKE.FocusManager_GetFocusGroup(swigCPtr, View.getCPtr(view));
+
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
+
+            /*View ret = new View(NDalicManualPINVOKE.FocusManager_GetFocusGroup(swigCPtr, View.getCPtr(view)), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             if (ret.HasBody() == false)
             {
                 return null;
-            }
+            }*/
+
             return ret;
         }
 
@@ -588,12 +591,10 @@ namespace Tizen.NUI
 
         internal View GetFocusIndicatorView()
         {
-            View ret = new View(NDalicManualPINVOKE.FocusManager_GetFocusIndicatorActor(swigCPtr), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            if (ret.HasBody() == false)
-            {
-                return null;
-            }
+            IntPtr cPtr = NDalicManualPINVOKE.FocusManager_GetFocusIndicatorActor(swigCPtr);
+
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
             return ret;
         }
 
@@ -678,9 +679,7 @@ namespace Tizen.NUI
 
             public override View GetNextFocusableView(View current, View proposed, View.FocusDirection direction)
             {
-                View currentView = View.DownCast<View>(current);
-                View proposedView = View.DownCast<View>(proposed);
-                return _customFocusAlgorithm.GetNextFocusableView(currentView, proposedView, direction);
+                return _customFocusAlgorithm.GetNextFocusableView(current, proposed, direction);
             }
         }
     }
index a4430b5..999a162 100755 (executable)
@@ -79,13 +79,6 @@ namespace Tizen.NUI
 
         }
 
-        internal static Geometry DownCast(BaseHandle handle)
-        {
-            Geometry ret = new Geometry(NDalicPINVOKE.Geometry_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         public uint AddVertexBuffer(PropertyBuffer vertexBuffer)
         {
             uint ret = NDalicPINVOKE.Geometry_AddVertexBuffer(swigCPtr, PropertyBuffer.getCPtr(vertexBuffer));
index 7a5c1a8..4a337f3 100755 (executable)
@@ -32,8 +32,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam)
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
index dfd6d92..a67db81 100755 (executable)
@@ -32,8 +32,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
index 4c00e12..66cc141 100755 (executable)
@@ -30,8 +30,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
index 225157f..6be6ed4 100755 (executable)
@@ -109,19 +109,6 @@ namespace Tizen.NUI
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
         }
-        /// <summary>
-        /// Downcasts a handle to KeyFrames handle.<br>
-        /// If handle points to a KeyFrames object, the downcast produces valid handle.<br>
-        /// If not, the returned handle is left uninitialized.<br>
-        /// </summary>
-        /// <param name="handle">Handle to an object</param>
-        /// <returns>Handle to a KeyFrames object or an uninitialized handle</returns>
-        internal static KeyFrames DownCast(BaseHandle handle)
-        {
-            KeyFrames ret = new KeyFrames(NDalicPINVOKE.KeyFrames_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
 
         /// <summary>
         /// Gets the type of the key frame.
index d7ffb21..b9ab260 100755 (executable)
@@ -80,19 +80,6 @@ namespace Tizen.NUI
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
         }
-        /// <summary>
-        /// Downcasts a handle to Layer handle.<br>
-        /// If handle points to a Layer, the downcast produces valid handle.<br>
-        /// If not, the returned handle is left uninitialized.<br>
-        /// </summary>
-        /// <param name="handle">Handle to an object</param>
-        /// <returns>Handle to a Layer or an uninitialized handle</returns>
-        internal new static Layer DownCast(BaseHandle handle)
-        {
-            Layer ret = new Layer(NDalicPINVOKE.Layer_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
 
         /// <summary>
         /// Search through this layer's hierarchy for an view with the given unique ID.
@@ -278,17 +265,13 @@ namespace Tizen.NUI
         public View GetChildAt(uint index)
         {
             System.IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index);
-            cPtr = NDalicPINVOKE.View_SWIGUpcast(cPtr);
-            cPtr = NDalicPINVOKE.Handle_SWIGUpcast(cPtr);
-
-            BaseHandle ret = new BaseHandle(cPtr, false);
 
-            View temp = Registry.GetManagedBaseHandleFromNativePtr(ret) as View;
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
 
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
-            return temp ?? null;
+            return ret ?? null;
         }
 
         /// <summary>
index 60da1e5..cff3f9b 100755 (executable)
@@ -37,8 +37,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
index c376ead..c773814 100755 (executable)
@@ -37,8 +37,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;\r
         }\r
 \r
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) \r
-\r
         //A Flag to check who called Dispose(). (By User or DisposeQueue)\r
         private bool isDisposeQueued = false;\r
         //A Flat to check if it is already disposed.\r
index e2dfec4..913f913 100755 (executable)
@@ -72,9 +72,6 @@ namespace Tizen.NUI.UIComponents
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
@@ -171,7 +168,7 @@ namespace Tizen.NUI.UIComponents
             ValueChangedEventArgs e = new ValueChangedEventArgs();
 
             // Populate all members of "e" (ValueChangedEventArgs) with real page
-            e.ProgressBar = ProgressBar.GetProgressBarFromPtr(progressBar);
+            e.ProgressBar = Registry.GetManagedBaseHandleFromNativePtr(progressBar) as ProgressBar;
             e.ProgressValue = progressValue;
             e.SecondaryProgressValue = secondaryProgressValue;
 
@@ -181,15 +178,6 @@ namespace Tizen.NUI.UIComponents
             }
         }
 
-        /// <summary>
-        /// </summary>
-        internal static ProgressBar GetProgressBarFromPtr(global::System.IntPtr cPtr)
-        {
-            ProgressBar ret = new ProgressBar(cPtr, false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         internal class Property
         {
             internal static readonly int PROGRESS_VALUE = NDalicPINVOKE.ProgressBar_Property_PROGRESS_VALUE_get();
index 7f61663..a1b30a0 100755 (executable)
@@ -27,8 +27,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
@@ -239,8 +237,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
@@ -468,8 +464,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam)
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
@@ -707,8 +701,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
@@ -1006,8 +998,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
index b661796..c87c606 100755 (executable)
@@ -80,13 +80,6 @@ namespace Tizen.NUI
 
         }
 
-        internal static PropertyBuffer DownCast(BaseHandle handle)
-        {
-            PropertyBuffer ret = new PropertyBuffer(NDalicPINVOKE.PropertyBuffer_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         public void SetData(System.IntPtr data, uint size)
         {
             NDalicPINVOKE.PropertyBuffer_SetData(swigCPtr, data, size);
index 36de9bc..0ca1e88 100755 (executable)
@@ -30,8 +30,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
index 95ae7ee..2229392 100755 (executable)
@@ -30,8 +30,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
index f5052fa..de4f503 100755 (executable)
@@ -39,8 +39,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
index 0aec4dc..d83d7b0 100755 (executable)
@@ -39,8 +39,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
index 69cbdec..4ab3671 100755 (executable)
@@ -39,8 +39,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
@@ -244,7 +242,7 @@ namespace Tizen.NUI
         /// Constructor
         /// </summary>
         /// <param name="relativeVector3">RelativeVector3 to create this vector from</param>
-        public RelativeVector4(RelativeVector3 relativeVector3) : this(NDalicPINVOKE.new_Vector4__SWIG_4(RelativeVector3.getCPtr(relativeVector3)), true) 
+        public RelativeVector4(RelativeVector3 relativeVector3) : this(NDalicPINVOKE.new_Vector4__SWIG_4(RelativeVector3.getCPtr(relativeVector3)), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
index 1b990a8..dae6cc8 100755 (executable)
@@ -39,8 +39,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
index 6535767..b00223e 100755 (executable)
@@ -109,13 +109,6 @@ namespace Tizen.NUI
 
         }
 
-        internal new static Renderer DownCast(BaseHandle handle)
-        {
-            Renderer ret = new Renderer(NDalicPINVOKE.Renderer_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         public void SetGeometry(Geometry geometry)
         {
             NDalicPINVOKE.Renderer_SetGeometry(swigCPtr, Geometry.getCPtr(geometry));
index 70bd9e6..16131f5 100755 (executable)
@@ -30,8 +30,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
index 2a5bfb2..039d730 100755 (executable)
@@ -81,13 +81,6 @@ namespace Tizen.NUI
 
         }
 
-        internal static Sampler DownCast(BaseHandle handle)
-        {
-            Sampler ret = new Sampler(NDalicPINVOKE.Sampler_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         public void SetFilterMode(FilterModeType minFilter, FilterModeType magFilter)
         {
             NDalicPINVOKE.Sampler_SetFilterMode(swigCPtr, (int)minFilter, (int)magFilter);
index 9602bef..57e8a9d 100755 (executable)
@@ -50,9 +50,6 @@ namespace Tizen.NUI
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
@@ -295,13 +292,6 @@ namespace Tizen.NUI
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        internal new static Scrollable DownCast(BaseHandle handle)
-        {
-            Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         private bool IsOvershootEnabled()
         {
             bool ret = NDalicPINVOKE.Scrollable_IsOvershootEnabled(swigCPtr);
index aaccc8c..cf167f3 100755 (executable)
@@ -100,13 +100,6 @@ namespace Tizen.NUI
 
         }
 
-        internal new static Shader DownCast(BaseHandle handle)
-        {
-            Shader ret = new Shader(NDalicPINVOKE.Shader_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         public Tizen.NUI.PropertyMap Program
         {
             get
index 82235c2..9e3b50c 100755 (executable)
@@ -37,8 +37,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
index 8502ddc..1692f23 100755 (executable)
@@ -149,7 +149,7 @@ namespace Tizen.NUI
             StyleChangedEventArgs e = new StyleChangedEventArgs();
 
             // Populate all members of "e" (StyleChangedEventArgs) with real data
-            e.StyleManager = StyleManager.GetStyleManagerFromPtr(styleManager);
+            e.StyleManager = Registry.GetManagedBaseHandleFromNativePtr(styleManager) as StyleManager;
             e.StyleChange = styleChange;
 
             if (_styleManagerStyleChangedEventHandler != null)
@@ -159,13 +159,6 @@ namespace Tizen.NUI
             }
         }
 
-        internal static StyleManager GetStyleManagerFromPtr(global::System.IntPtr cPtr)
-        {
-            StyleManager ret = new StyleManager(cPtr, false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         /// <summary>
         /// Creates a StyleManager handle.<br>
         /// this can be initialized with StyleManager::Get().<br>
index 01a94ea..28f5aad 100755 (executable)
@@ -120,8 +120,6 @@ namespace Tizen.NUI
                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
             }
 
-            //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
             //A Flag to check who called Dispose(). (By User or DisposeQueue)
             private bool isDisposeQueued = false;
             //A Flat to check if it is already disposed.
@@ -330,20 +328,6 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Downcasts a handle to TableView handle.<br>
-        /// If handle points to a TableView, the downcast produces valid handle.<br>
-        /// If not, the returned handle is left uninitialized.<br>
-        /// </summary>
-        /// <param name="handle">Handle to an object</param>
-        /// <returns>Handle to a TableView or an uninitialized handle</returns>
-        internal new static TableView DownCast(BaseHandle handle)
-        {
-            TableView ret = new TableView(NDalicPINVOKE.TableView_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        /// <summary>
         /// Adds a child to the table.<br>
         /// If the row or column index is outside the table, the table gets resized bigger.<br>
         /// </summary>
index 7c857a3..5a52b03 100755 (executable)
@@ -85,13 +85,6 @@ namespace Tizen.NUI
 
         }
 
-        internal static Texture DownCast(BaseHandle handle)
-        {
-            Texture ret = new Texture(NDalicPINVOKE.Texture_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         public bool Upload(PixelData pixelData)
         {
             bool ret = NDalicPINVOKE.Texture_Upload__SWIG_0(swigCPtr, PixelData.getCPtr(pixelData));
index d43d490..12ba07e 100755 (executable)
@@ -80,13 +80,6 @@ namespace Tizen.NUI
 
         }
 
-        internal static TextureSet DownCast(BaseHandle handle)
-        {
-            TextureSet ret = new TextureSet(NDalicPINVOKE.TextureSet_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         public void SetTexture(uint index, Texture texture)
         {
             NDalicPINVOKE.TextureSet_SetTexture(swigCPtr, index, Texture.getCPtr(texture));
index 44447cd..3b0dbe2 100755 (executable)
@@ -152,18 +152,6 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Downcasts a handle to Timer handle.
-        /// </summary>
-        /// <param name="handle">handle to An object</param>
-        /// <returns>handle to a Timer object or an uninitialized handle</returns>
-        internal static Timer DownCast(BaseHandle handle)
-        {
-            Timer ret = new Timer(NDalicPINVOKE.Timer_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        /// <summary>
         /// Starts timer.<br>
         /// In case a Timer is already running, its time is reset and timer is restarted.<br>
         /// </summary>
index 0bbd686..265db8b 100755 (executable)
@@ -83,12 +83,6 @@ namespace Tizen.NUI
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
         }
-        internal static TransitionData DownCast(BaseHandle handle)
-        {
-            TransitionData ret = new TransitionData(NDalicPINVOKE.TransitionData_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
 
         public TransitionData(TransitionData handle) : this(NDalicPINVOKE.new_TransitionData__SWIG_1(TransitionData.getCPtr(handle)), true)
         {
index 7df120d..4559b03 100755 (executable)
@@ -74,9 +74,6 @@ namespace Tizen.NUI.UIComponents
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
@@ -262,14 +259,6 @@ namespace Tizen.NUI.UIComponents
         }
 
 
-
-        internal static Button GetButtonFromPtr(global::System.IntPtr cPtr)
-        {
-            Button ret = new Button(cPtr, false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         /// <summary>
         /// Gets/Sets the unselected button foreground/icon visual
         /// </summary>
@@ -535,20 +524,6 @@ namespace Tizen.NUI.UIComponents
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        /// <summary>
-        /// Downcasts a handle to Button handle.<br>
-        /// If handle points to a Button, the downcast produces valid handle.<br>
-        /// If not the returned handle is left uninitialized.<br>
-        /// </summary>
-        /// <param name="handle">Handle to an object</param>
-        /// <returns>A handle to a Button or an uninitialized handle</returns>
-        internal new static Button DownCast(BaseHandle handle)
-        {
-            Button ret = new Button(NDalicPINVOKE.Button_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         internal ButtonSignal PressedSignal()
         {
             ButtonSignal ret = new ButtonSignal(NDalicPINVOKE.Button_PressedSignal(swigCPtr), false);
index d8fe161..e2ef38a 100755 (executable)
@@ -61,7 +61,7 @@ namespace Tizen.NUI.UIComponents
 
             //Release your own unmanaged resources here.
             //You should not access any managed member here except static instance.
-            //because the execution order of Finalizes is non-deterministic.         
+            //because the execution order of Finalizes is non-deterministic.
 
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
@@ -85,13 +85,6 @@ namespace Tizen.NUI.UIComponents
 
         }
 
-        internal new static CheckBoxButton DownCast(BaseHandle handle)
-        {
-            CheckBoxButton ret = new CheckBoxButton(NDalicPINVOKE.CheckBoxButton_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
     }
 
 }
index 567eb80..72ad327 100755 (executable)
@@ -70,9 +70,6 @@ namespace Tizen.NUI.UIComponents
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
@@ -365,20 +362,6 @@ namespace Tizen.NUI.UIComponents
         }
 
         /// <summary>
-        /// Downcasts a handle to Popup handle.<br>
-        /// If handle points to a Popup, the downcast produces valid handle.<br>
-        /// If not the returned handle is left uninitialized.<br>
-        /// </summary>
-        /// <param name="handle">Handle to an object</param>
-        /// <returns>handle to a Popup or an uninitialized handle</returns>
-        public new static Popup DownCast(BaseHandle handle)
-        {
-            Popup ret = new Popup(NDalicPINVOKE.Popup_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        /// <summary>
         /// Sets a title for this Popup.
         /// </summary>
         /// <param name="titleView">The actor to set a title</param>
index c6ec224..d77feef 100755 (executable)
@@ -98,19 +98,5 @@ namespace Tizen.NUI.UIComponents
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
         }
-
-        /// <summary>
-        /// Downcasts a handle to PushButton handle.<br>
-        /// If handle points to a PushButton, the downcast produces valid handle.<br>
-        /// If not the returned handle is left uninitialized.<br>
-        /// </summary>
-        /// <param name="handle">Handle to an object</param>
-        /// <returns>handle to a PushButton or an uninitialized handle</returns>
-        internal new static PushButton DownCast(BaseHandle handle)
-        {
-            PushButton ret = new PushButton(NDalicPINVOKE.PushButton_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
     }
 }
index f8816a9..dbb75ed 100755 (executable)
@@ -76,9 +76,6 @@ namespace Tizen.NUI.UIComponents
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
@@ -109,21 +106,5 @@ namespace Tizen.NUI.UIComponents
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
         }
-
-        /// <summary>
-        /// Downcasts a handle to RadioButton handle.
-        /// If handle points to a RadioButton, the downcast produces valid handle.
-        /// If not, the returned handle is left uninitialized.
-        /// </summary>
-        /// <param name="handle">Handle to an object</param>
-        /// <returns>A handle to a RadioButton or an uninitialized handle</returns>
-        internal new static RadioButton DownCast(BaseHandle handle)
-        {
-            RadioButton ret = new RadioButton(NDalicPINVOKE.RadioButton_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
     }
-
 }
index 44a2fe0..828af76 100755 (executable)
@@ -234,20 +234,6 @@ namespace Tizen.NUI.UIComponents
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        /// <summary>
-        /// Downcasts a handle to ScrollBar handle.<br>
-        /// If handle points to a ScrollBar, the downcast produces valid handle.<br>
-        /// If not, the returned handle is left uninitialized.<br>
-        /// </summary>
-        /// <param name="handle">Handle to an object</param>
-        /// <returns>Handle to a ScrollBar or an uninitialized handle</returns>
-        internal new static ScrollBar DownCast(BaseHandle handle)
-        {
-            ScrollBar ret = new ScrollBar(NDalicPINVOKE.ScrollBar_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         internal void SetScrollPropertySource(Animatable handle, int propertyScrollPosition, int propertyMinScrollPosition, int propertyMaxScrollPosition, int propertyScrollContentSize)
         {
             NDalicPINVOKE.ScrollBar_SetScrollPropertySource(swigCPtr, Animatable.getCPtr(handle), propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize);
index 0846305..bcbae17 100755 (executable)
@@ -64,9 +64,6 @@ namespace Tizen.NUI
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
@@ -342,13 +339,6 @@ namespace Tizen.NUI
 
         }
 
-        internal new static ScrollView DownCast(BaseHandle handle)
-        {
-            ScrollView ret = new ScrollView(NDalicPINVOKE.ScrollView_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         public AlphaFunction GetScrollSnapAlphaFunction()
         {
             AlphaFunction ret = new AlphaFunction(NDalicPINVOKE.ScrollView_GetScrollSnapAlphaFunction(swigCPtr), true);
index 2ed083f..df17ca9 100755 (executable)
@@ -62,9 +62,6 @@ namespace Tizen.NUI
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
@@ -91,13 +88,6 @@ namespace Tizen.NUI
 
         }
 
-        internal new static ToggleButton DownCast(BaseHandle handle)
-        {
-            ToggleButton ret = new ToggleButton(NDalicPINVOKE.ToggleButton_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         public Tizen.NUI.PropertyArray StateVisuals
         {
             get
index fa80264..4c22296 100755 (executable)
@@ -30,8 +30,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
index 4c54bd1..d54eddf 100755 (executable)
@@ -30,8 +30,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
index d57ccd6..98d1a5e 100755 (executable)
@@ -30,8 +30,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam) 
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.
index af52689..a5363ca 100755 (executable)
@@ -143,7 +143,7 @@ namespace Tizen.NUI
             FinishedEventArgs e = new FinishedEventArgs();
 
             // Populate all members of "e" (FinishedEventArgs) with real data
-            e.VideoView = VideoView.GetVideoViewFromPtr(data);
+            e.VideoView = Registry.GetManagedBaseHandleFromNativePtr(data) as VideoView;
 
             if (_videoViewFinishedEventHandler != null)
             {
@@ -152,14 +152,6 @@ namespace Tizen.NUI
             }
         }
 
-        internal static VideoView GetVideoViewFromPtr(global::System.IntPtr cPtr)
-        {
-            VideoView ret = new VideoView(cPtr, false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-
         internal class Property
         {
             internal static readonly int VIDEO = NDalicPINVOKE.VideoView_Property_VIDEO_get();
@@ -193,20 +185,6 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Downcasts a handle to VideoView handle.<br>
-        /// If handle points to a VideoView, the downcast produces valid handle.<br>
-        /// If not, the returned handle is left uninitialized.<br>
-        /// </summary>
-        /// <param name="handle">Handle to an object</param>
-        /// <returns>Handle to a VideoView or an uninitialized handle</returns>
-        internal new static VideoView DownCast(BaseHandle handle)
-        {
-            VideoView ret = new VideoView(NDalicPINVOKE.VideoView_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        /// <summary>
         /// Starts the video playback.
         /// </summary>
         public void Play()
index 087d503..deb1b85 100755 (executable)
@@ -55,9 +55,6 @@ namespace Tizen.NUI
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            //Unreference this from if a static instance refer to this.
-            Registry.Unregister(this);
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
@@ -77,12 +74,5 @@ namespace Tizen.NUI
             viewWrapperImpl = implementation;
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
-
-        internal new static ViewWrapper DownCast(BaseHandle handle)
-        {
-            ViewWrapper ret = new ViewWrapper(NDalicManualPINVOKE.ViewWrapper_DownCast(BaseHandle.getCPtr(handle)), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
     }
 }
index 59bc7aa..e17f9a6 100755 (executable)
@@ -33,8 +33,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        //NUI Dispose Pattern written by Jinwoo Nam(jjw.nam)  
-
         //A Flag to check who called Dispose(). (By User or DisposeQueue)
         private bool isDisposeQueued = false;
         //A Flat to check if it is already disposed.