[NUI] NUI Integration - nui_1.2.83 version (#98)
authorhuiyueun <35286162+huiyueun@users.noreply.github.com>
Wed, 31 Jan 2018 05:58:58 +0000 (14:58 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 31 Jan 2018 05:58:58 +0000 (14:58 +0900)
* [NUI] change some comments of Timer and Window APIs

Change-Id: I46c9f3e7c100ec87ce52b1acf846d1c3f8573ce3
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
Conflicts:
src/Tizen.NUI/src/public/Window.cs

* [NUI] fix animation finished callback null reference crash

Change-Id: Ice6383394ec99d5752cde31df445c9d5c7b41d7a
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* [NUI] depense code for TriggerEvent::Triggered callback null-reference issue

Change-Id: I89dc2920dccec2243fb5562ee8b61caacc4b73b7
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
Conflicts:
src/Tizen.NUI/src/internal/Application.cs

* [NUI] add depense code for TriggerEvent callback null reference issue

Change-Id: If2576f22ba10cf23cc0724df4ccf2513a68c30e1
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
Conflicts:
src/Tizen.NUI/src/internal/Application.cs
src/Tizen.NUI/src/public/Timer.cs

* [NUI] Fix TriggerEvent::Triggered callback null-reference issue

Change-Id: I715503d59efd11dc20d798013714dc669537df96

* [NUI] Revert "temporary fix! fix wrong value of screen position in object dump"

Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
Conflicts:
src/Tizen.NUI/src/public/Layer.cs

This reverts commit 9bd231dcee34a49087688f8af0bc0d269562ecfa.

Change-Id: I466c7a4a929afe6a89a8fbe8d46fc54e46a0a70e

Conflicts:
src/Tizen.NUI/src/public/NUIApplication.cs

* [NUI] depense code for crash of GetProperty()'s null parameter

Change-Id: I236da0a3a42e1d38cb7201e596f99b42e348a271
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* [NUI] Update Widget / NUIWidgetApplication

Update Widget/ NUIWidgetAppliation.

Change-Id: I4a123453830e641cfb4452f56a9924408d11b17c

* [NUI] Remove some unused APIs.

Change-Id: Ida75bc6e95408752b2f6a706a557a6a1221ee8e7
Signed-off-by: Feng Jin <feng16.jin@samsung.com>
* [NUI] add EnableShiftSelection in TextField,TextEditor

Change-Id: I7efc425f43c62f535fc3af31dfcd8e1aa0d1dcbc
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* [NUI] add Reload() to reload image forcely

Conflicts:
src/Tizen.NUI/src/internal/ManualPINVOKE.cs

Change-Id: I66b31730146927f035717f24e8f144742ca0e555
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* [NUI] Add ImageLoading and PixelBuffer for TextureSet

Change-Id: I20aff0bab6faebf325a32e91359dba835bdba7e7
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
Conflicts:
src/Tizen.NUI/src/internal/NDalicPINVOKE.cs

* [NUI] Update attribute and comments of PixelData

Change-Id: If61c84887ba06394f653fc271e97d9fe091d6a90

* [NUI] Add protect codes in Dispose()

Change-Id: I965de0e538e0b07a83a757e9c860fc11991f4903

* NUI release 1.2.81 (#27)

* [4.0] Fix auto tct widgetImpl dispose crash

Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] DALi version 1.2.81

Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
Conflicts:
packaging/version.txt
src/Tizen.NUI/src/internal/VersionCheck.cs

* [NUI] Support for animated GIF (#34)

* [NUI] Added playback (i.e. Play, Pause, Stop) support for the animated GIF

Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] Loop count support for animated GIF

Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] Modify property index

Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] Fix SiblingOrder return value (#37)

If parentChildren count is empty, return 0

Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
Conflicts:
src/Tizen.NUI/src/public/BaseComponents/View.cs

* [NUI] Fix svace issue (#41)

* [NUI] Fix svace issue

Value widget, which was created by as-operator, so can be null,
is dereferenced in method call widget.GetIntPtr()

Value value, which is result of method invocation with possible null return value,
is dereferenced in method call value.Get()

Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] Modify unassigned local variable 'str'

Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] Nui release 1.2.82 (#45)

* [NUI] Added RefObjectPtr null check condition in Registry

copy from gerrit
 : https://review.tizen.org/gerrit/#/c/167442/1

Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] C# binding for VERTICAL_LINE_ALIGNMENT property

Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] NUI release 1.2.82

Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
Conflicts:
packaging/version.txt

* [NUI] Add SetProperty for VerticalLineAlignment (#48)

Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] Add protected codes to avoid the crash when the IntPtr of key is 0 (#72)

Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* [NUI]fix memory leak problem caused by wrong increased ref-cnt (#75)

Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* [NUI] Apply SiblingOrder

Change-Id: I8a44269bd4bb6a23db33bad05763e3e4e250c8b4
Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
* [NUI] fix memory leak problem

Conflicts:
src/Tizen.NUI/src/public/BaseComponents/View.cs

Change-Id: Ifbc9703e19bab871dc62bb9ac71159c5450d8bfd
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
* [NUI] NUI_1.2.83 version release (#77)

* [NUI] remove this.Reset in Animation Dispose

* [NUI] NUI_1.2.83 Version

Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
Conflicts:
packaging/version.txt
src/Tizen.NUI/src/public/Animation.cs

* [NUI] Add EditorBrowable keyowrd

This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.

Signed-off-by: huiyu,eun <huiyu.eun@samsung.com>
67 files changed:
packaging/version.txt
src/Tizen.NUI/src/internal/AnimationSignal.cs
src/Tizen.NUI/src/internal/AppSignalType.cs [deleted file]
src/Tizen.NUI/src/internal/Application.cs
src/Tizen.NUI/src/internal/CreateWidgetFunction.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/DisposeQueue.cs
src/Tizen.NUI/src/internal/FrameBuffer.cs
src/Tizen.NUI/src/internal/ManualPINVOKE.cs
src/Tizen.NUI/src/internal/NDalic.cs
src/Tizen.NUI/src/internal/NDalicPINVOKE.cs
src/Tizen.NUI/src/internal/NUIWidgetCoreBackend.cs
src/Tizen.NUI/src/internal/Object.cs
src/Tizen.NUI/src/internal/Registry.cs
src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Widget__Impl.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/TimerSignalType.cs
src/Tizen.NUI/src/internal/VersionCheck.cs
src/Tizen.NUI/src/internal/ViewWrapperImpl.cs
src/Tizen.NUI/src/internal/WidgetApplication.cs
src/Tizen.NUI/src/internal/WidgetApplicationLowBatterySignalType.cs [deleted file]
src/Tizen.NUI/src/internal/WidgetApplicationLowMemorySignalType.cs [deleted file]
src/Tizen.NUI/src/internal/WidgetCreateSignalType.cs [deleted file]
src/Tizen.NUI/src/internal/WidgetImpl.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/WidgetImplPtr.cs [new file with mode: 0755]
src/Tizen.NUI/src/internal/WidgetPauseSignalType.cs [deleted file]
src/Tizen.NUI/src/internal/WidgetResizeSignalType.cs [deleted file]
src/Tizen.NUI/src/internal/WidgetResumeSignalType.cs [deleted file]
src/Tizen.NUI/src/internal/WidgetTerminateSignalType.cs [deleted file]
src/Tizen.NUI/src/internal/WidgetUpdateSignalType.cs [deleted file]
src/Tizen.NUI/src/public/Animation.cs
src/Tizen.NUI/src/public/BaseComponents/ImageView.cs
src/Tizen.NUI/src/public/BaseComponents/Scrollable.cs
src/Tizen.NUI/src/public/BaseComponents/TableView.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/VideoView.cs
src/Tizen.NUI/src/public/BaseComponents/View.cs [changed mode: 0755->0644]
src/Tizen.NUI/src/public/BaseHandle.cs
src/Tizen.NUI/src/public/FocusManager.cs
src/Tizen.NUI/src/public/ImageLoading.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/ImfManager.cs
src/Tizen.NUI/src/public/Layer.cs
src/Tizen.NUI/src/public/NUIApplication.cs
src/Tizen.NUI/src/public/NUIConstants.cs
src/Tizen.NUI/src/public/NUIWidgetApplication.cs
src/Tizen.NUI/src/public/PixelBuffer.cs [new file with mode: 0755]
src/Tizen.NUI/src/public/PixelData.cs
src/Tizen.NUI/src/public/Property.cs
src/Tizen.NUI/src/public/Renderer.cs
src/Tizen.NUI/src/public/StyleManager.cs
src/Tizen.NUI/src/public/TTSPlayer.cs
src/Tizen.NUI/src/public/TextureSet.cs
src/Tizen.NUI/src/public/Timer.cs
src/Tizen.NUI/src/public/Touch.cs
src/Tizen.NUI/src/public/UIComponents/Button.cs
src/Tizen.NUI/src/public/UIComponents/Popup.cs
src/Tizen.NUI/src/public/UIComponents/ProgressBar.cs
src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs
src/Tizen.NUI/src/public/UIComponents/ScrollView.cs
src/Tizen.NUI/src/public/UIComponents/Slider.cs
src/Tizen.NUI/src/public/VisualFactory.cs
src/Tizen.NUI/src/public/VisualMaps.cs
src/Tizen.NUI/src/public/Widget.cs
src/Tizen.NUI/src/public/Window.cs
test/NUITestSample/NUITestSample/examples/imageview-doaction-test.cs [new file with mode: 0755]
test/NUITestSample/NUITestSample/examples/ref-cnt-error-memory-leak.cs [new file with mode: 0755]
test/NUITestSample/NUITestSample/examples/text-test.cs

index e16ae7e..94fc546 100755 (executable)
@@ -7,4 +7,4 @@ NUGET_VERSION=5.0.0-preview1-99999
 INTERNAL_NUGET_VERSION=5.0.0.999
 
 # RPM Version Suffix
-RPM_VERSION_SUFFIX=nui66
+RPM_VERSION_SUFFIX=nui83
index 13d6f60..67eb06d 100755 (executable)
@@ -123,6 +123,19 @@ namespace Tizen.NUI
             }
         }
 
+
+        public void Connect(System.IntPtr callback)
+        {
+            NDalicPINVOKE.AnimationSignal_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, callback));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+        public void Disconnect(System.IntPtr callback)
+        {
+            NDalicPINVOKE.AnimationSignal_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, callback));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+
         public void Disconnect(System.Delegate func)
         {
             System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(func);
diff --git a/src/Tizen.NUI/src/internal/AppSignalType.cs b/src/Tizen.NUI/src/internal/AppSignalType.cs
deleted file mode 100755 (executable)
index 81ffac7..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-namespace Tizen.NUI
-{
-
-    internal class AppSignalType : global::System.IDisposable
-    {
-        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
-        protected bool swigCMemOwn;
-
-        internal AppSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
-        {
-            swigCMemOwn = cMemoryOwn;
-            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-        }
-
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(AppSignalType obj)
-        {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
-        }
-
-        //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;
-
-        ~AppSignalType()
-        {
-            if (!isDisposeQueued)
-            {
-                isDisposeQueued = true;
-                DisposeQueue.Instance.Add(this);
-            }
-        }
-
-        public void Dispose()
-        {
-            //Throw excpetion if Dispose() is called in separate thread.
-            if (!Window.IsInstalled())
-            {
-                throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
-            }
-
-            if (isDisposeQueued)
-            {
-                Dispose(DisposeTypes.Implicit);
-            }
-            else
-            {
-                Dispose(DisposeTypes.Explicit);
-                System.GC.SuppressFinalize(this);
-            }
-        }
-
-        protected virtual void Dispose(DisposeTypes type)
-        {
-            if (disposed)
-            {
-                return;
-            }
-
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-
-            }
-
-            //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.
-
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)
-            {
-                swigCMemOwn = false;
-                NDalicManualPINVOKE.delete_AppSignalType(swigCPtr);
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-            }
-
-            disposed = true;
-        }
-
-        public bool Empty()
-        {
-            bool ret = NDalicManualPINVOKE.AppSignalType_Empty(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public uint GetConnectionCount()
-        {
-            uint ret = NDalicManualPINVOKE.AppSignalType_GetConnectionCount(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public void Connect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.AppSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        public void Disconnect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.AppSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        public void Emit(WidgetApplication arg)
-        {
-            NDalicManualPINVOKE.AppSignalType_Emit(swigCPtr, WidgetApplication.getCPtr(arg));
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        public AppSignalType() : this(NDalicManualPINVOKE.new_AppSignalType(), true)
-        {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-    }
-}
index fa69d30..5684c4e 100755 (executable)
@@ -517,11 +517,10 @@ namespace Tizen.NUI
         {
             // Initialize DisposeQueue Singleton class. This is also required to create DisposeQueue on main thread.
             DisposeQueue.Instance.Initialize();
-            NUIApplicationInitEventArgs e = new NUIApplicationInitEventArgs();
 
+            NUIApplicationInitEventArgs e = new NUIApplicationInitEventArgs();
             // Populate all members of "e" (NUIApplicationInitEventArgs) with real data
             e.Application = Application.GetApplicationFromPtr(data);
-
             if (_applicationInitEventHandler != null)
             {
                 //here we send all data to user event handlers
@@ -1073,8 +1072,6 @@ namespace Tizen.NUI
 
         public static Application NewApplication(string[] args, string stylesheet, Application.WindowMode windowMode)
         {
-            NUILog.Debug(" NewApplication(string[] args, string stylesheet, Application.WindowMode windowMode) is called! ");
-
             Application ret = New(args, stylesheet, (Application.WindowMode)windowMode);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
@@ -1104,8 +1101,6 @@ namespace Tizen.NUI
         */
         public static Application New()
         {
-            NUILog.Debug("New() is called!");
-
             Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_0(), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -1113,8 +1108,6 @@ namespace Tizen.NUI
 
         public static Application New(int argc)
         {
-            NUILog.Debug("New(int argc) is called!");
-
             Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_1(argc), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -1122,8 +1115,6 @@ namespace Tizen.NUI
 
         public static Application New(int argc, string stylesheet)
         {
-            NUILog.Debug("New(int argc, string stylesheet) is called!");
-
             Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_2(argc, stylesheet), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -1131,8 +1122,6 @@ namespace Tizen.NUI
 
         public static Application New(int argc, string stylesheet, Application.WindowMode windowMode)
         {
-            NUILog.Debug("New(int argc, string stylesheet, Application.WindowMode windowMode) is called!");
-
             Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_3(argc, stylesheet, (int)windowMode), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -1140,7 +1129,6 @@ namespace Tizen.NUI
 
         public static Application New(string[] args, string stylesheet, Application.WindowMode windowMode)
         {
-            NUILog.Debug("New(string[] args) is called!");
             int argc = args.Length;
             string argvStr = string.Join(" ", args);
 
@@ -1158,8 +1146,6 @@ namespace Tizen.NUI
 
         public Application() : this(NDalicPINVOKE.new_Application__SWIG_0(), true)
         {
-            NUILog.Debug("Application() is called!");
-
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
diff --git a/src/Tizen.NUI/src/internal/CreateWidgetFunction.cs b/src/Tizen.NUI/src/internal/CreateWidgetFunction.cs
new file mode 100755 (executable)
index 0000000..29d2cfb
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+namespace Tizen.NUI
+{
+
+    internal class CreateWidgetFunction
+    {
+        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+        internal CreateWidgetFunction(global::System.IntPtr cPtr, bool futureUse)
+        {
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+        }
+
+        protected CreateWidgetFunction()
+        {
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+        }
+
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CreateWidgetFunction obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+        }
+    }
+
+}
index 7c06194..dc75e9c 100755 (executable)
@@ -34,10 +34,15 @@ namespace Tizen.NUI
             get { return _disposableQueue; }
         }
 
+        private bool _isCalled = false;
         public void Initialize()
         {
+            if(_isCalled == false)
+            {
             _disposeQueueProcessDisposablesDelegate = new EventThreadCallback.CallbackDelegate(ProcessDisposables);
             _eventThreadCallback = new EventThreadCallback(_disposeQueueProcessDisposablesDelegate);
+                _isCalled = true;
+            }
         }
 
         public void Add(IDisposable disposable)
index 4b5abc1..085bdb1 100755 (executable)
@@ -15,6 +15,8 @@
  *
  */
 
+using System.Runtime.InteropServices;
+
 namespace Tizen.NUI
 {
 
@@ -97,8 +99,12 @@ namespace Tizen.NUI
 
         public Texture GetColorTexture()
         {
+            //to fix memory leak issue, match the handle count with native side.
             global::System.IntPtr cPtr = NDalicPINVOKE.FrameBuffer_GetColorTexture(swigCPtr);
-            Texture ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Texture;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            Texture ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Texture;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
index d801688..71945bd 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -720,6 +720,9 @@ namespace Tizen.NUI
         [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextLabel_Property_TEXT_DIRECTION_get")]
         public static extern int TextLabel_Property_TEXT_DIRECTION_get();
 
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextLabel_Property_VERTICAL_LINE_ALIGNMENT_get")]
+        public static extern int TextLabel_Property_VERTICAL_LINE_ALIGNMENT_get();
+
         [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_HIDDENINPUT_PROPERTY_MODE_get")]
         public static extern int HIDDENINPUT_PROPERTY_MODE_get();
 
@@ -1122,17 +1125,18 @@ namespace Tizen.NUI
         [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_SWIGUpcast")]
         public static extern global::System.IntPtr Widget_SWIGUpcast(global::System.IntPtr jarg1);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_SWIGUpcast")]
-        public static extern global::System.IntPtr WidgetApplication_SWIGUpcast(global::System.IntPtr jarg1);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_SWIGUpcast")]
+        public static extern global::System.IntPtr WidgetImpl_SWIGUpcast(global::System.IntPtr jarg1);
+
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_New__SWIG_0")]
+        public static extern global::System.IntPtr Widget_New__SWIG_0();
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_New")]
-        public static extern global::System.IntPtr Widget_New(string jarg1);
+               [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_New__SWIG_1")]
+           public static extern global::System.IntPtr Widget_New__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_Widget__SWIG_0")]
-        public static extern global::System.IntPtr new_Widget__SWIG_0();
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_Widget__SWIG_1")]
-        public static extern global::System.IntPtr new_Widget__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_Widget")]
+        public static extern global::System.IntPtr new_Widget();
 
         [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_Assign")]
         public static extern global::System.IntPtr Widget_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
@@ -1140,263 +1144,87 @@ namespace Tizen.NUI
         [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_Widget")]
         public static extern void delete_Widget(global::System.Runtime.InteropServices.HandleRef jarg1);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_CreateSignal")]
-        public static extern global::System.IntPtr Widget_CreateSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_TerminateSignal")]
-        public static extern global::System.IntPtr Widget_TerminateSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_PauseSignal")]
-        public static extern global::System.IntPtr Widget_PauseSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_ResumeSignal")]
-        public static extern global::System.IntPtr Widget_ResumeSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_ResizeSignal")]
-        public static extern global::System.IntPtr Widget_ResizeSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_UpdateSignal")]
-        public static extern global::System.IntPtr Widget_UpdateSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_New")]
-        public static extern global::System.IntPtr WidgetApplication_New(int jarg1, string jarg2, string jarg3);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WidgetApplication__SWIG_0")]
-        public static extern global::System.IntPtr new_WidgetApplication__SWIG_0();
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WidgetApplication__SWIG_1")]
-        public static extern global::System.IntPtr new_WidgetApplication__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_Assign")]
-        public static extern global::System.IntPtr WidgetApplication_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WidgetApplication")]
-        public static extern void delete_WidgetApplication(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_MainLoop")]
-        public static extern void WidgetApplication_MainLoop(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_Quit")]
-        public static extern void WidgetApplication_Quit(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_GetResourcePath")]
-        public static extern string WidgetApplication_GetResourcePath();
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_GetRegion")]
-        public static extern string WidgetApplication_GetRegion(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_GetLanguage")]
-        public static extern string WidgetApplication_GetLanguage(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_InitSignal")]
-        public static extern global::System.IntPtr WidgetApplication_InitSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_TerminateSignal")]
-        public static extern global::System.IntPtr WidgetApplication_TerminateSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LanguageChangedSignal")]
-        public static extern global::System.IntPtr WidgetApplication_LanguageChangedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_RegionChangedSignal")]
-        public static extern global::System.IntPtr WidgetApplication_RegionChangedSignal(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LowBatterySignal")]
-        public static extern global::System.IntPtr WidgetApplication_LowBatterySignal(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LowMemorySignal")]
-        public static extern global::System.IntPtr WidgetApplication_LowMemorySignal(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetCreateSignalType_Empty")]
-        public static extern bool WidgetCreateSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetCreateSignalType_GetConnectionCount")]
-        public static extern uint WidgetCreateSignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetCreateSignalType_Connect")]
-        public static extern void WidgetCreateSignalType_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetCreateSignalType_Disconnect")]
-        public static extern void WidgetCreateSignalType_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetCreateSignalType_Emit")]
-        public static extern void WidgetCreateSignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, global::System.Runtime.InteropServices.HandleRef jarg4);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WidgetCreateSignalType")]
-        public static extern global::System.IntPtr new_WidgetCreateSignalType();
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WidgetCreateSignalType")]
-        public static extern void delete_WidgetCreateSignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetTerminateSignalType_Empty")]
-        public static extern bool WidgetTerminateSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetTerminateSignalType_GetConnectionCount")]
-        public static extern uint WidgetTerminateSignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetTerminateSignalType_Connect")]
-        public static extern void WidgetTerminateSignalType_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetTerminateSignalType_Disconnect")]
-        public static extern void WidgetTerminateSignalType_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_New")]
+        public static extern global::System.IntPtr WidgetImpl_New();
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetTerminateSignalType_Emit")]
-        public static extern void WidgetTerminateSignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, int jarg4);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_OnCreate")]
+        public static extern void WidgetImpl_OnCreate(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WidgetTerminateSignalType")]
-        public static extern global::System.IntPtr new_WidgetTerminateSignalType();
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_OnCreateSwigExplicitWidgetImpl")]
+        public static extern void WidgetImpl_OnCreateSwigExplicitWidgetImpl(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WidgetTerminateSignalType")]
-        public static extern void delete_WidgetTerminateSignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_OnTerminate")]
+        public static extern void WidgetImpl_OnTerminate(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, int jarg3);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetPauseSignalType_Empty")]
-        public static extern bool WidgetPauseSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_OnTerminateSwigExplicitWidgetImpl")]
+        public static extern void WidgetImpl_OnTerminateSwigExplicitWidgetImpl(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, int jarg3);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetPauseSignalType_GetConnectionCount")]
-        public static extern uint WidgetPauseSignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_OnPause")]
+        public static extern void WidgetImpl_OnPause(global::System.Runtime.InteropServices.HandleRef jarg1);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetPauseSignalType_Connect")]
-        public static extern void WidgetPauseSignalType_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_OnPauseSwigExplicitWidgetImpl")]
+        public static extern void WidgetImpl_OnPauseSwigExplicitWidgetImpl(global::System.Runtime.InteropServices.HandleRef jarg1);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetPauseSignalType_Disconnect")]
-        public static extern void WidgetPauseSignalType_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_OnResume")]
+        public static extern void WidgetImpl_OnResume(global::System.Runtime.InteropServices.HandleRef jarg1);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetPauseSignalType_Emit")]
-        public static extern void WidgetPauseSignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_OnResumeSwigExplicitWidgetImpl")]
+        public static extern void WidgetImpl_OnResumeSwigExplicitWidgetImpl(global::System.Runtime.InteropServices.HandleRef jarg1);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WidgetPauseSignalType")]
-        public static extern global::System.IntPtr new_WidgetPauseSignalType();
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_OnResize")]
+        public static extern void WidgetImpl_OnResize(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WidgetPauseSignalType")]
-        public static extern void delete_WidgetPauseSignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_OnResizeSwigExplicitWidgetImpl")]
+        public static extern void WidgetImpl_OnResizeSwigExplicitWidgetImpl(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetResumeSignalType_Empty")]
-        public static extern bool WidgetResumeSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_OnUpdate")]
+        public static extern void WidgetImpl_OnUpdate(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, int jarg3);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetResumeSignalType_GetConnectionCount")]
-        public static extern uint WidgetResumeSignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_OnUpdateSwigExplicitWidgetImpl")]
+        public static extern void WidgetImpl_OnUpdateSwigExplicitWidgetImpl(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, int jarg3);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetResumeSignalType_Connect")]
-        public static extern void WidgetResumeSignalType_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_SignalConnected")]
+        public static extern void WidgetImpl_SignalConnected(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetResumeSignalType_Disconnect")]
-        public static extern void WidgetResumeSignalType_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_SignalConnectedSwigExplicitWidgetImpl")]
+        public static extern void WidgetImpl_SignalConnectedSwigExplicitWidgetImpl(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetResumeSignalType_Emit")]
-        public static extern void WidgetResumeSignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_SignalDisconnected")]
+        public static extern void WidgetImpl_SignalDisconnected(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WidgetResumeSignalType")]
-        public static extern global::System.IntPtr new_WidgetResumeSignalType();
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_SignalDisconnectedSwigExplicitWidgetImpl")]
+        public static extern void WidgetImpl_SignalDisconnectedSwigExplicitWidgetImpl(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WidgetResumeSignalType")]
-        public static extern void delete_WidgetResumeSignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_SetContentInfo")]
+        public static extern void WidgetImpl_SetContentInfo(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetResizeSignalType_Empty")]
-        public static extern bool WidgetResizeSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_SetImpl")]
+        public static extern void WidgetImpl_SetImpl(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetResizeSignalType_GetConnectionCount")]
-        public static extern uint WidgetResizeSignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetImpl_director_connect")]
+        public static extern void WidgetImpl_director_connect(global::System.Runtime.InteropServices.HandleRef jarg1, WidgetImpl.SwigDelegateWidgetImpl_0 delegate0, WidgetImpl.SwigDelegateWidgetImpl_1 delegate1, WidgetImpl.SwigDelegateWidgetImpl_2 delegate2, WidgetImpl.SwigDelegateWidgetImpl_3 delegate3, WidgetImpl.SwigDelegateWidgetImpl_4 delegate4, WidgetImpl.SwigDelegateWidgetImpl_5 delegate5, WidgetImpl.SwigDelegateWidgetImpl_6 delegate6, WidgetImpl.SwigDelegateWidgetImpl_7 delegate7);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetResizeSignalType_Connect")]
-        public static extern void WidgetResizeSignalType_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Widget_GetImplementation__SWIG_0")]
+        public static extern global::System.IntPtr Widget_GetImplementation__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetResizeSignalType_Disconnect")]
-        public static extern void WidgetResizeSignalType_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetResizeSignalType_Emit")]
-        public static extern void WidgetResizeSignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WidgetResizeSignalType")]
-        public static extern global::System.IntPtr new_WidgetResizeSignalType();
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WidgetResizeSignalType")]
-        public static extern void delete_WidgetResizeSignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetUpdateSignalType_Empty")]
-        public static extern bool WidgetUpdateSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetUpdateSignalType_GetConnectionCount")]
-        public static extern uint WidgetUpdateSignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetUpdateSignalType_Connect")]
-        public static extern void WidgetUpdateSignalType_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetUpdateSignalType_Disconnect")]
-        public static extern void WidgetUpdateSignalType_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetUpdateSignalType_Emit")]
-        public static extern void WidgetUpdateSignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3, int jarg4);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WidgetUpdateSignalType")]
-        public static extern global::System.IntPtr new_WidgetUpdateSignalType();
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WidgetUpdateSignalType")]
-        public static extern void delete_WidgetUpdateSignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_AppSignalType_Empty")]
-        public static extern bool AppSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_AppSignalType_GetConnectionCount")]
-        public static extern uint AppSignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_AppSignalType_Connect")]
-        public static extern void AppSignalType_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_AppSignalType_Disconnect")]
-        public static extern void AppSignalType_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_AppSignalType_Emit")]
-        public static extern void AppSignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_AppSignalType")]
-        public static extern global::System.IntPtr new_AppSignalType();
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_AppSignalType")]
-        public static extern void delete_AppSignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LowBatterySignalType_Empty")]
-        public static extern bool WidgetApplication_LowBatterySignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LowBatterySignalType_GetConnectionCount")]
-        public static extern uint WidgetApplication_LowBatterySignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LowBatterySignalType_Connect")]
-        public static extern void WidgetApplication_LowBatterySignalType_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LowBatterySignalType_Disconnect")]
-        public static extern void WidgetApplication_LowBatterySignalType_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LowBatterySignalType_Emit")]
-        public static extern void WidgetApplication_LowBatterySignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_new_LowBatterySignalType")]
-        public static extern global::System.IntPtr WidgetApplication_new_LowBatterySignalType();
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_delete_LowBatterySignalType")]
-        public static extern void WidgetApplication_delete_LowBatterySignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LowMemorySignalType_Empty")]
-        public static extern bool WidgetApplication_LowMemorySignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LowMemorySignalType_GetConnectionCount")]
-        public static extern uint WidgetApplication_LowMemorySignalType_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LowMemorySignalType_Connect")]
-        public static extern void WidgetApplication_LowMemorySignalType_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
-
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LowMemorySignalType_Disconnect")]
-        public static extern void WidgetApplication_LowMemorySignalType_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_New")]
+        public static extern global::System.IntPtr WidgetApplication_New(int jarg1, string jarg2, string jarg3);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_LowMemorySignalType_Emit")]
-        public static extern void WidgetApplication_LowMemorySignalType_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WidgetApplication__SWIG_0")]
+        public static extern global::System.IntPtr new_WidgetApplication__SWIG_0();
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_new_LowMemorySignalType")]
-        public static extern global::System.IntPtr WidgetApplication_new_LowMemorySignalType();
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_WidgetApplication__SWIG_1")]
+        public static extern global::System.IntPtr new_WidgetApplication__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1);
 
-        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_delete_LowMemorySignalType")]
-        public static extern void WidgetApplication_delete_LowMemorySignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_Assign")]
+        public static extern global::System.IntPtr WidgetApplication_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
 
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_WidgetApplication")]
+        public static extern void delete_WidgetApplication(global::System.Runtime.InteropServices.HandleRef jarg1);
 
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetApplication_RegisterWidgetCreatingFunction")]
+        public static extern void WidgetApplication_RegisterWidgetCreatingFunction(global::System.Runtime.InteropServices.HandleRef jarg1, ref string jarg2, global::System.Runtime.InteropServices.HandleRef jarg3);
+        // End widget
 
         [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Actor_Property_INHERIT_LAYOUT_DIRECTION_get")]
         public static extern int Actor_Property_INHERIT_LAYOUT_DIRECTION_get();
@@ -1895,5 +1723,24 @@ namespace Tizen.NUI
 
         [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_FontClient_AddCustomFontDirectory")]
         public static extern bool FontClient_AddCustomFontDirectory(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);
+
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_TextField_Property_ENABLE_SHIFT_SELECTION_get")]
+        public static extern int TextField_Property_ENABLE_SHIFT_SELECTION_get();
+
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_TextEditor_Property_ENABLE_SHIFT_SELECTION_get")]
+        public static extern int TextEditor_Property_ENABLE_SHIFT_SELECTION_get();
+
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_ImageView_IMAGE_VISUAL_ACTION_RELOAD_get")]
+        public static extern int ImageView_IMAGE_VISUAL_ACTION_RELOAD_get();
+
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_ImageView_IMAGE_VISUAL_ACTION_PLAY_get")]
+        public static extern int ImageView_IMAGE_VISUAL_ACTION_PLAY_get();
+
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_ImageView_IMAGE_VISUAL_ACTION_PAUSE_get")]
+        public static extern int ImageView_IMAGE_VISUAL_ACTION_PAUSE_get();
+
+        [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_ImageView_IMAGE_VISUAL_ACTION_STOP_get")]
+        public static extern int ImageView_IMAGE_VISUAL_ACTION_STOP_get();
+
     }
 }
index 25e5c57..40607d6 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2018 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -884,6 +884,7 @@ namespace Tizen.NUI
         internal static readonly int IMAGE_VISUAL_BATCH_SIZE = NDalicPINVOKE.IMAGE_VISUAL_BATCH_SIZE_get();
         internal static readonly int IMAGE_VISUAL_CACHE_SIZE = NDalicPINVOKE.IMAGE_VISUAL_CACHE_SIZE_get();
         internal static readonly int IMAGE_VISUAL_FRAME_DELAY = NDalicPINVOKE.IMAGE_VISUAL_FRAME_DELAY_get();
+        internal static readonly int IMAGE_VISUAL_LOOP_COUNT = NDalicPINVOKE.IMAGE_VISUAL_LOOP_COUNT_get();
         internal static readonly int IMAGE_VISUAL_MASK_CONTENT_SCALE = NDalicPINVOKE.IMAGE_VISUAL_MASK_CONTENT_SCALE_get();
         internal static readonly int IMAGE_VISUAL_CROP_TO_MASK = NDalicPINVOKE.IMAGE_VISUAL_CROP_TO_MASK_get();
         internal static readonly int IMAGE_VISUAL_RELEASE_POLICY = NDalicPINVOKE.IMAGE_VISUAL_RELEASE_POLICY_get();
index f549a4c..319265e 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2018 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -6625,6 +6625,9 @@ class NDalicPINVOKE {
   [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_IMAGE_VISUAL_FRAME_DELAY_get")]
   public static extern int IMAGE_VISUAL_FRAME_DELAY_get();
 
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_IMAGE_VISUAL_LOOP_COUNT_get")]
+  public static extern int IMAGE_VISUAL_LOOP_COUNT_get();
+
   [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_IMAGE_VISUAL_MASK_CONTENT_SCALE_get")]
   public static extern int IMAGE_VISUAL_MASK_CONTENT_SCALE_get();
 
@@ -11400,7 +11403,116 @@ class NDalicPINVOKE {
   [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_delete_Extents")]
   public static extern void delete_Extents(global::System.Runtime.InteropServices.HandleRef jarg1);
 
-  }
 
+  //for PixelBuffer and ImageLoading
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_PixelBuffer_SWIGUpcast")]
+  public static extern global::System.IntPtr PixelBuffer_SWIGUpcast(global::System.IntPtr jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PixelBuffer_New")]
+  public static extern global::System.IntPtr PixelBuffer_New(uint jarg1, uint jarg2, int jarg3);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_PixelBuffer__SWIG_0")]
+  public static extern global::System.IntPtr new_PixelBuffer__SWIG_0();
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_PixelBuffer")]
+  public static extern void delete_PixelBuffer(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_PixelBuffer__SWIG_1")]
+  public static extern global::System.IntPtr new_PixelBuffer__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PixelBuffer_Assign")]
+  public static extern global::System.IntPtr PixelBuffer_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PixelBuffer_Convert")]
+  public static extern global::System.IntPtr PixelBuffer_Convert(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PixelBuffer_CreatePixelData")]
+  public static extern global::System.IntPtr PixelBuffer_CreatePixelData(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PixelBuffer_GetBuffer")]
+  public static extern global::System.IntPtr PixelBuffer_GetBuffer(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PixelBuffer_GetWidth")]
+  public static extern uint PixelBuffer_GetWidth(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PixelBuffer_GetHeight")]
+  public static extern uint PixelBuffer_GetHeight(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PixelBuffer_GetPixelFormat")]
+  public static extern int PixelBuffer_GetPixelFormat(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PixelBuffer_ApplyMask__SWIG_0")]
+  public static extern void PixelBuffer_ApplyMask__SWIG_0(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, float jarg3, bool jarg4);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PixelBuffer_ApplyMask__SWIG_1")]
+  public static extern void PixelBuffer_ApplyMask__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, float jarg3);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PixelBuffer_ApplyMask__SWIG_2")]
+  public static extern void PixelBuffer_ApplyMask__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PixelBuffer_ApplyGaussianBlur")]
+  public static extern void PixelBuffer_ApplyGaussianBlur(global::System.Runtime.InteropServices.HandleRef jarg1, float jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PixelBuffer_Crop")]
+  public static extern void PixelBuffer_Crop(global::System.Runtime.InteropServices.HandleRef jarg1, ushort jarg2, ushort jarg3, ushort jarg4, ushort jarg5);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_PixelBuffer_Resize")]
+  public static extern void PixelBuffer_Resize(global::System.Runtime.InteropServices.HandleRef jarg1, ushort jarg2, ushort jarg3);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_PixelBuffer__SWIG_2")]
+  public static extern global::System.IntPtr new_PixelBuffer__SWIG_2(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_LoadImageFromFile__SWIG_0")]
+  public static extern global::System.IntPtr LoadImageFromFile__SWIG_0(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3, int jarg4, bool jarg5);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_LoadImageFromFile__SWIG_1")]
+  public static extern global::System.IntPtr LoadImageFromFile__SWIG_1(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3, int jarg4);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_LoadImageFromFile__SWIG_2")]
+  public static extern global::System.IntPtr LoadImageFromFile__SWIG_2(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_LoadImageFromFile__SWIG_3")]
+  public static extern global::System.IntPtr LoadImageFromFile__SWIG_3(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_LoadImageFromFile__SWIG_4")]
+  public static extern global::System.IntPtr LoadImageFromFile__SWIG_4(string jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetClosestImageSize__SWIG_0")]
+  public static extern global::System.IntPtr GetClosestImageSize__SWIG_0(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3, int jarg4, bool jarg5);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetClosestImageSize__SWIG_1")]
+  public static extern global::System.IntPtr GetClosestImageSize__SWIG_1(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3, int jarg4);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetClosestImageSize__SWIG_2")]
+  public static extern global::System.IntPtr GetClosestImageSize__SWIG_2(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetClosestImageSize__SWIG_3")]
+  public static extern global::System.IntPtr GetClosestImageSize__SWIG_3(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetClosestImageSize__SWIG_4")]
+  public static extern global::System.IntPtr GetClosestImageSize__SWIG_4(string jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_DownloadImageSynchronously__SWIG_0")]
+  public static extern global::System.IntPtr DownloadImageSynchronously__SWIG_0(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3, int jarg4, bool jarg5);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_DownloadImageSynchronously__SWIG_1")]
+  public static extern global::System.IntPtr DownloadImageSynchronously__SWIG_1(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3, int jarg4);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_DownloadImageSynchronously__SWIG_2")]
+  public static extern global::System.IntPtr DownloadImageSynchronously__SWIG_2(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2, int jarg3);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_DownloadImageSynchronously__SWIG_3")]
+  public static extern global::System.IntPtr DownloadImageSynchronously__SWIG_3(string jarg1, global::System.Runtime.InteropServices.HandleRef jarg2);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_DownloadImageSynchronously__SWIG_4")]
+  public static extern global::System.IntPtr DownloadImageSynchronously__SWIG_4(string jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_SetMaxTextureSize")]
+  public static extern void SetMaxTextureSize(uint jarg1);
+
+  [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_GetMaxTextureSize")]
+  public static extern uint GetMaxTextureSize();
+
+    }
 }
 
index 0f8ff84..55c7193 100755 (executable)
@@ -30,6 +30,7 @@ namespace Tizen.NUI
         /// </summary>
         protected WidgetApplication _application;
         private string _stylesheet = "";
+        Dictionary<System.Type, string> _widgetInfo;
 
         /// <summary>
         /// Dictionary to contain each type of event callback.
@@ -41,8 +42,6 @@ namespace Tizen.NUI
         /// </summary>
         public NUIWidgetCoreBackend()
         {
-            //Tizen.Log.Fatal("NUI", "### NUIWidgetCoreBackend called");
-            //_application = WidgetApplication.NewWidgetApplication();
         }
 
         /// <summary>
@@ -51,7 +50,6 @@ namespace Tizen.NUI
         public NUIWidgetCoreBackend(string stylesheet)
         {
             _stylesheet = stylesheet;
-            //_application = WidgetApplication.NewWidgetApplication(stylesheet);
         }
 
         /// <summary>
@@ -83,7 +81,6 @@ namespace Tizen.NUI
         /// </summary>
         public void Dispose()
         {
-            Tizen.Log.Fatal("NUI", "### NUIWidgetCoreBackend Dispose called");
             if (_application != null)
             {
                 _application.Dispose();
@@ -95,106 +92,142 @@ namespace Tizen.NUI
         /// </summary>
         public void Exit()
         {
-            Tizen.Log.Fatal("NUI", "### NUIWidgetCoreBackend Exit called");
             if (_application != null)
             {
                 _application.Quit();
             }
         }
 
+        public void RegisterWidgetInfo(Dictionary<System.Type, string> widgetInfo)
+        {
+            _widgetInfo = widgetInfo;
+        }
+
         /// <summary>
         /// Run Application.
         /// </summary>
         /// <param name="args">Arguments from commandline.</param>
         public void Run(string[] args)
         {
+            TizenSynchronizationContext.Initialize();
+
             args[0] = Tizen.Applications.Application.Current.ApplicationInfo.ExecutablePath;
             _application = WidgetApplication.NewWidgetApplication(args, _stylesheet);
+            _application.RegisterWidgetInfo(_widgetInfo);
 
-            TizenSynchronizationContext.Initialize();
             _application.BatteryLow += OnBatteryLow;
             _application.LanguageChanged += OnLanguageChanged;
             _application.MemoryLow += OnMemoryLow;
             _application.RegionChanged += OnRegionChanged; ;
-
-            _application.Init += OnInit;
-            _application.Terminate += OnTerminate;
+            _application.Initialized += OnInitialized;
+            _application.Terminating += OnTerminated;
 
             _application.MainLoop();
         }
 
-        private void OnInit(object sender, WidgetApplication.WidgetApplicationEventArgs e)
+        /// <summary>
+        /// The Initialized event callback function.
+        /// </summary>
+        /// <param name="source">The application instance.</param>
+        /// <param name="e">The event argument for Initialized.</param>
+        private void OnInitialized(object source, NUIApplicationInitEventArgs e)
         {
-            Log.Fatal("NUI", "NUIWidgetApplication OnPreCreated Called");
             var preCreateHandler = Handlers[EventType.PreCreated] as Action;
             preCreateHandler?.Invoke();
 
-            Log.Fatal("NUI", "NUIWidgetApplication OnCreate Called");
             var createHandler = Handlers[EventType.Created] as Action;
             createHandler?.Invoke();
-
+            _application.RegisterWidgetCreatingFunction();
         }
 
-        private void OnTerminate(object sender, WidgetApplication.WidgetApplicationEventArgs e)
+        /// <summary>
+        /// The Terminated event callback function.
+        /// </summary>
+        /// <param name="source">The application instance.</param>
+        /// <param name="e">The event argument for Terminated.</param>
+        private void OnTerminated(object source, NUIApplicationTerminatingEventArgs e)
         {
-            Log.Fatal("NUI", "NUIWidgetApplication OnTerminated Called");
             var handler = Handlers[EventType.Terminated] as Action;
             handler?.Invoke();
         }
 
         /// <summary>
-        /// Region changed event callback function.
+        /// The Region changed event callback function.
         /// </summary>
-        /// <param name="sender">Application instance</param>
-        /// <param name="e">Event argument for RegionChanged</param>
-        private void OnRegionChanged(object sender, WidgetApplication.WidgetApplicationEventArgs e)
+        /// <param name="source">The application instance.</param>
+        /// <param name="e">The event argument for RegionChanged.</param>
+        private void OnRegionChanged(object source, NUIApplicationRegionChangedEventArgs e)
         {
-            Log.Fatal("NUI", "NUIWidgetApplication OnRegionChanged Called");
             var handler = Handlers[EventType.RegionFormatChanged] as Action<RegionFormatChangedEventArgs>;
-            // Need to make new signal return in native to return right value.
-            handler?.Invoke(new RegionFormatChangedEventArgs(""));
+            handler?.Invoke(new RegionFormatChangedEventArgs(e.Application.GetRegion()));
         }
 
         /// <summary>
-        /// Memory Low event callback function.
+        /// The Language changed event callback function.
         /// </summary>
-        /// <param name="sender">Application instance</param>
-        /// <param name="e">Event argument for MemoryLow</param>
-        private void OnMemoryLow(object sender, WidgetApplication.WidgetApplicationEventArgs e)
+        /// <param name="source">The application instance.</param>
+        /// <param name="e">The event argument for LanguageChanged.</param>
+        private void OnLanguageChanged(object source, NUIApplicationLanguageChangedEventArgs e)
         {
-            Log.Fatal("NUI", "NUIWidgetApplication OnMemoryLow Called");
-            var handler = Handlers[EventType.LowMemory] as Action<LowMemoryEventArgs>;
-            // Need to make new signal return in native to return right value.
-            handler?.Invoke(new LowMemoryEventArgs(LowMemoryStatus.None));
+            var handler = Handlers[EventType.LocaleChanged] as Action<LocaleChangedEventArgs>;
+            handler?.Invoke(new LocaleChangedEventArgs(e.Application.GetLanguage()));
         }
 
         /// <summary>
-        /// Language changed event callback function.
+        /// The Memory Low event callback function.
         /// </summary>
-        /// <param name="sender">Application instance</param>
-        /// <param name="e">Event argument for LanguageChanged</param>
-        private void OnLanguageChanged(object sender, WidgetApplication.WidgetApplicationEventArgs e)
+        /// <param name="source">The application instance.</param>
+        /// <param name="e">The event argument for MemoryLow.</param>
+        private void OnMemoryLow(object source, NUIApplicationMemoryLowEventArgs e)
         {
+            var handler = Handlers[EventType.LowMemory] as Action<LowMemoryEventArgs>;
 
-            Log.Fatal("NUI", "NUIWidgetApplication OnLanguageChanged Called");
-            var handler = Handlers[EventType.LocaleChanged] as Action<LocaleChangedEventArgs>;
-            // Need to make new signal return in native to return right value.
-            handler?.Invoke(new LocaleChangedEventArgs(""));
-
+            switch (e.MemoryStatus)
+            {
+                case Application.MemoryStatus.Normal:
+                {
+                    handler?.Invoke(new LowMemoryEventArgs(LowMemoryStatus.None));
+                    break;
+                }
+                case Application.MemoryStatus.Low:
+                {
+                    handler?.Invoke(new LowMemoryEventArgs(LowMemoryStatus.SoftWarning));
+                    break;
+                }
+                case Application.MemoryStatus.CriticallyLow:
+                {
+                    handler?.Invoke(new LowMemoryEventArgs(LowMemoryStatus.HardWarning));
+                    break;
+                }
+            }
         }
 
         /// <summary>
-        /// Battery low event callback function.
+        /// The Battery Low event callback function.
         /// </summary>
-        /// <param name="sender">Application instance</param>
-        /// <param name="e">Event argument for BatteryLow</param>
-        private void OnBatteryLow(object sender, WidgetApplication.WidgetApplicationEventArgs e)
+        /// <param name="source">The application instance.</param>
+        /// <param name="e">The event argument for BatteryLow.</param>
+        private void OnBatteryLow(object source, NUIApplicationBatteryLowEventArgs e)
         {
-            Log.Fatal("NUI", "NUIWidgetApplication OnBatteryLow Called");
             var handler = Handlers[EventType.LowBattery] as Action<LowBatteryEventArgs>;
-            // Need to make new signal return in native to return right value.
-            handler?.Invoke(new LowBatteryEventArgs(LowBatteryStatus.None));
-
+            switch (e.BatteryStatus)
+            {
+                case Application.BatteryStatus.Normal:
+                {
+                    handler?.Invoke(new LowBatteryEventArgs(LowBatteryStatus.None));
+                    break;
+                }
+                case Application.BatteryStatus.CriticallyLow:
+                {
+                    handler?.Invoke(new LowBatteryEventArgs(LowBatteryStatus.CriticalLow));
+                    break;
+                }
+                case Application.BatteryStatus.PowerOff:
+                {
+                    handler?.Invoke(new LowBatteryEventArgs(LowBatteryStatus.PowerOff));
+                    break;
+                }
+            }
         }
 
         internal WidgetApplication WidgetApplicationHandle
index b197472..2d64e4c 100755 (executable)
@@ -27,6 +27,11 @@ namespace Tizen.NUI
     {
         public static PropertyValue GetProperty(global::System.Runtime.InteropServices.HandleRef handle, int index)
         {
+            if(handle.Handle == System.IntPtr.Zero)
+            {
+                throw new System.InvalidOperationException("Error! NUI's native dali object is already disposed. OR the native dali object handle of NUI becomes null!");
+            }
+
             PropertyValue ret = new PropertyValue(NDalicPINVOKE.Handle_GetProperty(handle, index), true);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -34,6 +39,11 @@ namespace Tizen.NUI
 
         public static void SetProperty(global::System.Runtime.InteropServices.HandleRef handle, int index, PropertyValue propertyValue)
         {
+            if (handle.Handle == System.IntPtr.Zero)
+            {
+                throw new System.InvalidOperationException("Error! NUI's native dali object is already disposed. OR the native dali object handle of NUI becomes null!");
+            }
+
             NDalicPINVOKE.Handle_SetProperty(handle, index, PropertyValue.getCPtr(propertyValue));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
index aea7cbe..fc254b8 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2018 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -55,16 +55,12 @@ namespace Tizen.NUI
         /// <param name="baseHandle">The instance of BaseHandle (C# base class).</param>
         internal static void Register(BaseHandle baseHandle)
         {
-            if(savedApplicationThread?.ManagedThreadId != Thread.CurrentThread.ManagedThreadId)
-            {
-                throw new global::System.ApplicationException("NUI object is attempt to be created in another thread. It should be created in main thread only!");
-            }
 
             // We store a pointer to the RefObject for the control
             RefObject refObj = baseHandle.GetObjectPtr();
             IntPtr refCptr = (IntPtr)RefObject.getCPtr(refObj);
 
-            NUILog.Debug("Storing ref object cptr in control map Hex: {0:X}" + refCptr);
+            //NUILog.Debug("Storing ref object cptr in control map Hex: {0:X}" + refCptr);
 
             if (!Instance._controlMap.ContainsKey(refCptr))
             {
@@ -96,16 +92,32 @@ namespace Tizen.NUI
             RefObject refObj = baseHandle.GetObjectPtr();
             IntPtr refObjectPtr = (IntPtr)RefObject.getCPtr(refObj);
 
-            // we store a dictionary of ref-obects (C++ land) to managed obects (C# land)
-            return GetManagedBaseHandleFromRefObject(refObjectPtr);
+            if (refObjectPtr != null)
+            {
+                // we store a dictionary of ref-obects (C++ land) to managed obects (C# land)
+                return GetManagedBaseHandleFromRefObject(refObjectPtr);
+            }
+            else
+            {
+                NUILog.Error("NUI Registry RefObjectPtr is NULL!");
+                return null;
+            }
         }
 
         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);
+            if (refObjectPtr != null)
+            {
+                // we store a dictionary of ref-obects (C++ land) to managed obects (C# land)
+                return GetManagedBaseHandleFromRefObject(refObjectPtr);
+            }
+            else
+            {
+                NUILog.Error("NUI Registry RefObjectPtr is NULL!");
+                return null;
+            }
         }
 
         internal static BaseHandle GetManagedBaseHandleFromRefObject(IntPtr refObjectPtr)
diff --git a/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Widget__Impl.cs b/src/Tizen.NUI/src/internal/SWIGTYPE_p_Dali__Widget__Impl.cs
new file mode 100755 (executable)
index 0000000..bd4e5fd
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+namespace Tizen.NUI
+{
+
+    internal class SWIGTYPE_p_Dali__Widget__Impl
+    {
+        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+        internal SWIGTYPE_p_Dali__Widget__Impl(global::System.IntPtr cPtr, bool futureUse)
+        {
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+        }
+
+        protected SWIGTYPE_p_Dali__Widget__Impl()
+        {
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+        }
+
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(SWIGTYPE_p_Dali__Widget__Impl obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+        }
+    }
+
+}
index fda4dd7..aae2fa5 100755 (executable)
@@ -133,6 +133,19 @@ namespace Tizen.NUI
             }
         }
 
+        public void Connect(System.IntPtr callback)
+        {
+            NDalicPINVOKE.TimerSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, callback));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        public void Disconnect(System.IntPtr callback)
+        {
+            NDalicPINVOKE.TimerSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, callback));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+
         public bool Emit()
         {
             bool ret = NDalicPINVOKE.TimerSignalType_Emit(swigCPtr);
index c0ca109..899f087 100755 (executable)
@@ -24,10 +24,10 @@ namespace Tizen.NUI
     {
         public const int daliVer1 = 1;
         public const int daliVer2 = 2;
-        public const int daliVer3 = 66;
-        public const int nuiVer1 = 0;
+        public const int daliVer3 = 83;
+        public const int nuiVer1 = 1;
         public const int nuiVer2 = 2;
-        public const int nuiVer3 = 66;
+        public const int nuiVer3 = 83;
         public const string nuiRelease = "";
 
 
index c1cb572..3c009a6 100755 (executable)
@@ -14,6 +14,7 @@
  * limitations under the License.
  *
  */
+using System.Runtime.InteropServices;
 using Tizen.NUI.BaseComponents;
 namespace Tizen.NUI
 {
@@ -251,8 +252,12 @@ namespace Tizen.NUI
 
         public VisualBase GetVisual(int index)
         {
+            //to fix memory leak issue, match the handle count with native side.
             System.IntPtr cPtr = NDalicManualPINVOKE.ViewWrapperImpl_GetVisual(swigCPtr, index);
-            VisualBase ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as VisualBase;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            VisualBase ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as VisualBase;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
index ecebcf8..02022dd 100755 (executable)
  *
  */
 using System;
-using System.Runtime.InteropServices;
+using System.Collections.Generic;
 
 namespace Tizen.NUI
 {
-    /// <summary>
-    /// Widget application
-    /// </summary>
-    internal class WidgetApplication : BaseHandle
+    internal class WidgetApplication : Application
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+        private static WidgetApplication _instance; //singleton
+        private Dictionary<System.Type, string> _widgetInfo;
+        private List<Widget> _widgetList = new List<Widget>();
+        private delegate System.IntPtr CreateWidgetFunctionDelegate(ref string widgetName);
 
-        internal WidgetApplication(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.WidgetApplication_SWIGUpcast(cPtr), cMemoryOwn)
+        internal WidgetApplication(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
         {
             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
         }
@@ -36,17 +37,14 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        /// <summary>
-        /// To make Window instance be disposed.
-        /// </summary>
         protected override void Dispose(DisposeTypes type)
         {
-            if(disposed)
+            if (disposed)
             {
                 return;
             }
 
-            if(type == DisposeTypes.Explicit)
+            if (type == DisposeTypes.Explicit)
             {
                 //Called by User
                 //Release your own managed resources here.
@@ -56,32 +54,6 @@ namespace Tizen.NUI
             //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.
-
-            if (_initCallback != null)
-            {
-                this.InitSignal().Disconnect(_initCallback);
-            }
-            if (_terminateCallback != null)
-            {
-                this.TerminateSignal().Disconnect(_terminateCallback);
-            }
-            if (_languageChangedCallback != null)
-            {
-                this.LanguageChangedSignal().Disconnect(_languageChangedCallback);;
-            }
-            if (_regionChangedCallback != null)
-            {
-                this.RegionChangedSignal().Disconnect(_regionChangedCallback);
-            }
-            if (_batteryLowCallback != null)
-            {
-                this.BatteryLowSignal().Disconnect(_batteryLowCallback);
-            }
-            if (_memoryLowCallback != null)
-            {
-                this.MemoryLowSignal().Disconnect(_memoryLowCallback);
-            }
-            
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
@@ -91,18 +63,10 @@ namespace Tizen.NUI
                 }
                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
             }
-
             base.Dispose(type);
         }
 
-        internal static WidgetApplication GetWidgetApplicationFromPtr(global::System.IntPtr cPtr)
-        {
-            WidgetApplication ret = new WidgetApplication(cPtr, false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public static WidgetApplication Instance
+        public new static WidgetApplication Instance
         {
             get
             {
@@ -114,7 +78,6 @@ namespace Tizen.NUI
         {
             WidgetApplication ret = New(args, stylesheet);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
             _instance = ret;
             return ret;
         }
@@ -124,420 +87,82 @@ namespace Tizen.NUI
             int argc = args.Length;
             string argvStr = string.Join(" ", args);
 
-            WidgetApplication ret = new WidgetApplication(NDalicManualPINVOKE.WidgetApplication_New(argc, argvStr, stylesheet), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-        internal WidgetApplication(WidgetApplication widgetApplication) : this(NDalicManualPINVOKE.new_WidgetApplication__SWIG_1(WidgetApplication.getCPtr(widgetApplication)), true)
-        {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        internal WidgetApplication Assign(WidgetApplication widgetApplication)
-        {
-            WidgetApplication ret = new WidgetApplication(NDalicManualPINVOKE.WidgetApplication_Assign(swigCPtr, WidgetApplication.getCPtr(widgetApplication)), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
+            IntPtr widgetIntPtr = NDalicManualPINVOKE.WidgetApplication_New(argc, argvStr, stylesheet);
 
-        /// <summary>
-        /// This starts the application.
-        /// </summary>
-        public void MainLoop()
-        {
-            NDalicManualPINVOKE.WidgetApplication_MainLoop(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-            {
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        /// <summary>
-        /// This quits the application.
-        /// Tizen applications should use Lower to improve re-start performance unless they need to Quit completely.
-        /// </summary>
-        public void Quit()
-        {
-            NDalicManualPINVOKE.WidgetApplication_Quit(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        /// <summary>
-        /// Get path application resources are stored at.
-        /// </summary>
-        /// <returns>The full path of the resources</returns>
-        public static string GetResourcePath()
-        {
-            string ret = NDalicManualPINVOKE.WidgetApplication_GetResourcePath();
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        /// <summary>
-        /// Get region information from device.
-        /// </summary>
-        /// <returns>Region information</returns>
-        public string GetRegion()
-        {
-            string ret = NDalicManualPINVOKE.WidgetApplication_GetRegion(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
+            WidgetApplication ret = new WidgetApplication(widgetIntPtr, false);
 
-        /// <summary>
-        /// Get language from device.
-        /// </summary>
-        /// <returns>Language information</returns>
-        public string GetLanguage()
-        {
-            string ret = NDalicManualPINVOKE.WidgetApplication_GetLanguage(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        /// <summary>
-        /// Event arguments that passed via widget app event signal.
-        /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        public class WidgetApplicationEventArgs : EventArgs
-        {
-            /// <summary>
-            /// Widget application.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            public WidgetApplication WidgetApplication
-            {
-                get;
-                set;
-            }
-        }
-
-        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        private delegate void InitCallbackType(IntPtr widgetApplication);
-        private InitCallbackType _initCallback;
-        private DaliEventHandler<object,WidgetApplicationEventArgs> _initEventHandler;
-
-        /// <summary>
-        /// Init event.
-        /// </summary>
-        public event DaliEventHandler<object, WidgetApplicationEventArgs> Init
-        {
-            add
-            {
-                if (_initEventHandler == null)
-                {
-                    _initCallback = new InitCallbackType( OnInit);
-                    InitSignal().Connect(_initCallback);
-                }
-
-                _initEventHandler += value;
-            }
-
-            remove
-            {
-                _initEventHandler -= value;
-
-                if (_initEventHandler == null && InitSignal().Empty() == false)
-                {
-                   InitSignal().Disconnect(_initCallback);
-                }
-            }
-        }
 
-        private void OnInit(IntPtr widgetApplication)
-        {
-            WidgetApplicationEventArgs e = new WidgetApplicationEventArgs();
-            if (widgetApplication != null)
-            {
-                e.WidgetApplication = WidgetApplication.GetWidgetApplicationFromPtr(widgetApplication);
-            }
-
-            if (_initEventHandler != null)
-            {
-                _initEventHandler(this, e);
-            }
-        }
-
-        internal AppSignalType InitSignal()
-        {
-            AppSignalType ret = new AppSignalType(NDalicManualPINVOKE.WidgetApplication_InitSignal(swigCPtr), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
-        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        private delegate void TerminateCallbackType(IntPtr widgetApplication);
-        private TerminateCallbackType _terminateCallback;
-        private DaliEventHandler<object, WidgetApplicationEventArgs> _terminateEventHandler;
-
-        /// <summary>
-        /// Terminate event.
-        /// </summary>
-        public event DaliEventHandler<object, WidgetApplicationEventArgs> Terminate
-        {
-            add
-            {
-                if (_terminateEventHandler == null)
-                {
-                    _terminateCallback = new TerminateCallbackType( OnTerminate);
-                    TerminateSignal().Connect(_terminateCallback);
-                }
-
-                _terminateEventHandler += value;
-            }
-
-            remove
-            {
-                _terminateEventHandler -= value;
-
-                if (_terminateEventHandler == null && TerminateSignal().Empty() == false)
-                {
-                   TerminateSignal().Disconnect(_terminateCallback);
-                }
-            }
-        }
-
-        private void OnTerminate(IntPtr widgetApplication)
-        {
-            WidgetApplicationEventArgs e = new WidgetApplicationEventArgs();
-
-            if (widgetApplication != null)
-            {
-                e.WidgetApplication = WidgetApplication.GetWidgetApplicationFromPtr(widgetApplication);
-            }
-
-            if (_terminateEventHandler != null)
-            {
-                _terminateEventHandler(this, e);
-            }
-        }
-
-        internal AppSignalType TerminateSignal()
+        internal WidgetApplication(WidgetApplication widgetApplication) : this(NDalicManualPINVOKE.new_WidgetApplication__SWIG_1(WidgetApplication.getCPtr(widgetApplication)), true)
         {
-            AppSignalType ret = new AppSignalType(NDalicManualPINVOKE.WidgetApplication_TerminateSignal(swigCPtr), false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        private delegate void LanguageChangedCallbackType(IntPtr widgetApplication);
-        private LanguageChangedCallbackType _languageChangedCallback;
-        private DaliEventHandler<object, WidgetApplicationEventArgs> _languageChangedEventHandler;
-
-        /// <summary>
-        /// LanguageChanged event.
-        /// </summary>
-        public event DaliEventHandler<object, WidgetApplicationEventArgs> LanguageChanged
-        {
-            add
-            {
-                if (_languageChangedEventHandler == null)
-                {
-                    _languageChangedCallback = new LanguageChangedCallbackType( OnLanguageChanged);
-                    LanguageChangedSignal().Connect(_languageChangedCallback);
-                }
-
-                _languageChangedEventHandler += value;
-            }
-
-            remove
-            {
-                _languageChangedEventHandler -= value;
-
-                if (_languageChangedEventHandler == null && LanguageChangedSignal().Empty() == false)
-                {
-                   LanguageChangedSignal().Disconnect(_languageChangedCallback);
-                }
-            }
         }
 
-        private void OnLanguageChanged(IntPtr widgetApplication)
-        {
-            WidgetApplicationEventArgs e = new WidgetApplicationEventArgs();
-
-            if (widgetApplication != null)
-            {
-                e.WidgetApplication = WidgetApplication.GetWidgetApplicationFromPtr(widgetApplication);
-            }
-
-            if (_languageChangedEventHandler != null)
-            {
-                _languageChangedEventHandler(this, e);
-            }
-        }
-
-        internal AppSignalType LanguageChangedSignal()
+        internal WidgetApplication Assign(WidgetApplication widgetApplication)
         {
-            AppSignalType ret = new AppSignalType(NDalicManualPINVOKE.WidgetApplication_LanguageChangedSignal(swigCPtr), false);
+            WidgetApplication ret = new WidgetApplication(NDalicManualPINVOKE.WidgetApplication_Assign(swigCPtr, WidgetApplication.getCPtr(widgetApplication)), false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
-        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        private delegate void RegionChangedCallbackType(IntPtr widgetApplication);
-        private RegionChangedCallbackType _regionChangedCallback;
-        private DaliEventHandler<object, WidgetApplicationEventArgs> _regionChangedEventHandler;
-
-        /// <summary>
-        /// RegionChanged event.
-        /// </summary>
-        public event DaliEventHandler<object, WidgetApplicationEventArgs> RegionChanged
+        public void RegisterWidgetCreatingFunction()
         {
-            add
-            {
-                if (_regionChangedEventHandler == null)
-                {
-                    _regionChangedCallback = new RegionChangedCallbackType( OnRegionChanged );
-                    RegionChangedSignal().Connect(_regionChangedCallback);
-                }
-
-                _regionChangedEventHandler += value;
-            }
-
-            remove
+            foreach (KeyValuePair<System.Type, string> widgetInfo in _widgetInfo)
             {
-                _regionChangedEventHandler -= value;
-
-                if (_regionChangedEventHandler == null && RegionChangedSignal().Empty() == false)
-                {
-                   RegionChangedSignal().Disconnect(_regionChangedCallback);
-                }
+                string widgetName = widgetInfo.Value;
+                RegisterWidgetCreatingFunction(ref widgetName);
             }
         }
 
-        private void OnRegionChanged(IntPtr widgetApplication)
+        internal void RegisterWidgetCreatingFunction(ref string widgetName)
         {
-            WidgetApplicationEventArgs e = new WidgetApplicationEventArgs();
+            CreateWidgetFunctionDelegate newDelegate = new CreateWidgetFunctionDelegate(WidgetCreateFunction);
 
-            if (widgetApplication != null)
-            {
-                e.WidgetApplication = WidgetApplication.GetWidgetApplicationFromPtr(widgetApplication);
-            }
+            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(newDelegate);
+            CreateWidgetFunction createWidgetFunction = new CreateWidgetFunction(ip, true);
 
-            if (_regionChangedEventHandler != null)
-            {
-                _regionChangedEventHandler(this, e);
-            }
-        }
-
-        internal AppSignalType RegionChangedSignal()
-        {
-            AppSignalType ret = new AppSignalType(NDalicManualPINVOKE.WidgetApplication_RegionChangedSignal(swigCPtr), false);
+            NDalicManualPINVOKE.WidgetApplication_RegisterWidgetCreatingFunction(swigCPtr, ref widgetName, CreateWidgetFunction.getCPtr(createWidgetFunction));
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
         }
 
-        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        private delegate void BatteryLowCallbackType(IntPtr widgetApplication);
-        private BatteryLowCallbackType _batteryLowCallback;
-        private DaliEventHandler<object, WidgetApplicationEventArgs> _batteryLowEventHandler;
-
-        /// <summary>
-        /// BatteryLow event.
-        /// </summary>
-        public event DaliEventHandler<object, WidgetApplicationEventArgs> BatteryLow
+        public void AddWidgetInstance( Widget widget )
         {
-            add
-            {
-                if (_batteryLowEventHandler == null)
-                {
-                    _batteryLowCallback = new BatteryLowCallbackType( OnBatteryLow );
-                    BatteryLowSignal().Connect(_batteryLowCallback);
-                }
-
-                _batteryLowEventHandler += value;
-            }
-
-            remove
-            {
-                _batteryLowEventHandler -= value;
-
-                if (_batteryLowEventHandler == null && BatteryLowSignal().Empty() == false)
-                {
-                   BatteryLowSignal().Disconnect(_batteryLowCallback);
-                }
-            }
+            _widgetList.Add(widget);
         }
 
-        private void OnBatteryLow(IntPtr widgetApplication)
+        public void RegisterWidgetInfo(Dictionary<System.Type, string> widgetInfo)
         {
-            WidgetApplicationEventArgs e = new WidgetApplicationEventArgs();
-
-            if (widgetApplication != null)
-            {
-                e.WidgetApplication = WidgetApplication.GetWidgetApplicationFromPtr(widgetApplication);
-            }
-
-            if (_batteryLowEventHandler != null)
-            {
-                _batteryLowEventHandler(this, e);
-            }
+            _widgetInfo = widgetInfo;
         }
 
-        internal WidgetApplicationLowBatterySignalType BatteryLowSignal()
+        public static System.IntPtr WidgetCreateFunction(ref string widgetName)
         {
-            WidgetApplicationLowBatterySignalType ret = new WidgetApplicationLowBatterySignalType(NDalicManualPINVOKE.WidgetApplication_LowBatterySignal(swigCPtr), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        private delegate void MemoryLowCallbackType(IntPtr widgetApplication);
-        private MemoryLowCallbackType _memoryLowCallback;
-        private DaliEventHandler<object, WidgetApplicationEventArgs> _memoryLowEventHandler;
+            Dictionary<System.Type, string> widgetInfo = Instance.WidgetInfo;
 
-        /// <summary>
-        /// MemoryLow event.
-        /// </summary>
-        public event DaliEventHandler<object, WidgetApplicationEventArgs> MemoryLow
-        {
-            add
+            foreach (System.Type widgetType in widgetInfo.Keys)
             {
-                if (_memoryLowEventHandler == null)
+                if (widgetInfo[widgetType] == widgetName)
                 {
-                    _memoryLowCallback = new MemoryLowCallbackType (OnMemoryLow);
-                    MemoryLowSignal().Connect(_memoryLowCallback);
+                    Widget widget = Activator.CreateInstance(widgetType) as Widget;
+                    if (widget)
+                    {
+                        return widget.GetIntPtr();
+                    }
                 }
-
-                _memoryLowEventHandler += value;
             }
 
-            remove
-            {
-                _memoryLowEventHandler -= value;
-
-                if (_memoryLowEventHandler == null && MemoryLowSignal().Empty() == false)
-                {
-                   MemoryLowSignal().Disconnect(_memoryLowCallback);
-                }
-            }
+            return IntPtr.Zero;
         }
 
-        private void OnMemoryLow(IntPtr widgetApplication)
+        public Dictionary<System.Type, string> WidgetInfo
         {
-            WidgetApplicationEventArgs e = new WidgetApplicationEventArgs();
-
-            if (widgetApplication != null)
-            {
-                e.WidgetApplication = WidgetApplication.GetWidgetApplicationFromPtr(widgetApplication);
-            }
-
-            if (_memoryLowEventHandler != null)
+            get
             {
-                _memoryLowEventHandler(this, e);
+                return _widgetInfo;
             }
         }
-
-        internal WidgetApplicationLowMemorySignalType MemoryLowSignal()
-        {
-            WidgetApplicationLowMemorySignalType ret = new WidgetApplicationLowMemorySignalType(NDalicManualPINVOKE.WidgetApplication_LowMemorySignal(swigCPtr), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        private static WidgetApplication _instance; //singleton
-
     }
-
 }
diff --git a/src/Tizen.NUI/src/internal/WidgetApplicationLowBatterySignalType.cs b/src/Tizen.NUI/src/internal/WidgetApplicationLowBatterySignalType.cs
deleted file mode 100755 (executable)
index 3240acf..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-namespace Tizen.NUI
-{
-
-    /// <summary>
-    /// LowBatterySignalType.
-    /// </summary>
-    internal class WidgetApplicationLowBatterySignalType : global::System.IDisposable
-    {
-        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
-
-        /// <summary>
-        /// swigCMemOwn.
-        /// </summary>
-        protected bool swigCMemOwn;
-
-        internal WidgetApplicationLowBatterySignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
-        {
-            swigCMemOwn = cMemoryOwn;
-            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-        }
-
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetApplicationLowBatterySignalType obj)
-        {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
-        }
-
-        //A Flag to check who called Dispose(). (By User or DisposeQueue)
-        private bool isDisposeQueued = false;
-
-        /// <summary>
-        /// A Flat to check if it is already disposed.
-        /// </summary>
-        protected bool disposed = false;
-
-
-        /// <summary>
-        /// Distructor.
-        /// </summary>
-        ~WidgetApplicationLowBatterySignalType()
-        {
-            if (!isDisposeQueued)
-            {
-                isDisposeQueued = true;
-                DisposeQueue.Instance.Add(this);
-            }
-        }
-
-        /// <summary>
-        /// Dispose.
-        /// </summary>
-        public void Dispose()
-        {
-            //Throw excpetion if Dispose() is called in separate thread.
-            if (!Window.IsInstalled())
-            {
-                throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
-            }
-
-            if (isDisposeQueued)
-            {
-                Dispose(DisposeTypes.Implicit);
-            }
-            else
-            {
-                Dispose(DisposeTypes.Explicit);
-                System.GC.SuppressFinalize(this);
-            }
-        }
-
-        /// <summary>
-        /// you can override it to clean-up your own resources.
-        /// </summary>
-        /// <param name="type">DisposeTypes</param>
-        /// <since_tizen> 3 </since_tizen>
-        protected virtual void Dispose(DisposeTypes type)
-        {
-            if (disposed)
-            {
-                return;
-            }
-
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-
-            }
-
-            //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.
-
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)
-            {
-                if (swigCMemOwn)
-                {
-                    swigCMemOwn = false;
-                    NDalicManualPINVOKE.WidgetApplication_delete_LowBatterySignalType(swigCPtr);
-                }
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-            }
-            disposed = true;
-        }
-
-        /// <summary>
-        /// Empty 
-        /// </summary>
-        /// <returns>true if there is no signal attached</returns>
-        public bool Empty()
-        {
-            bool ret = NDalicManualPINVOKE.WidgetApplication_LowBatterySignalType_Empty(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        /// <summary>
-        /// GetConnectionCount
-        /// </summary>
-        /// <returns>number of attached signals</returns>
-        public uint GetConnectionCount()
-        {
-            uint ret = NDalicManualPINVOKE.WidgetApplication_LowBatterySignalType_GetConnectionCount(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        /// <summary>
-        /// signal connect
-        /// </summary>
-        /// <param name="func"></param>
-        public void Connect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.WidgetApplication_LowBatterySignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        /// <summary>
-        /// signal disconnect
-        /// </summary>
-        /// <param name="func"></param>
-        public void Disconnect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.WidgetApplication_LowBatterySignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        internal void Emit(Application.BatteryStatus arg)
-        {
-            NDalicManualPINVOKE.WidgetApplication_LowBatterySignalType_Emit(swigCPtr, (int)arg);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        /// <summary>
-        /// LowBatterySignalType
-        /// </summary>
-        public WidgetApplicationLowBatterySignalType() : this(NDalicManualPINVOKE.WidgetApplication_new_LowBatterySignalType(), true)
-        {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-    }
-
-}
-
diff --git a/src/Tizen.NUI/src/internal/WidgetApplicationLowMemorySignalType.cs b/src/Tizen.NUI/src/internal/WidgetApplicationLowMemorySignalType.cs
deleted file mode 100755 (executable)
index b943ede..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-namespace Tizen.NUI
-{
-
-    internal class WidgetApplicationLowMemorySignalType : global::System.IDisposable
-    {
-        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
-        protected bool swigCMemOwn;
-
-        internal WidgetApplicationLowMemorySignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
-        {
-            swigCMemOwn = cMemoryOwn;
-            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-        }
-
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetApplicationLowMemorySignalType obj)
-        {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
-        }
-
-        //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;
-
-        ~WidgetApplicationLowMemorySignalType()
-        {
-            if (!isDisposeQueued)
-            {
-                isDisposeQueued = true;
-                DisposeQueue.Instance.Add(this);
-            }
-        }
-
-        public void Dispose()
-        {
-            //Throw excpetion if Dispose() is called in separate thread.
-            if (!Window.IsInstalled())
-            {
-                throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
-            }
-
-            if (isDisposeQueued)
-            {
-                Dispose(DisposeTypes.Implicit);
-            }
-            else
-            {
-                Dispose(DisposeTypes.Explicit);
-                System.GC.SuppressFinalize(this);
-            }
-        }
-
-        protected virtual void Dispose(DisposeTypes type)
-        {
-            if (disposed)
-            {
-                return;
-            }
-
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-
-            }
-
-            //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.
-
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)
-            {
-                if (swigCMemOwn)
-                {
-                    swigCMemOwn = false;
-                    NDalicManualPINVOKE.WidgetApplication_delete_LowMemorySignalType(swigCPtr);
-                }
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-            }
-            disposed = true;
-        }
-
-        public bool Empty()
-        {
-            bool ret = NDalicManualPINVOKE.WidgetApplication_LowMemorySignalType_Empty(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public uint GetConnectionCount()
-        {
-            uint ret = NDalicManualPINVOKE.WidgetApplication_LowMemorySignalType_GetConnectionCount(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public void Connect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.WidgetApplication_LowMemorySignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        public void Disconnect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.WidgetApplication_LowMemorySignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        internal void Emit(Application.MemoryStatus arg)
-        {
-            NDalicManualPINVOKE.WidgetApplication_LowMemorySignalType_Emit(swigCPtr, (int)arg);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        public WidgetApplicationLowMemorySignalType() : this(NDalicManualPINVOKE.WidgetApplication_new_LowMemorySignalType(), true)
-        {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-    }
-
-}
diff --git a/src/Tizen.NUI/src/internal/WidgetCreateSignalType.cs b/src/Tizen.NUI/src/internal/WidgetCreateSignalType.cs
deleted file mode 100755 (executable)
index 9bdb099..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-namespace Tizen.NUI
-{
-
-    internal class WidgetCreateSignalType : global::System.IDisposable
-    {
-        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
-        protected bool swigCMemOwn;
-
-        internal WidgetCreateSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
-        {
-            swigCMemOwn = cMemoryOwn;
-            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-        }
-
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetCreateSignalType obj)
-        {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
-        }
-
-        //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;
-
-        ~WidgetCreateSignalType()
-        {
-            if (!isDisposeQueued)
-            {
-                isDisposeQueued = true;
-                DisposeQueue.Instance.Add(this);
-            }
-        }
-
-        public void Dispose()
-        {
-            //Throw excpetion if Dispose() is called in separate thread.
-            if (!Window.IsInstalled())
-            {
-                throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
-            }
-
-            if (isDisposeQueued)
-            {
-                Dispose(DisposeTypes.Implicit);
-            }
-            else
-            {
-                Dispose(DisposeTypes.Explicit);
-                System.GC.SuppressFinalize(this);
-            }
-        }
-
-        protected virtual void Dispose(DisposeTypes type)
-        {
-            if (disposed)
-            {
-                return;
-            }
-
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-
-            }
-
-            //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.
-
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)
-            {
-                swigCMemOwn = false;
-                NDalicManualPINVOKE.delete_WidgetCreateSignalType(swigCPtr);
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-            }
-
-            disposed = true;
-        }
-
-        public bool Empty()
-        {
-            bool ret = NDalicManualPINVOKE.WidgetCreateSignalType_Empty(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public uint GetConnectionCount()
-        {
-            uint ret = NDalicManualPINVOKE.WidgetCreateSignalType_GetConnectionCount(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public void Connect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.WidgetCreateSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        public void Disconnect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.WidgetCreateSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        public void Emit(string arg1, SWIGTYPE_p_bundle arg2, Window arg3)
-        {
-            NDalicManualPINVOKE.WidgetCreateSignalType_Emit(swigCPtr, arg1, SWIGTYPE_p_bundle.getCPtr(arg2), Window.getCPtr(arg3));
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        public WidgetCreateSignalType() : this(NDalicManualPINVOKE.new_WidgetCreateSignalType(), true)
-        {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-    }
-
-}
diff --git a/src/Tizen.NUI/src/internal/WidgetImpl.cs b/src/Tizen.NUI/src/internal/WidgetImpl.cs
new file mode 100755 (executable)
index 0000000..4d249ae
--- /dev/null
@@ -0,0 +1,406 @@
+/*
+ * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.ComponentModel;
+using System.Runtime.InteropServices;
+
+namespace Tizen.NUI
+{
+    internal class WidgetImpl : BaseObject
+    {
+        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+        internal WidgetImpl() : this( NDalicManualPINVOKE.WidgetImpl_New(), true )
+        {
+            SwigDirectorConnect();
+        }
+
+        internal WidgetImpl(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.WidgetImpl_SWIGUpcast(cPtr), cMemoryOwn)
+        {
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+        }
+
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetImpl obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+        }
+
+        protected override void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+                //Called by User
+                //Release your own managed resources here.
+                //You should release all of your own disposable objects here.
+            }
+
+            //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.
+
+            if (swigCPtr.Handle != global::System.IntPtr.Zero)
+            {
+                if (swigCMemOwn)
+                {
+                    swigCMemOwn = false;
+                    //throw new global::System.MethodAccessException("C++ destructor does not have public access");
+                }
+                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+            }
+
+            base.Dispose(type);
+        }
+
+        public class WIdgetInstanceOnCreateArgs : EventArgs
+        {
+            private string _contentInfo;
+            private Window _window;
+
+            public string ContentInfo
+            {
+                get
+                {
+                    return _contentInfo;
+                }
+                set
+                {
+                    _contentInfo = value;
+                }
+            }
+
+            public Window Window
+            {
+                get
+                {
+                    return _window;
+                }
+                set
+                {
+                    _window = value;
+                }
+            }
+        }
+
+        private EventHandler<WIdgetInstanceOnCreateArgs> _widgetInstanceOnCreateEventHandler;
+        public event EventHandler<WIdgetInstanceOnCreateArgs> WidgetInstanceCreated
+        {
+            add
+            {
+                _widgetInstanceOnCreateEventHandler += value;
+            }
+            remove
+            {
+                _widgetInstanceOnCreateEventHandler -= value;
+            }
+        }
+
+        public class WIdgetInstanceOnDestroyArgs : EventArgs
+        {
+            private string _contentInfo;
+            private Widget.TerminationType _terminateType;
+
+            public string ContentInfo
+            {
+                get
+                {
+                    return _contentInfo;
+                }
+                set
+                {
+                    _contentInfo = value;
+                }
+            }
+
+            public Widget.TerminationType TerminateType
+            {
+                get
+                {
+                    return _terminateType;
+                }
+                set
+                {
+                    _terminateType = value;
+                }
+            }
+        }
+
+        private EventHandler<WIdgetInstanceOnDestroyArgs> _widgetInstanceOnDestroyEventHandler;
+        public event EventHandler<WIdgetInstanceOnDestroyArgs> WidgetInstanceDestroyed
+        {
+            add
+            {
+                _widgetInstanceOnDestroyEventHandler += value;
+            }
+            remove
+            {
+                _widgetInstanceOnDestroyEventHandler -= value;
+            }
+        }
+
+        public class WidgetInstanceOnResizeArgs : EventArgs
+        {
+            private Window _window;
+
+            public Window Window
+            {
+                get
+                {
+                    return _window;
+                }
+                set
+                {
+                    _window = value;
+                }
+            }
+        }
+
+        private EventHandler<WidgetInstanceOnResizeArgs> _widgetInstanceOnResizeEventHandler;
+        public event EventHandler<WidgetInstanceOnResizeArgs> WidgetInstanceResized
+        {
+            add
+            {
+                _widgetInstanceOnResizeEventHandler += value;
+            }
+            remove
+            {
+                _widgetInstanceOnResizeEventHandler -= value;
+            }
+        }
+
+        private EventHandler _widgetInstanceOnPauseEventHandler;
+        public event EventHandler WidgetInstancePaused
+        {
+            add
+            {
+                _widgetInstanceOnPauseEventHandler += value;
+            }
+            remove
+            {
+                _widgetInstanceOnPauseEventHandler -= value;
+            }
+        }
+
+        private EventHandler _widgetInstanceOnResumeEventHandler;
+        public event EventHandler WidgetInstanceResumed
+        {
+            add
+            {
+                _widgetInstanceOnResumeEventHandler += value;
+            }
+            remove
+            {
+                _widgetInstanceOnResumeEventHandler -= value;
+            }
+        }
+
+        public class WidgetInstanceOnUpdateArgs : EventArgs
+        {
+            private string _contentInfo;
+            private int _force;
+
+            public string ContentInfo
+            {
+                get
+                {
+                    return _contentInfo;
+                }
+                set
+                {
+                    _contentInfo = value;
+                }
+            }
+
+            public int Force
+            {
+                get
+                {
+                    return _force;
+                }
+                set
+                {
+                    _force = value;
+                }
+            }
+        }
+
+        private EventHandler<WidgetInstanceOnUpdateArgs> _widgetInstanceOnUpdateEventHandler;
+        public event EventHandler<WidgetInstanceOnUpdateArgs> WidgetInstanceUpdated
+        {
+            add
+            {
+                _widgetInstanceOnUpdateEventHandler += value;
+            }
+            remove
+            {
+                _widgetInstanceOnUpdateEventHandler -= value;
+            }
+        }
+
+        public virtual void OnCreate(string contentInfo, Window window)
+        {
+            WIdgetInstanceOnCreateArgs args = new WIdgetInstanceOnCreateArgs();
+            args.ContentInfo = contentInfo;
+            args.Window = window;
+            _widgetInstanceOnCreateEventHandler?.Invoke(this, args);
+        }
+
+        public virtual void OnTerminate(string contentInfo, Widget.TerminationType type)
+        {
+            WIdgetInstanceOnDestroyArgs args = new WIdgetInstanceOnDestroyArgs();
+            args.ContentInfo = contentInfo;
+            args.TerminateType = type;
+            _widgetInstanceOnDestroyEventHandler?.Invoke(this,args);
+        }
+
+        public virtual void OnPause()
+        {
+            _widgetInstanceOnPauseEventHandler?.Invoke(this, new EventArgs());
+        }
+
+        public virtual void OnResume()
+        {
+            _widgetInstanceOnResumeEventHandler?.Invoke(this, new EventArgs());
+        }
+
+        public virtual void OnResize(Window window)
+        {
+            WidgetInstanceOnResizeArgs args = new WidgetInstanceOnResizeArgs();
+            args.Window = window;
+            _widgetInstanceOnResizeEventHandler?.Invoke(this, args);
+        }
+
+        public virtual void OnUpdate(string contentInfo, int force)
+        {
+            WidgetInstanceOnUpdateArgs args = new WidgetInstanceOnUpdateArgs();
+            args.ContentInfo = contentInfo;
+            args.Force = force;
+            _widgetInstanceOnUpdateEventHandler?.Invoke(this, args);
+        }
+
+        internal virtual void SignalConnected(SlotObserver slotObserver, SWIGTYPE_p_Dali__CallbackBase callback)
+        {
+        }
+
+        internal virtual void SignalDisconnected(SlotObserver slotObserver, SWIGTYPE_p_Dali__CallbackBase callback)
+        {
+        }
+
+        public void SetContentInfo(string contentInfo)
+        {
+            NDalicManualPINVOKE.WidgetImpl_SetContentInfo(swigCPtr, contentInfo);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        internal void SetImpl(SWIGTYPE_p_Dali__Widget__Impl impl)
+        {
+            NDalicManualPINVOKE.WidgetImpl_SetImpl(swigCPtr, SWIGTYPE_p_Dali__Widget__Impl.getCPtr(impl));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        private void SwigDirectorConnect()
+        {
+            swigDelegate0 = new SwigDelegateWidgetImpl_0(SwigDirectorOnCreate);
+            swigDelegate1 = new SwigDelegateWidgetImpl_1(SwigDirectorOnTerminate);
+            swigDelegate2 = new SwigDelegateWidgetImpl_2(SwigDirectorOnPause);
+            swigDelegate3 = new SwigDelegateWidgetImpl_3(SwigDirectorOnResume);
+            swigDelegate4 = new SwigDelegateWidgetImpl_4(SwigDirectorOnResize);
+            swigDelegate5 = new SwigDelegateWidgetImpl_5(SwigDirectorOnUpdate);
+            swigDelegate6 = new SwigDelegateWidgetImpl_6(SwigDirectorSignalConnected);
+            swigDelegate7 = new SwigDelegateWidgetImpl_7(SwigDirectorSignalDisconnected);
+            NDalicManualPINVOKE.WidgetImpl_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6, swigDelegate7);
+        }
+
+        private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes)
+        {
+            global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, methodTypes, null);
+            bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(WidgetImpl));
+            return hasDerivedMethod;
+        }
+
+        private void SwigDirectorOnCreate(string contentInfo, global::System.IntPtr window)
+        {
+            OnCreate(contentInfo, new Window(window, true));
+        }
+
+        private void SwigDirectorOnTerminate(string contentInfo, int type)
+        {
+            OnTerminate(contentInfo, (Widget.TerminationType)type);
+        }
+
+        private void SwigDirectorOnPause()
+        {
+            OnPause();
+        }
+
+        private void SwigDirectorOnResume()
+        {
+            OnResume();
+        }
+
+        private void SwigDirectorOnResize(global::System.IntPtr window)
+        {
+            OnResize(new Window(window, true));
+        }
+
+        private void SwigDirectorOnUpdate(string contentInfo, int force)
+        {
+            OnUpdate(contentInfo, force);
+        }
+
+        private void SwigDirectorSignalConnected(global::System.IntPtr slotObserver, global::System.IntPtr callback)
+        {
+            SignalConnected((slotObserver == global::System.IntPtr.Zero) ? null : new SlotObserver(slotObserver, false), (callback == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_Dali__CallbackBase(callback, false));
+        }
+
+        private void SwigDirectorSignalDisconnected(global::System.IntPtr slotObserver, global::System.IntPtr callback)
+        {
+            SignalDisconnected((slotObserver == global::System.IntPtr.Zero) ? null : new SlotObserver(slotObserver, false), (callback == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_Dali__CallbackBase(callback, false));
+        }
+
+        public delegate void SwigDelegateWidgetImpl_0(string contentInfo, global::System.IntPtr window);
+        public delegate void SwigDelegateWidgetImpl_1(string contentInfo, int type);
+        public delegate void SwigDelegateWidgetImpl_2();
+        public delegate void SwigDelegateWidgetImpl_3();
+        public delegate void SwigDelegateWidgetImpl_4(global::System.IntPtr window);
+        public delegate void SwigDelegateWidgetImpl_5(string contentInfo, int force);
+        public delegate void SwigDelegateWidgetImpl_6(global::System.IntPtr slotObserver, global::System.IntPtr callback);
+        public delegate void SwigDelegateWidgetImpl_7(global::System.IntPtr slotObserver, global::System.IntPtr callback);
+
+        private SwigDelegateWidgetImpl_0 swigDelegate0;
+        private SwigDelegateWidgetImpl_1 swigDelegate1;
+        private SwigDelegateWidgetImpl_2 swigDelegate2;
+        private SwigDelegateWidgetImpl_3 swigDelegate3;
+        private SwigDelegateWidgetImpl_4 swigDelegate4;
+        private SwigDelegateWidgetImpl_5 swigDelegate5;
+        private SwigDelegateWidgetImpl_6 swigDelegate6;
+        private SwigDelegateWidgetImpl_7 swigDelegate7;
+
+        private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { typeof(string), typeof(Window) };
+        private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] { typeof(string), typeof(Widget.TerminationType) };
+        private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] { };
+        private static global::System.Type[] swigMethodTypes3 = new global::System.Type[] { };
+        private static global::System.Type[] swigMethodTypes4 = new global::System.Type[] { typeof(Window) };
+        private static global::System.Type[] swigMethodTypes5 = new global::System.Type[] { typeof(string), typeof(int) };
+        private static global::System.Type[] swigMethodTypes6 = new global::System.Type[] { typeof(SlotObserver), typeof(SWIGTYPE_p_Dali__CallbackBase) };
+        private static global::System.Type[] swigMethodTypes7 = new global::System.Type[] { typeof(SlotObserver), typeof(SWIGTYPE_p_Dali__CallbackBase) };
+    }
+}
diff --git a/src/Tizen.NUI/src/internal/WidgetImplPtr.cs b/src/Tizen.NUI/src/internal/WidgetImplPtr.cs
new file mode 100755 (executable)
index 0000000..3f49a8a
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+namespace Tizen.NUI
+{
+
+    internal class WidgetImplPtr
+    {
+        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+        internal WidgetImplPtr(global::System.IntPtr cPtr, bool futureUse)
+        {
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+        }
+
+        protected WidgetImplPtr()
+        {
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+        }
+
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetImplPtr obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+        }
+    }
+}
diff --git a/src/Tizen.NUI/src/internal/WidgetPauseSignalType.cs b/src/Tizen.NUI/src/internal/WidgetPauseSignalType.cs
deleted file mode 100755 (executable)
index df85d46..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-namespace Tizen.NUI
-{
-
-    internal class WidgetPauseSignalType : global::System.IDisposable
-    {
-        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
-        protected bool swigCMemOwn;
-
-        internal WidgetPauseSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
-        {
-            swigCMemOwn = cMemoryOwn;
-            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-        }
-
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetPauseSignalType obj)
-        {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
-        }
-
-        //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;
-
-        ~WidgetPauseSignalType()
-        {
-            if (!isDisposeQueued)
-            {
-                isDisposeQueued = true;
-                DisposeQueue.Instance.Add(this);
-            }
-        }
-
-        public void Dispose()
-        {
-            //Throw excpetion if Dispose() is called in separate thread.
-            if (!Window.IsInstalled())
-            {
-                throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
-            }
-
-            if (isDisposeQueued)
-            {
-                Dispose(DisposeTypes.Implicit);
-            }
-            else
-            {
-                Dispose(DisposeTypes.Explicit);
-                System.GC.SuppressFinalize(this);
-            }
-        }
-
-        protected virtual void Dispose(DisposeTypes type)
-        {
-            if (disposed)
-            {
-                return;
-            }
-
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-
-            }
-
-            //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.
-
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)
-            {
-                swigCMemOwn = false;
-                NDalicManualPINVOKE.delete_WidgetPauseSignalType(swigCPtr);
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-            }
-
-            disposed = true;
-        }
-
-        public bool Empty()
-        {
-            bool ret = NDalicManualPINVOKE.WidgetPauseSignalType_Empty(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public uint GetConnectionCount()
-        {
-            uint ret = NDalicManualPINVOKE.WidgetPauseSignalType_GetConnectionCount(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public void Connect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.WidgetPauseSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        public void Disconnect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.WidgetPauseSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        public void Emit(string arg)
-        {
-            NDalicManualPINVOKE.WidgetPauseSignalType_Emit(swigCPtr, arg);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        public WidgetPauseSignalType() : this(NDalicManualPINVOKE.new_WidgetPauseSignalType(), true)
-        {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-    }
-
-}
diff --git a/src/Tizen.NUI/src/internal/WidgetResizeSignalType.cs b/src/Tizen.NUI/src/internal/WidgetResizeSignalType.cs
deleted file mode 100755 (executable)
index 5d29bcf..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-namespace Tizen.NUI
-{
-
-    internal class WidgetResizeSignalType : global::System.IDisposable
-    {
-        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
-        protected bool swigCMemOwn;
-
-        internal WidgetResizeSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
-        {
-            swigCMemOwn = cMemoryOwn;
-            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-        }
-
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetResizeSignalType obj)
-        {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
-        }
-
-        //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;
-
-        ~WidgetResizeSignalType()
-        {
-            if (!isDisposeQueued)
-            {
-                isDisposeQueued = true;
-                DisposeQueue.Instance.Add(this);
-            }
-        }
-        public void Dispose()
-        {
-            //Throw excpetion if Dispose() is called in separate thread.
-            if (!Window.IsInstalled())
-            {
-                throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
-            }
-
-            if (isDisposeQueued)
-            {
-                Dispose(DisposeTypes.Implicit);
-            }
-            else
-            {
-                Dispose(DisposeTypes.Explicit);
-                System.GC.SuppressFinalize(this);
-            }
-        }
-
-        protected virtual void Dispose(DisposeTypes type)
-        {
-            if (disposed)
-            {
-                return;
-            }
-
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-
-            }
-
-            //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.
-
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)
-            {
-                swigCMemOwn = false;
-                NDalicManualPINVOKE.delete_WidgetResizeSignalType(swigCPtr);
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-            }
-
-            disposed = true;
-        }
-
-        public bool Empty()
-        {
-            bool ret = NDalicManualPINVOKE.WidgetResizeSignalType_Empty(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public uint GetConnectionCount()
-        {
-            uint ret = NDalicManualPINVOKE.WidgetResizeSignalType_GetConnectionCount(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public void Connect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.WidgetResizeSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        public void Disconnect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.WidgetResizeSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        public void Emit(string arg1, Window arg2)
-        {
-            NDalicManualPINVOKE.WidgetResizeSignalType_Emit(swigCPtr, arg1, Window.getCPtr(arg2));
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        public WidgetResizeSignalType() : this(NDalicManualPINVOKE.new_WidgetResizeSignalType(), true)
-        {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-    }
-
-}
diff --git a/src/Tizen.NUI/src/internal/WidgetResumeSignalType.cs b/src/Tizen.NUI/src/internal/WidgetResumeSignalType.cs
deleted file mode 100755 (executable)
index 18f320d..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-namespace Tizen.NUI
-{
-
-    internal class WidgetResumeSignalType : global::System.IDisposable
-    {
-        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
-        protected bool swigCMemOwn;
-
-        internal WidgetResumeSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
-        {
-            swigCMemOwn = cMemoryOwn;
-            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-        }
-
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetResumeSignalType obj)
-        {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
-        }
-
-        //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;
-
-        ~WidgetResumeSignalType()
-        {
-            if (!isDisposeQueued)
-            {
-                isDisposeQueued = true;
-                DisposeQueue.Instance.Add(this);
-            }
-        }
-
-        public void Dispose()
-        {
-            //Throw excpetion if Dispose() is called in separate thread.
-            if (!Window.IsInstalled())
-            {
-                throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
-            }
-
-            if (isDisposeQueued)
-            {
-                Dispose(DisposeTypes.Implicit);
-            }
-            else
-            {
-                Dispose(DisposeTypes.Explicit);
-                System.GC.SuppressFinalize(this);
-            }
-        }
-
-        protected virtual void Dispose(DisposeTypes type)
-        {
-            if (disposed)
-            {
-                return;
-            }
-
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-
-            }
-
-            //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.
-
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)
-            {
-                swigCMemOwn = false;
-                NDalicManualPINVOKE.delete_WidgetResumeSignalType(swigCPtr);
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-            }
-
-            disposed = true;
-        }
-
-        public bool Empty()
-        {
-            bool ret = NDalicManualPINVOKE.WidgetResumeSignalType_Empty(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public uint GetConnectionCount()
-        {
-            uint ret = NDalicManualPINVOKE.WidgetResumeSignalType_GetConnectionCount(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public void Connect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.WidgetResumeSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        public void Disconnect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.WidgetResumeSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        public void Emit(string arg)
-        {
-            NDalicManualPINVOKE.WidgetResumeSignalType_Emit(swigCPtr, arg);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        public WidgetResumeSignalType() : this(NDalicManualPINVOKE.new_WidgetResumeSignalType(), true)
-        {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-    }
-
-}
diff --git a/src/Tizen.NUI/src/internal/WidgetTerminateSignalType.cs b/src/Tizen.NUI/src/internal/WidgetTerminateSignalType.cs
deleted file mode 100755 (executable)
index feda42c..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-namespace Tizen.NUI
-{
-
-    internal class WidgetTerminateSignalType : global::System.IDisposable
-    {
-        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
-        protected bool swigCMemOwn;
-
-        internal WidgetTerminateSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
-        {
-            swigCMemOwn = cMemoryOwn;
-            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-        }
-
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetTerminateSignalType obj)
-        {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
-        }
-
-        //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;
-
-        ~WidgetTerminateSignalType()
-        {
-            if (!isDisposeQueued)
-            {
-                isDisposeQueued = true;
-                DisposeQueue.Instance.Add(this);
-            }
-        }
-
-        public void Dispose()
-        {
-            //Throw excpetion if Dispose() is called in separate thread.
-            if (!Window.IsInstalled())
-            {
-                throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
-            }
-
-            if (isDisposeQueued)
-            {
-                Dispose(DisposeTypes.Implicit);
-            }
-            else
-            {
-                Dispose(DisposeTypes.Explicit);
-                System.GC.SuppressFinalize(this);
-            }
-        }
-
-        protected virtual void Dispose(DisposeTypes type)
-        {
-            if (disposed)
-            {
-                return;
-            }
-
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-
-            }
-
-            //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.
-
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)
-            {
-                swigCMemOwn = false;
-                NDalicManualPINVOKE.delete_WidgetTerminateSignalType(swigCPtr);
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-            }
-
-            disposed = true;
-        }
-
-        public bool Empty()
-        {
-            bool ret = NDalicManualPINVOKE.WidgetTerminateSignalType_Empty(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public uint GetConnectionCount()
-        {
-            uint ret = NDalicManualPINVOKE.WidgetTerminateSignalType_GetConnectionCount(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public void Connect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.WidgetTerminateSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        public void Disconnect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.WidgetTerminateSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        public void Emit(string arg1, SWIGTYPE_p_bundle arg2, Widget.WidgetTerminateType arg3)
-        {
-            NDalicManualPINVOKE.WidgetTerminateSignalType_Emit(swigCPtr, arg1, SWIGTYPE_p_bundle.getCPtr(arg2), (int)arg3);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        public WidgetTerminateSignalType() : this(NDalicManualPINVOKE.new_WidgetTerminateSignalType(), true)
-        {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-    }
-
-}
diff --git a/src/Tizen.NUI/src/internal/WidgetUpdateSignalType.cs b/src/Tizen.NUI/src/internal/WidgetUpdateSignalType.cs
deleted file mode 100755 (executable)
index 89fe674..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-namespace Tizen.NUI
-{
-
-    internal class WidgetUpdateSignalType : global::System.IDisposable
-    {
-        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
-        protected bool swigCMemOwn;
-
-        internal WidgetUpdateSignalType(global::System.IntPtr cPtr, bool cMemoryOwn)
-        {
-            swigCMemOwn = cMemoryOwn;
-            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-        }
-
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WidgetUpdateSignalType obj)
-        {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
-        }
-
-        //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;
-
-        ~WidgetUpdateSignalType()
-        {
-            if (!isDisposeQueued)
-            {
-                isDisposeQueued = true;
-                DisposeQueue.Instance.Add(this);
-            }
-        }
-
-        public void Dispose()
-        {
-            //Throw excpetion if Dispose() is called in separate thread.
-            if (!Window.IsInstalled())
-            {
-                throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
-            }
-
-            if (isDisposeQueued)
-            {
-                Dispose(DisposeTypes.Implicit);
-            }
-            else
-            {
-                Dispose(DisposeTypes.Explicit);
-                System.GC.SuppressFinalize(this);
-            }
-        }
-
-        protected virtual void Dispose(DisposeTypes type)
-        {
-            if (disposed)
-            {
-                return;
-            }
-
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-
-            }
-
-            //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.
-
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)
-            {
-                swigCMemOwn = false;
-                NDalicManualPINVOKE.delete_WidgetUpdateSignalType(swigCPtr);
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-            }
-
-            disposed = true;
-        }
-
-        public bool Empty()
-        {
-            bool ret = NDalicManualPINVOKE.WidgetUpdateSignalType_Empty(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public uint GetConnectionCount()
-        {
-            uint ret = NDalicManualPINVOKE.WidgetUpdateSignalType_GetConnectionCount(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
-        public void Connect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.WidgetUpdateSignalType_Connect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        public void Disconnect(System.Delegate func)
-        {
-            System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
-            {
-                NDalicManualPINVOKE.WidgetUpdateSignalType_Disconnect(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip));
-                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            }
-        }
-
-        public void Emit(string arg1, SWIGTYPE_p_bundle arg2, int arg3)
-        {
-            NDalicManualPINVOKE.WidgetUpdateSignalType_Emit(swigCPtr, arg1, SWIGTYPE_p_bundle.getCPtr(arg2), arg3);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        public WidgetUpdateSignalType() : this(NDalicManualPINVOKE.new_WidgetUpdateSignalType(), true)
-        {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-    }
-
-}
index 9caa1ee..6bd8eee 100755 (executable)
@@ -37,6 +37,9 @@ namespace Tizen.NUI
         internal Animation(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Animation_SWIGUpcast(cPtr), cMemoryOwn)
         {
             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+
+            _animationFinishedEventCallback = OnFinished;
+            _finishedCallbackOfNative = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(_animationFinishedEventCallback);
         }
 
         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Animation obj)
@@ -50,6 +53,20 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         protected override void Dispose(DisposeTypes type)
         {
+            if (this != null)
+            {
+                if (_animationFinishedEventCallback != null)
+                {
+                    FinishedSignal().Disconnect(_finishedCallbackOfNative);
+                }
+
+                if (_animationProgressReachedEventCallback != null)
+                {
+
+                    ProgressReachedSignal().Disconnect(_animationProgressReachedEventCallback);
+                }
+            }
+
             if(disposed)
             {
                 return;
@@ -66,24 +83,7 @@ namespace Tizen.NUI
 
             }
 
-            if (_animationFinishedEventCallback != null)
-            {
-                FinishedSignal().Disconnect(_animationFinishedEventCallback);
-            }
-
-            if (_animationProgressReachedEventCallback != null)
-            {
-
-                ProgressReachedSignal().Disconnect(_animationProgressReachedEventCallback);
-            }
-
-            if(this)
-            {
-                this.Clear();
-                this.Reset();
-                NUILog.Error("Now Animation is playing! Clear and Reset here!");
-                //throw new System.InvalidOperationException("Animation Instance should not be disposed until getting Finished event. Should be a global variable");
-            }
+            this?.Clear();
 
             //Release your own unmanaged resources here.
             //You should not access any managed member here except static instance.
@@ -120,6 +120,9 @@ namespace Tizen.NUI
         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
         private delegate void AnimationFinishedEventCallbackType(IntPtr data);
         private event EventHandler _animationFinishedEventHandler;
+
+        private System.IntPtr _finishedCallbackOfNative;
+
         /**
         * @brief Event for the finished signal which can be used to subscribe or unsubscribe the event handler.
         * The finished signal is emitted when an animation's animations have finished.
@@ -129,12 +132,9 @@ namespace Tizen.NUI
         {
             add
             {
-                if (_animationFinishedEventHandler == null)
+                if (_animationFinishedEventHandler == null && disposed == false)
                 {
-                    NUILog.Debug("[add before]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
-                    _animationFinishedEventCallback = OnFinished;
-                    FinishedSignal().Connect(_animationFinishedEventCallback);
-                    NUILog.Debug("[add after]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
+                    FinishedSignal().Connect(_finishedCallbackOfNative);
                 }
                 _animationFinishedEventHandler += value;
             }
@@ -144,9 +144,7 @@ namespace Tizen.NUI
 
                 if (_animationFinishedEventHandler == null && FinishedSignal().Empty() == false)
                 {
-                    NUILog.Debug("[remove before]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
-                    FinishedSignal().Disconnect(_animationFinishedEventCallback);
-                    NUILog.Debug("[remove after]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
+                    FinishedSignal().Disconnect(_finishedCallbackOfNative);
                 }
             }
         }
@@ -174,10 +172,8 @@ namespace Tizen.NUI
             {
                 if (_animationProgressReachedEventHandler == null)
                 {
-                    NUILog.Debug("[add before]ProgressReachedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
                     _animationProgressReachedEventCallback = OnProgressReached;
                     ProgressReachedSignal().Connect(_animationProgressReachedEventCallback);
-                    NUILog.Debug("[add after]ProgressReachedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
                 }
 
                 _animationProgressReachedEventHandler += value;
@@ -188,9 +184,7 @@ namespace Tizen.NUI
 
                 if (_animationProgressReachedEventHandler == null && ProgressReachedSignal().Empty() == false)
                 {
-                    NUILog.Debug("[remove before]ProgressReachedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
                     ProgressReachedSignal().Disconnect(_animationProgressReachedEventCallback);
-                    NUILog.Debug("[remove after]ProgressReachedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
                 }
             }
         }
index 84f4b62..89ab4c2 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2018 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -162,6 +162,10 @@ namespace Tizen.NUI.BaseComponents
             internal static readonly int IMAGE = NDalicPINVOKE.ImageView_Property_IMAGE_get();
             internal static readonly int PRE_MULTIPLIED_ALPHA = NDalicPINVOKE.ImageView_Property_PRE_MULTIPLIED_ALPHA_get();
             internal static readonly int PIXEL_AREA = NDalicPINVOKE.ImageView_Property_PIXEL_AREA_get();
+            internal static readonly int ACTION_RELOAD = NDalicManualPINVOKE.ImageView_IMAGE_VISUAL_ACTION_RELOAD_get();
+            internal static readonly int ACTION_PLAY = NDalicManualPINVOKE.ImageView_IMAGE_VISUAL_ACTION_PLAY_get();
+            internal static readonly int ACTION_PAUSE = NDalicManualPINVOKE.ImageView_IMAGE_VISUAL_ACTION_PAUSE_get();
+            internal static readonly int ACTION_STOP = NDalicManualPINVOKE.ImageView_IMAGE_VISUAL_ACTION_STOP_get();
         }
 
         /// <summary>
@@ -233,6 +237,50 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
+        /// Force reloading of the image, all visuals using this image will get the latest one.
+        /// </summary>
+        /// <since_tizen> 5 </since_tizen>        
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void Reload()
+        {
+            this.DoAction(ImageView.Property.IMAGE, Property.ACTION_RELOAD, new PropertyValue(0));
+        }
+
+        /// <summary>
+        /// Play the animated GIF. This is also Default playback mode.
+        /// </summary>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void Play()
+        {
+            this.DoAction(ImageView.Property.IMAGE, Property.ACTION_PLAY, new PropertyValue(0));
+        }
+
+        /// <summary>
+        /// Pause the animated GIF.
+        /// </summary>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void Pause()
+        {
+            this.DoAction(ImageView.Property.IMAGE, Property.ACTION_PAUSE, new PropertyValue(0));
+        }
+
+        /// <summary>
+        /// Stop the animated GIF.
+        /// </summary>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void Stop()
+        {
+            this.DoAction(ImageView.Property.IMAGE, Property.ACTION_STOP, new PropertyValue(0));
+        }
+
+        /// <summary>
         /// ImageView ResourceUrl, type string.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
index 83093a0..1d5c589 100755 (executable)
@@ -63,8 +63,10 @@ namespace Tizen.NUI.BaseComponents
             //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.
-
-            DisConnectFromSignals();
+            if (this != null)
+            {
+                DisConnectFromSignals();
+            }
 
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
index f4801fa..be2115c 100755 (executable)
@@ -17,6 +17,7 @@
 
 using System;
 using System.ComponentModel;
+using System.Runtime.InteropServices;
 
 namespace Tizen.NUI.BaseComponents
 {
@@ -49,12 +50,12 @@ namespace Tizen.NUI.BaseComponents
         /// <since_tizen> 3 </since_tizen>
         protected override void Dispose(DisposeTypes type)
         {
-            if(disposed)
+            if (disposed)
             {
                 return;
             }
 
-            if(type == DisposeTypes.Explicit)
+            if (type == DisposeTypes.Explicit)
             {
                 //Called by User
                 //Release your own managed resources here.
@@ -135,7 +136,7 @@ namespace Tizen.NUI.BaseComponents
             /// <since_tizen> 3 </since_tizen>
             ~CellPosition()
             {
-                if(!isDisposeQueued)
+                if (!isDisposeQueued)
                 {
                     isDisposeQueued = true;
                     DisposeQueue.Instance.Add(this);
@@ -177,7 +178,7 @@ namespace Tizen.NUI.BaseComponents
                     return;
                 }
 
-                if(type == DisposeTypes.Explicit)
+                if (type == DisposeTypes.Explicit)
                 {
                     //Called by User
                     //Release your own managed resources here.
@@ -378,8 +379,12 @@ namespace Tizen.NUI.BaseComponents
         /// <since_tizen> 3 </since_tizen>
         public View GetChildAt(TableView.CellPosition position)
         {
+            //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = NDalicPINVOKE.TableView_GetChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -393,8 +398,12 @@ namespace Tizen.NUI.BaseComponents
         /// <since_tizen> 3 </since_tizen>
         public View RemoveChildAt(TableView.CellPosition position)
         {
+            //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = NDalicPINVOKE.TableView_RemoveChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
index 1bec44e..0cb1d41 100755 (executable)
@@ -68,7 +68,7 @@ namespace Tizen.NUI.BaseComponents
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            if (_textEditorTextChangedCallbackDelegate != null)
+            if (this != null && _textEditorTextChangedCallbackDelegate != null)
             {
                 TextChangedSignal().Disconnect(_textEditorTextChangedCallbackDelegate);
             }
@@ -297,11 +297,12 @@ namespace Tizen.NUI.BaseComponents
             internal static readonly int SCROLL_BAR_FADE_DURATION = NDalicManualPINVOKE.TextEditor_Property_SCROLL_BAR_FADE_DURATION_get();
             internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextEditor_Property_PIXEL_SIZE_get();
             internal static readonly int LINE_COUNT = NDalicManualPINVOKE.TextEditor_Property_LINE_COUNT_get();
-            internal static readonly int PLACEHOLDER_TEXT = NDalicManualPINVOKE.TextEditor_Property_PLACEHOLDER_TEXT_get();
-            internal static readonly int PLACEHOLDER_TEXT_COLOR = NDalicManualPINVOKE.TextEditor_Property_PLACEHOLDER_TEXT_COLOR_get();
             internal static readonly int ENABLE_SELECTION = NDalicManualPINVOKE.TextEditor_Property_ENABLE_SELECTION_get();
             internal static readonly int PLACEHOLDER = NDalicManualPINVOKE.TextEditor_Property_PLACEHOLDER_get();
             internal static readonly int LINE_WRAP_MODE = NDalicManualPINVOKE.TextEditor_Property_LINE_WRAP_MODE_get();
+            internal static readonly int PLACEHOLDER_TEXT = NDalicManualPINVOKE.TextEditor_Property_PLACEHOLDER_TEXT_get();
+            internal static readonly int PLACEHOLDER_TEXT_COLOR = NDalicManualPINVOKE.TextEditor_Property_PLACEHOLDER_TEXT_COLOR_get();
+            internal static readonly int ENABLE_SHIFT_SELECTION = NDalicManualPINVOKE.TextEditor_Property_ENABLE_SHIFT_SELECTION_get();
         }
 
         internal class InputStyle
@@ -1411,6 +1412,27 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
-    }
+        /// <summary>
+        /// Enables Text selection using Shift key.
+        /// </summary>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool EnableShiftSelection
+        {
+            get
+            {
+                // mShiftSelectionFlag( true )
+                bool temp = true;
+                GetProperty(TextEditor.Property.ENABLE_SHIFT_SELECTION).Get(out temp);
+                return temp;
+            }
+            set
+            {
+                SetProperty(TextEditor.Property.ENABLE_SHIFT_SELECTION, new Tizen.NUI.PropertyValue(value));
+            }
+        }
 
+
+    }
 }
index 4cf304e..d9a9c52 100755 (executable)
@@ -67,15 +67,17 @@ namespace Tizen.NUI.BaseComponents
             //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.
-
-            if (_textFieldMaxLengthReachedCallbackDelegate != null)
+            if (this != null)
             {
-                this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate);
-            }
+                if (_textFieldMaxLengthReachedCallbackDelegate != null)
+                {
+                    this.MaxLengthReachedSignal().Disconnect(_textFieldMaxLengthReachedCallbackDelegate);
+                }
 
-            if (_textFieldTextChangedCallbackDelegate != null)
-            {
-                TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate);
+                if (_textFieldTextChangedCallbackDelegate != null)
+                {
+                    TextChangedSignal().Disconnect(_textFieldTextChangedCallbackDelegate);
+                }
             }
 
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
@@ -286,6 +288,7 @@ namespace Tizen.NUI.BaseComponents
             internal static readonly int ENABLE_SELECTION = NDalicManualPINVOKE.TextField_Property_ENABLE_SELECTION_get();
             internal static readonly int PLACEHOLDER = NDalicManualPINVOKE.TextField_Property_PLACEHOLDER_get();
             internal static readonly int ELLIPSIS = NDalicManualPINVOKE.TextField_Property_ELLIPSIS_get();
+            internal static readonly int ENABLE_SHIFT_SELECTION = NDalicManualPINVOKE.TextField_Property_ENABLE_SHIFT_SELECTION_get();
         }
 
         internal class InputStyle
@@ -1441,7 +1444,28 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
+        /// <summary>
+        /// Enables Text selection using Shift key.
+        /// </summary>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool EnableShiftSelection
+        {
+            get
+            {
+                // mShiftSelectionFlag( true )
+                bool temp = true;
+                GetProperty(TextField.Property.ENABLE_SHIFT_SELECTION).Get(out temp);
+                return temp;
+            }
+            set
+            {
+                SetProperty(TextField.Property.ENABLE_SHIFT_SELECTION, new Tizen.NUI.PropertyValue(value));
+            }
+        }
 
-    }
 
+
+    }
 }
index 2cc141b..f8e39ea 100755 (executable)
@@ -111,6 +111,7 @@ namespace Tizen.NUI.BaseComponents
             internal static readonly int LINE_COUNT = NDalicManualPINVOKE.TextLabel_Property_LINE_COUNT_get();
             internal static readonly int LINE_WRAP_MODE = NDalicManualPINVOKE.TextLabel_Property_LINE_WRAP_MODE_get();
             internal static readonly int TEXT_DIRECTION = NDalicManualPINVOKE.TextLabel_Property_TEXT_DIRECTION_get();
+            internal static readonly int VERTICAL_LINE_ALIGNMENT = NDalicManualPINVOKE.TextLabel_Property_VERTICAL_LINE_ALIGNMENT_get();
         }
 
         /// <summary>
@@ -822,6 +823,7 @@ namespace Tizen.NUI.BaseComponents
         /// The text direction.
         /// </summary>
         /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
         public TextDirection TextDirection
         {
@@ -832,5 +834,26 @@ namespace Tizen.NUI.BaseComponents
                 return (TextDirection)temp;
             }
         }
+
+        /// <summary>
+        /// The text vertical line alignment.
+        /// </summary>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public VerticalLineAlignment VerticalLineAlignment
+        {
+            get
+            {
+                int temp = 0;
+                GetProperty(TextLabel.Property.VERTICAL_LINE_ALIGNMENT).Get(out temp);
+                return (VerticalLineAlignment)temp;
+            }
+            set
+            {
+                SetProperty(TextLabel.Property.VERTICAL_LINE_ALIGNMENT, new Tizen.NUI.PropertyValue((int)value));
+            }
+        }
+
     }
 }
index 4c15f39..f17dd45 100755 (executable)
@@ -61,7 +61,7 @@ namespace Tizen.NUI.BaseComponents
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            if (_videoViewFinishedCallbackDelegate != null)
+            if (this != null && _videoViewFinishedCallbackDelegate != null)
             {
                 FinishedSignal().Disconnect(_videoViewFinishedCallbackDelegate);
             }
old mode 100755 (executable)
new mode 100644 (file)
index 37d437e..6a73ab0
@@ -32,7 +32,10 @@ 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);
-            PositionUsesPivotPoint = false;
+            if (HasBody())
+            {
+                PositionUsesPivotPoint = false;
+            }
         }
 
         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
@@ -49,11 +52,18 @@ namespace Tizen.NUI.BaseComponents
         /// <since_tizen> 4 </since_tizen>
         public override void Add(View child)
         {
-            NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
-            Children.Add(child);
+            Container oldParent = child.GetParent();
+            if(oldParent != this)
+            {
+                if (oldParent != null)
+                {
+                    oldParent.Remove(child);
+                }
+                NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
+                if (NDalicPINVOKE.SWIGPendingException.Pending)
+                    throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                Children.Add(child);
+            }
         }
 
         /// <summary>
@@ -104,9 +114,12 @@ namespace Tizen.NUI.BaseComponents
         /// <since_tizen> 4 </since_tizen>
         public override Container GetParent()
         {
+            //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
-
-            BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -116,7 +129,7 @@ namespace Tizen.NUI.BaseComponents
 
         internal bool IsTopLevelView()
         {
-            if(GetParent() is Layer)
+            if (GetParent() is Layer)
             {
                 return true;
             }
@@ -130,12 +143,12 @@ namespace Tizen.NUI.BaseComponents
         /// <since_tizen> 3 </since_tizen>
         protected override void Dispose(DisposeTypes type)
         {
-            if(disposed)
+            if (disposed)
             {
                 return;
             }
 
-            if(type == DisposeTypes.Explicit)
+            if (type == DisposeTypes.Explicit)
             {
                 //Called by User
                 //Release your own managed resources here.
@@ -145,8 +158,10 @@ namespace Tizen.NUI.BaseComponents
             //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.
-
-            DisConnectFromSignals();
+            if (this != null)
+            {
+                DisConnectFromSignals();
+            }
 
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
@@ -401,6 +416,12 @@ namespace Tizen.NUI.BaseComponents
 
         private bool OnKeyEvent(IntPtr view, IntPtr keyEvent)
         {
+            if (keyEvent == global::System.IntPtr.Zero)
+            {
+                NUILog.Error("keyEvent should not be null!");
+                return true;
+            }
+
             KeyEventArgs e = new KeyEventArgs();
 
             bool result = false;
@@ -412,9 +433,9 @@ namespace Tizen.NUI.BaseComponents
                 Delegate[] delegateList = _keyEventHandler.GetInvocationList();
 
                 // Oring the result of each callback.
-                foreach ( EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList )
+                foreach (EventHandlerWithReturnType<object, KeyEventArgs, bool> del in delegateList)
                 {
-                    result |= del( this, e );
+                    result |= del(this, e);
                 }
             }
 
@@ -528,6 +549,12 @@ namespace Tizen.NUI.BaseComponents
         // Callback for View TouchSignal
         private bool OnTouch(IntPtr view, IntPtr touchData)
         {
+            if (touchData == global::System.IntPtr.Zero)
+            {
+                NUILog.Error("touchData should not be null!");
+                return true;
+            }
+
             TouchEventArgs e = new TouchEventArgs();
 
             e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData);
@@ -603,6 +630,12 @@ namespace Tizen.NUI.BaseComponents
         // Callback for View Hover signal
         private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent)
         {
+            if (hoverEvent == global::System.IntPtr.Zero)
+            {
+                NUILog.Error("hoverEvent should not be null!");
+                return true;
+            }
+
             HoverEventArgs e = new HoverEventArgs();
 
             e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent);
@@ -678,6 +711,12 @@ namespace Tizen.NUI.BaseComponents
         // Callback for View Wheel signal
         private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent)
         {
+            if (wheelEvent == global::System.IntPtr.Zero)
+            {
+                NUILog.Error("wheelEvent should not be null!");
+                return true;
+            }
+
             WheelEventArgs e = new WheelEventArgs();
 
             e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent);
@@ -1358,7 +1397,7 @@ namespace Tizen.NUI.BaseComponents
         /// background visual, creates one with transparent black as it's mixColor.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        public Animation AnimateBackgroundColor( object destinationValue,
+        public Animation AnimateBackgroundColor(object destinationValue,
                                                  int startTime,
                                                  int endTime,
                                                  AlphaFunction.BuiltinFunctions? alphaFunction = null,
@@ -1366,51 +1405,51 @@ namespace Tizen.NUI.BaseComponents
         {
             Tizen.NUI.PropertyMap background = Background;
 
-            if( background.Empty() )
+            if (background.Empty())
             {
                 // If there is no background yet, ensure there is a transparent
                 // color visual
                 BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f);
                 background = Background;
             }
-            return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue );
+            return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue);
         }
 
         /// <summary>
         /// Creates an animation to animate the mixColor of the named visual.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
-        public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null )
+        public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
         {
             Animation animation = null;
             {
                 PropertyMap _animator = new PropertyMap();
-                if( alphaFunction != null )
+                if (alphaFunction != null)
                 {
-                    _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) );
+                    _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction)));
                 }
 
                 PropertyMap _timePeriod = new PropertyMap();
-                _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) );
-                _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) );
-                _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) );
+                _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f));
+                _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f));
+                _animator.Add("timePeriod", new PropertyValue(_timePeriod));
 
                 PropertyMap _transition = new PropertyMap();
-                _transition.Add( "animator", new PropertyValue( _animator ) );
-                _transition.Add( "target", new PropertyValue( targetVisual ) );
-                _transition.Add( "property", new PropertyValue( "mixColor" ) );
+                _transition.Add("animator", new PropertyValue(_animator));
+                _transition.Add("target", new PropertyValue(targetVisual));
+                _transition.Add("property", new PropertyValue("mixColor"));
 
-                if( initialColor != null )
+                if (initialColor != null)
                 {
-                    PropertyValue initValue = PropertyValue.CreateFromObject( initialColor );
-                    _transition.Add( "initialValue", initValue );
+                    PropertyValue initValue = PropertyValue.CreateFromObject(initialColor);
+                    _transition.Add("initialValue", initValue);
                 }
 
-                PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor );
-                _transition.Add( "targetValue", destValue );
-                TransitionData _transitionData = new TransitionData( _transition );
+                PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor);
+                _transition.Add("targetValue", destValue);
+                TransitionData _transitionData = new TransitionData(_transition);
 
-                animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true );
+                animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true);
                 if (NDalicPINVOKE.SWIGPendingException.Pending)
                     throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
@@ -1452,7 +1491,7 @@ namespace Tizen.NUI.BaseComponents
             get
             {
                 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
-                GetProperty( View.Property.BACKGROUND ).Get(temp);
+                GetProperty(View.Property.BACKGROUND).Get(temp);
                 return temp;
             }
             set
@@ -1478,21 +1517,21 @@ namespace Tizen.NUI.BaseComponents
                 switch (temp)
                 {
                     case 0:
-                    {
-                        return States.Normal;
-                    }
+                        {
+                            return States.Normal;
+                        }
                     case 1:
-                    {
-                        return States.Focused;
-                    }
+                        {
+                            return States.Focused;
+                        }
                     case 2:
-                    {
-                        return States.Disabled;
-                    }
+                        {
+                            return States.Disabled;
+                        }
                     default:
-                    {
-                        return States.Normal;
-                    }
+                        {
+                            return States.Normal;
+                        }
                 }
             }
             set
@@ -1532,25 +1571,25 @@ namespace Tizen.NUI.BaseComponents
                 switch (value)
                 {
                     case States.Normal:
-                    {
-                        valueToString = "NORMAL";
-                        break;
-                    }
+                        {
+                            valueToString = "NORMAL";
+                            break;
+                        }
                     case States.Focused:
-                    {
-                        valueToString = "FOCUSED";
-                        break;
-                    }
+                        {
+                            valueToString = "FOCUSED";
+                            break;
+                        }
                     case States.Disabled:
-                    {
-                        valueToString = "DISABLED";
-                        break;
-                    }
+                        {
+                            valueToString = "DISABLED";
+                            break;
+                        }
                     default:
-                    {
-                        valueToString = "NORMAL";
-                        break;
-                    }
+                        {
+                            valueToString = "NORMAL";
+                            break;
+                        }
                 }
                 SetProperty(View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
             }
@@ -1786,25 +1825,25 @@ namespace Tizen.NUI.BaseComponents
                 switch (value)
                 {
                     case Tizen.NUI.HorizontalAlignmentType.Left:
-                    {
-                        valueToString = "left";
-                        break;
-                    }
+                        {
+                            valueToString = "left";
+                            break;
+                        }
                     case Tizen.NUI.HorizontalAlignmentType.Center:
-                    {
-                        valueToString = "center";
-                        break;
-                    }
+                        {
+                            valueToString = "center";
+                            break;
+                        }
                     case Tizen.NUI.HorizontalAlignmentType.Right:
-                    {
-                        valueToString = "right";
-                        break;
-                    }
+                        {
+                            valueToString = "right";
+                            break;
+                        }
                     default:
-                    {
-                        valueToString = "left";
-                        break;
-                    }
+                        {
+                            valueToString = "left";
+                            break;
+                        }
                 }
                 SetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
             }
@@ -1842,25 +1881,25 @@ namespace Tizen.NUI.BaseComponents
                 switch (value)
                 {
                     case Tizen.NUI.VerticalAlignmentType.Top:
-                    {
-                        valueToString = "top";
-                        break;
-                    }
+                        {
+                            valueToString = "top";
+                            break;
+                        }
                     case Tizen.NUI.VerticalAlignmentType.Center:
-                    {
-                        valueToString = "center";
-                        break;
-                    }
+                        {
+                            valueToString = "center";
+                            break;
+                        }
                     case Tizen.NUI.VerticalAlignmentType.Bottom:
-                    {
-                        valueToString = "bottom";
-                        break;
-                    }
+                        {
+                            valueToString = "bottom";
+                            break;
+                        }
                     default:
-                    {
-                        valueToString = "top";
-                        break;
-                    }
+                        {
+                            valueToString = "top";
+                            break;
+                        }
                 }
                 SetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
             }
@@ -1885,7 +1924,7 @@ namespace Tizen.NUI.BaseComponents
             }
             set
             {
-                if(value)
+                if (value)
                 {
                     LeftFocusableViewId = (int)value.GetId();
                 }
@@ -1915,7 +1954,7 @@ namespace Tizen.NUI.BaseComponents
             }
             set
             {
-                if(value)
+                if (value)
                 {
                     RightFocusableViewId = (int)value.GetId();
                 }
@@ -1945,7 +1984,7 @@ namespace Tizen.NUI.BaseComponents
             }
             set
             {
-                if(value)
+                if (value)
                 {
                     UpFocusableViewId = (int)value.GetId();
                 }
@@ -1975,7 +2014,7 @@ namespace Tizen.NUI.BaseComponents
             }
             set
             {
-                if(value)
+                if (value)
                 {
                     DownFocusableViewId = (int)value.GetId();
                 }
@@ -2118,10 +2157,6 @@ namespace Tizen.NUI.BaseComponents
             {
                 Vector2 temp = new Vector2(0.0f, 0.0f);
                 GetProperty(View.Property.SCREEN_POSITION).Get(temp);
-                // Dali's default layer is default center origin. need to change as top left.
-                // NUI's Layer is like a transparent film which covers entire window. (Layer is not an actor of Dali)
-                // otherwise, this makes ScreenPosition as wrong value.
-                temp -= (Window.Instance.GetSize() * 0.5f);
                 return temp;
             }
         }
@@ -2215,7 +2250,7 @@ namespace Tizen.NUI.BaseComponents
         /// Sets the sibling order of the view so the depth position can be defined within the same parent.
         /// </summary>
         /// <remarks>
-        /// Note the initial value is 0.
+        /// Note the initial value is 0. SiblingOrder should be bigger than 0 or equal to 0.
         /// Raise, Lower, RaiseToTop, LowerToBottom, RaiseAbove, and LowerBelow will override the sibling order.
         /// The values set by this property will likely change.
         /// </remarks>
@@ -2224,13 +2259,58 @@ namespace Tizen.NUI.BaseComponents
         {
             get
             {
-                int temp = 0;
-                GetProperty(View.Property.SIBLING_ORDER).Get(out temp);
-                return temp;
+                var parentChildren = GetParent()?.Children;
+                int currentOrder = 0;
+                if (parentChildren != null)
+                {
+                    currentOrder = parentChildren.IndexOf(this);
+
+                    if (currentOrder < 0)
+                    {
+                        return 0;
+                    }
+                    else if (currentOrder < parentChildren.Count)
+                    {
+                        return currentOrder;
+                    }
+                }
+
+                return 0;
             }
             set
             {
-                SetProperty(View.Property.SIBLING_ORDER, new Tizen.NUI.PropertyValue(value));
+                if(value < 0)
+                {
+                    NUILog.Error("SiblingOrder should be bigger than 0 or equal to 0.");
+                    return;
+                }
+                var siblings = GetParent()?.Children;
+                if (siblings != null)
+                {
+                    int currentOrder = siblings.IndexOf(this);
+                    if (value != currentOrder)
+                    {
+                        if (value == 0)
+                        {
+                            LowerToBottom();
+                        }
+                        else if (value < siblings.Count - 1)
+                        {
+                            if (value > currentOrder)
+                            {
+                                RaiseAbove(siblings[value]);
+                            }
+                            else
+                            {
+                                LowerBelow(siblings[value]);
+                            }
+                        }
+                        else
+                        {
+                            RaiseToTop();
+                        }
+                    }
+                }
             }
         }
 
@@ -2306,46 +2386,47 @@ namespace Tizen.NUI.BaseComponents
 
         internal void Raise()
         {
-            var parentChildren = Parent?.Children;
+            var parentChildren = GetParent()?.Children;
 
             if (parentChildren != null)
             {
                 int currentIndex = parentChildren.IndexOf(this);
 
                 // If the view is not already the last item in the list.
-                if (currentIndex != parentChildren.Count -1)
+                if (currentIndex >= 0 && currentIndex < parentChildren.Count -1)
                 {
                     View temp = parentChildren[currentIndex + 1];
                     parentChildren[currentIndex + 1] = this;
                     parentChildren[currentIndex] = temp;
+
+                    NDalicPINVOKE.Raise(swigCPtr);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending)
+                        throw NDalicPINVOKE.SWIGPendingException.Retrieve();
                 }
             }
 
-            NDalicPINVOKE.Raise(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
         internal void Lower()
         {
-            var parentChildren = Parent?.Children;
+            var parentChildren = GetParent()?.Children;
 
             if (parentChildren != null)
             {
                 int currentIndex = parentChildren.IndexOf(this);
 
                 // If the view is not already the first item in the list.
-                if (currentIndex > 0)
+                if (currentIndex > 0 && currentIndex < parentChildren.Count)
                 {
                     View temp = parentChildren[currentIndex - 1];
                     parentChildren[currentIndex - 1] = this;
                     parentChildren[currentIndex] = temp;
+
+                    NDalicPINVOKE.Lower(swigCPtr);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending)
+                        throw NDalicPINVOKE.SWIGPendingException.Retrieve();
                 }
             }
-
-            NDalicPINVOKE.Lower(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
         /// <summary>
@@ -2358,17 +2439,18 @@ namespace Tizen.NUI.BaseComponents
         /// <since_tizen> 3 </since_tizen>
         public void RaiseToTop()
         {
-            var parentChildren = Parent?.Children;
+            var parentChildren = GetParent()?.Children;
 
             if (parentChildren != null)
             {
                 parentChildren.Remove(this);
                 parentChildren.Add(this);
+
+                NDalicPINVOKE.RaiseToTop(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending)
+                    throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
 
-            NDalicPINVOKE.RaiseToTop(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
         /// <summary>
@@ -2381,17 +2463,17 @@ namespace Tizen.NUI.BaseComponents
         /// <since_tizen> 3 </since_tizen>
         public void LowerToBottom()
         {
-            var parentChildren = Parent?.Children;
+            var parentChildren = GetParent()?.Children;
 
             if (parentChildren != null)
             {
                 parentChildren.Remove(this);
                 parentChildren.Insert(0, this);
-            }
 
-            NDalicPINVOKE.LowerToBottom(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                NDalicPINVOKE.LowerToBottom(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending)
+                    throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
         }
 
         /// <summary>
@@ -2418,24 +2500,31 @@ namespace Tizen.NUI.BaseComponents
         /// <param name="target">Will be raised above this view.</param>
         internal void RaiseAbove(View target)
         {
-            var parentChildren = Parent?.Children;
+            var parentChildren = GetParent()?.Children;
 
             if (parentChildren != null)
             {
                 int currentIndex = parentChildren.IndexOf(this);
                 int targetIndex = parentChildren.IndexOf(target);
 
+                if(currentIndex < 0 || targetIndex < 0 ||
+                    currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
+                {
+                    NUILog.Error("index should be bigger than 0 and less than children of layer count");
+                    return;
+                }
                 // If the currentIndex is less than the target index and the target has the same parent.
                 if (currentIndex < targetIndex)
                 {
                     parentChildren.Remove(this);
                     parentChildren.Insert(targetIndex, this);
+
+                    NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
+                    if (NDalicPINVOKE.SWIGPendingException.Pending)
+                        throw NDalicPINVOKE.SWIGPendingException.Retrieve();
                 }
             }
 
-            NDalicPINVOKE.RaiseAbove(swigCPtr, View.getCPtr(target));
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
         /// <summary>
@@ -2448,12 +2537,18 @@ namespace Tizen.NUI.BaseComponents
         /// <param name="target">Will be lowered below this view.</param>
         internal void LowerBelow(View target)
         {
-            var parentChildren = Parent?.Children;
+            var parentChildren = GetParent()?.Children;
 
             if (parentChildren != null)
             {
                 int currentIndex = parentChildren.IndexOf(this);
                 int targetIndex = parentChildren.IndexOf(target);
+                if(currentIndex < 0 || targetIndex < 0 ||
+                   currentIndex >= parentChildren.Count ||targetIndex >= parentChildren.Count)
+                {
+                    NUILog.Error("index should be bigger than 0 and less than children of layer count");
+                    return;
+                }
 
                 // If the currentIndex is not already the 0th index and the target has the same parent.
                 if ((currentIndex != 0) && (targetIndex != -1) &&
@@ -2461,12 +2556,13 @@ namespace Tizen.NUI.BaseComponents
                 {
                     parentChildren.Remove(this);
                     parentChildren.Insert(targetIndex, this);
+
+                    NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
+                    if (NDalicPINVOKE.SWIGPendingException.Pending)
+                        throw NDalicPINVOKE.SWIGPendingException.Retrieve();
                 }
             }
 
-            NDalicPINVOKE.LowerBelow(swigCPtr, View.getCPtr(target));
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
         internal string GetName()
@@ -2515,8 +2611,12 @@ namespace Tizen.NUI.BaseComponents
         /// <since_tizen> 5 </since_tizen>
         public Layer GetLayer()
         {
+            //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
-            Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -2543,9 +2643,12 @@ namespace Tizen.NUI.BaseComponents
         /// <since_tizen> 3 </since_tizen>
         public View FindChildByName(string viewName)
         {
+            //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
-
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -2554,9 +2657,12 @@ namespace Tizen.NUI.BaseComponents
 
         internal View FindChildById(uint id)
         {
+            //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
-
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -3150,8 +3256,12 @@ namespace Tizen.NUI.BaseComponents
         /// <since_tizen> 3 </since_tizen>
         public Renderer GetRendererAt(uint index)
         {
+            //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
-            Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -3222,14 +3332,16 @@ namespace Tizen.NUI.BaseComponents
             return ret;
         }
 
-        internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view) {
+        internal ViewVisibilityChangedSignal VisibilityChangedSignal(View view)
+        {
             ViewVisibilityChangedSignal ret = new ViewVisibilityChangedSignal(NDalicPINVOKE.VisibilityChangedSignal(View.getCPtr(view)), false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
 
-        internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view) {
+        internal ViewLayoutDirectionChangedSignal LayoutDirectionChangedSignal(View view)
+        {
             ViewLayoutDirectionChangedSignal ret = new ViewLayoutDirectionChangedSignal(NDalicManualPINVOKE.LayoutDirectionChangedSignal(View.getCPtr(view)), false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -3824,13 +3936,13 @@ namespace Tizen.NUI.BaseComponents
                 switch (temp)
                 {
                     case "NORMAL":
-                    return DrawModeType.Normal;
+                        return DrawModeType.Normal;
                     case "OVERLAY_2D":
-                    return DrawModeType.Overlay2D;
+                        return DrawModeType.Overlay2D;
                     case "STENCIL":
-                    return DrawModeType.Stencil;
+                        return DrawModeType.Stencil;
                     default:
-                    return DrawModeType.Normal;
+                        return DrawModeType.Normal;
                 }
             }
             set
@@ -4123,13 +4235,13 @@ namespace Tizen.NUI.BaseComponents
                 switch (temp)
                 {
                     case "DISABLED":
-                    return ClippingModeType.Disabled;
+                        return ClippingModeType.Disabled;
                     case "CLIP_CHILDREN":
-                    return ClippingModeType.ClipChildren;
+                        return ClippingModeType.ClipChildren;
                     case "CLIP_TO_BOUNDING_BOX":
-                    return ClippingModeType.ClipToBoundingBox;
+                        return ClippingModeType.ClipToBoundingBox;
                     default:
-                    return ClippingModeType.Disabled;
+                        return ClippingModeType.Disabled;
                 }
             }
             set
@@ -4214,8 +4326,10 @@ namespace Tizen.NUI.BaseComponents
             {
                 View ret;
                 IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
-
-                BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(cPtr);
+                HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+                BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
+                NDalicPINVOKE.delete_BaseHandle(CPtr);
+                CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
                 if (basehandle is Layer)
                 {
index 653043c..17cf9f4 100755 (executable)
@@ -37,15 +37,16 @@ namespace Tizen.NUI
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
             _registerMe = swigCMemOwn = cMemoryOwn;
-
             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
 
             // using copy constructor to create another native handle so Registry.Unregister works fine.
             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, NDalicPINVOKE.new_BaseHandle__SWIG_2(swigCPtr));
+
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
             if (_registerMe)
             {
+
                 // Register this instance of BaseHandle in the registry.
                 Registry.Register(this);
             }
index d1d57b7..f8fd384 100755 (executable)
@@ -43,72 +43,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        /// <summary>
-        /// To make the FocusManager instance be disposed.
-        /// </summary>
-        /// Please DO NOT use! This will be deprecated!
-        /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required.
-        /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed.
-        /// <since_tizen> 3 </since_tizen>
-        [Obsolete("Please do not use! This will be deprecated!")]
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        protected override void Dispose(DisposeTypes type)
-        {
-            if (disposed)
-            {
-                return;
-            }
-
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-            }
-
-            //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.
-
-            if (_focusedViewEnterKeyEventCallback2 != null)
-            {
-                FocusedViewEnterKeySignal().Disconnect(_focusedViewEnterKeyEventCallback2);
-            }
-
-            if (_focusedViewEnterKeyEventCallback != null)
-            {
-                FocusedViewEnterKeySignal().Disconnect(_focusedViewEnterKeyEventCallback);
-            }
-
-            if (_focusGroupChangedEventCallback != null)
-            {
-                FocusGroupChangedSignal().Disconnect(_focusGroupChangedEventCallback);
-            }
-
-            if (_focusChangedEventCallback != null)
-            {
-                FocusChangedSignal().Disconnect(_focusChangedEventCallback);
-            }
-
-            if (_preFocusChangeCallback != null)
-            {
-                PreFocusChangeSignal().Disconnect(_preFocusChangeCallback);
-            }
-
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)
-            {
-                if (swigCMemOwn)
-                {
-                    swigCMemOwn = false;
-                    NDalicManualPINVOKE.delete_FocusManager(swigCPtr);
-                }
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-            }
-
-            base.Dispose(type);
-        }
-
-
         ///<summary>
         /// Event arguments that passed via the PreFocusChange signal.
         /// </summary>
@@ -515,9 +449,13 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public View GetCurrentFocusView()
         {
+            //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = NDalicManualPINVOKE.FocusManager_GetCurrentFocusActor(swigCPtr);
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
             return ret;
         }
 
@@ -619,17 +557,12 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public View GetFocusGroup(View view)
         {
+            //to fix memory leak issue, match the handle count with native side.
             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;
-            }*/
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             return ret;
         }
@@ -659,9 +592,12 @@ namespace Tizen.NUI
 
         internal View GetFocusIndicatorView()
         {
+            //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = NDalicManualPINVOKE.FocusManager_GetFocusIndicatorActor(swigCPtr);
-
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             return ret;
         }
diff --git a/src/Tizen.NUI/src/public/ImageLoading.cs b/src/Tizen.NUI/src/public/ImageLoading.cs
new file mode 100755 (executable)
index 0000000..b04a085
--- /dev/null
@@ -0,0 +1,329 @@
+/*
+ * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+
+    /// <summary>
+    /// Loading an image.
+    /// </summary>
+    /// <since_tizen> 5 </since_tizen>
+    /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class ImageLoading
+    {
+        /// <summary>
+        /// Load an image synchronously from local file.
+        /// </summary>
+        /// <param name="url">The URL of the image file to load.</param>
+        /// <param name="size">The width and height to fit the loaded image to, 0.0 means whole image.</param>
+        /// <param name="fittingMode">The method used to fit the shape of the image before loading to the shape defined by the size parameter.</param>
+        /// <param name="samplingMode">The filtering method used when sampling pixels from the input image while fitting it to desired size.</param>
+        /// <param name="orientationCorrection">Reorient the image to respect any orientation metadata in its header.</param>
+        /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case loading failed.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static PixelBuffer LoadImageFromFile(string url, Size2D size, FittingModeType fittingMode, SamplingModeType samplingMode, bool orientationCorrection)
+        {
+            var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
+            PixelBuffer ret = new PixelBuffer(NDalicPINVOKE.LoadImageFromFile__SWIG_0(url, Uint16Pair.getCPtr(uSize), (int)fittingMode, (int)samplingMode, orientationCorrection), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Load an image synchronously from local file.
+        /// </summary>
+        /// <param name="url">The URL of the image file to load.</param>
+        /// <param name="size">The width and height to fit the loaded image to, 0.0 means whole image.</param>
+        /// <param name="fittingMode">The method used to fit the shape of the image before loading to the shape defined by the size parameter.</param>
+        /// <param name="samplingMode">The filtering method used when sampling pixels from the input image while fitting it to desired size.</param>
+        /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case loading failed.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static PixelBuffer LoadImageFromFile(string url, Size2D size, FittingModeType fittingMode, SamplingModeType samplingMode)
+        {
+            var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
+            PixelBuffer ret = new PixelBuffer(NDalicPINVOKE.LoadImageFromFile__SWIG_1(url, Uint16Pair.getCPtr(uSize), (int)fittingMode, (int)samplingMode), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Load an image synchronously from local file.
+        /// </summary>
+        /// <param name="url">The URL of the image file to load.</param>
+        /// <param name="size">The width and height to fit the loaded image to, 0.0 means whole image.</param>
+        /// <param name="fittingMode">The method used to fit the shape of the image before loading to the shape defined by the size parameter.</param>
+        /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case loading failed.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static PixelBuffer LoadImageFromFile(string url, Size2D size, FittingModeType fittingMode)
+        {
+            var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
+            PixelBuffer ret = new PixelBuffer(NDalicPINVOKE.LoadImageFromFile__SWIG_2(url, Uint16Pair.getCPtr(uSize), (int)fittingMode), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Load an image synchronously from local file.
+        /// </summary>
+        /// <param name="url">The URL of the image file to load.</param>
+        /// <param name="size">The width and height to fit the loaded image to, 0.0 means whole image.</param>
+        /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case loading failed.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static PixelBuffer LoadImageFromFile(string url, Size2D size)
+        {
+            var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
+            PixelBuffer ret = new PixelBuffer(NDalicPINVOKE.LoadImageFromFile__SWIG_3(url, Uint16Pair.getCPtr(uSize)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Load an image synchronously from local file.
+        /// </summary>
+        /// <param name="url">The URL of the image file to load.</param>
+        /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case loading failed.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static PixelBuffer LoadImageFromFile(string url)
+        {
+            PixelBuffer ret = new PixelBuffer(NDalicPINVOKE.LoadImageFromFile__SWIG_4(url), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Determine the size of an image that LoadImageFromFile will provide when given the same image loading parameters.
+        /// </summary>
+        /// <param name="filename">The name of the image.</param>
+        /// <param name="size">The requested size for the image</param>
+        /// <param name="fittingMode">The method to use to map the source image to the desired dimensions.</param>
+        /// <param name="samplingMode">The image filter to use if the image needs to be downsampled to the requested size.</param>
+        /// <param name="orientationCorrection">Whether to use image metadata to rotate or flip the image, e.g., from portrait to landscape.</param>
+        /// <returns>Dimensions that image will have if it is loaded with given parameters.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Size2D GetClosestImageSize(string filename, Size2D size, FittingModeType fittingMode, SamplingModeType samplingMode, bool orientationCorrection)
+        {
+            var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
+            var val = new Uint16Pair(NDalicPINVOKE.GetClosestImageSize__SWIG_0(filename, Uint16Pair.getCPtr(uSize), (int)fittingMode, (int)samplingMode, orientationCorrection), true);
+            Size2D ret = new Size2D(val.GetWidth(), val.GetHeight());
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Determine the size of an image that LoadImageFromFile will provide when given the same image loading parameters.
+        /// </summary>
+        /// <param name="filename">The name of the image.</param>
+        /// <param name="size">The requested size for the image</param>
+        /// <param name="fittingMode">The method to use to map the source image to the desired dimensions.</param>
+        /// <param name="samplingMode">The image filter to use if the image needs to be downsampled to the requested size.</param>
+        /// <returns>Dimensions that image will have if it is loaded with given parameters.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Size2D GetClosestImageSize(string filename, Size2D size, FittingModeType fittingMode, SamplingModeType samplingMode)
+        {
+            var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
+            var val = new Uint16Pair(NDalicPINVOKE.GetClosestImageSize__SWIG_1(filename, Uint16Pair.getCPtr(uSize), (int)fittingMode, (int)samplingMode), true);
+            Size2D ret = new Size2D(val.GetWidth(), val.GetHeight());
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Determine the size of an image that LoadImageFromFile will provide when given the same image loading parameters.
+        /// </summary>
+        /// <param name="filename">The name of the image.</param>
+        /// <param name="size">The requested size for the image</param>
+        /// <param name="fittingMode">The method to use to map the source image to the desired dimensions.</param>
+        /// <returns>Dimensions that image will have if it is loaded with given parameters.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Size2D GetClosestImageSize(string filename, Size2D size, FittingModeType fittingMode)
+        {
+            var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
+            var val = new Uint16Pair(NDalicPINVOKE.GetClosestImageSize__SWIG_2(filename, Uint16Pair.getCPtr(uSize), (int)fittingMode), true);
+            Size2D ret = new Size2D(val.GetWidth(), val.GetHeight());
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Determine the size of an image that LoadImageFromFile will provide when given the same image loading parameters.
+        /// </summary>
+        /// <param name="filename">The name of the image.</param>
+        /// <param name="size">The requested size for the image</param>
+        /// <returns>Dimensions that image will have if it is loaded with given parameters.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Size2D GetClosestImageSize(string filename, Size2D size)
+        {
+            var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
+            var val = new Uint16Pair(NDalicPINVOKE.GetClosestImageSize__SWIG_3(filename, Uint16Pair.getCPtr(uSize)), true);
+            Size2D ret = new Size2D(val.GetWidth(), val.GetHeight());
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Determine the size of an image that LoadImageFromFile will provide when given the same image loading parameters.
+        /// </summary>
+        /// <param name="filename">The name of the image.</param>
+        /// <returns>Dimensions that image will have if it is loaded with given parameters.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static Size2D GetClosestImageSize(string filename)
+        {
+            var val = new Uint16Pair(NDalicPINVOKE.GetClosestImageSize__SWIG_4(filename), true);
+            Size2D ret = new Size2D(val.GetWidth(), val.GetHeight());
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Load an image synchronously from a remote resource.
+        /// </summary>
+        /// <param name="url">The URL of the image file to load.</param>
+        /// <param name="size">The width and height to fit the loaded image to, 0.0 means whole image.</param>
+        /// <param name="fittingMode">The method used to fit the shape of the image before loading to the shape defined by the size parameter.</param>
+        /// <param name="samplingMode">The filtering method used when sampling pixels from the input image while fitting it to desired size.</param>
+        /// <param name="orientationCorrection">Reorient the image to respect any orientation metadata in its header.</param>
+        /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case downloading or decoding failed.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static PixelBuffer DownloadImageSynchronously(string url, Size2D size, FittingModeType fittingMode, SamplingModeType samplingMode, bool orientationCorrection)
+        {
+            var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
+            PixelBuffer ret = new PixelBuffer(NDalicPINVOKE.DownloadImageSynchronously__SWIG_0(url, Uint16Pair.getCPtr(uSize), (int)fittingMode, (int)samplingMode, orientationCorrection), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Load an image synchronously from a remote resource.
+        /// </summary>
+        /// <param name="url">The URL of the image file to load.</param>
+        /// <param name="size">The width and height to fit the loaded image to, 0.0 means whole image.</param>
+        /// <param name="fittingMode">The method used to fit the shape of the image before loading to the shape defined by the size parameter.</param>
+        /// <param name="samplingMode">The filtering method used when sampling pixels from the input image while fitting it to desired size.</param>
+        /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case downloading or decoding failed.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static PixelBuffer DownloadImageSynchronously(string url, Size2D size, FittingModeType fittingMode, SamplingModeType samplingMode)
+        {
+            var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
+            PixelBuffer ret = new PixelBuffer(NDalicPINVOKE.DownloadImageSynchronously__SWIG_1(url, Uint16Pair.getCPtr(uSize), (int)fittingMode, (int)samplingMode), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Load an image synchronously from a remote resource.
+        /// </summary>
+        /// <param name="url">The URL of the image file to load.</param>
+        /// <param name="size">The width and height to fit the loaded image to, 0.0 means whole image.</param>
+        /// <param name="fittingMode">The method used to fit the shape of the image before loading to the shape defined by the size parameter.</param>
+        /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case downloading or decoding failed.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static PixelBuffer DownloadImageSynchronously(string url, Size2D size, FittingModeType fittingMode)
+        {
+            var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
+            PixelBuffer ret = new PixelBuffer(NDalicPINVOKE.DownloadImageSynchronously__SWIG_2(url, Uint16Pair.getCPtr(uSize), (int)fittingMode), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Load an image synchronously from a remote resource.
+        /// </summary>
+        /// <param name="url">The URL of the image file to load.</param>
+        /// <param name="size">The width and height to fit the loaded image to, 0.0 means whole image.</param>
+        /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case downloading or decoding failed.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static PixelBuffer DownloadImageSynchronously(string url, Size2D size)
+        {
+            var uSize = new Uint16Pair((uint)size.Width, (uint)size.Height);
+            PixelBuffer ret = new PixelBuffer(NDalicPINVOKE.DownloadImageSynchronously__SWIG_3(url, Uint16Pair.getCPtr(uSize)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Load an image synchronously from a remote resource.
+        /// </summary>
+        /// <param name="url">The URL of the image file to load.</param>
+        /// <returns>Handle to the loaded PixelBuffer object or an empty handle in case downloading or decoding failed.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static PixelBuffer DownloadImageSynchronously(string url)
+        {
+            PixelBuffer ret = new PixelBuffer(NDalicPINVOKE.DownloadImageSynchronously__SWIG_4(url), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Set the maximum texture size. Then size can be kwown by GL_MAX_TEXTURE_SIZE.
+        /// </summary>
+        /// <param name="size">The maximum texture size to set.</param>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static void SetMaxTextureSize(uint size)
+        {
+            NDalicPINVOKE.SetMaxTextureSize(size);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Get the maximum texture size.
+        /// </summary>
+        /// <returns>The maximum texture size.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static uint GetMaxTextureSize()
+        {
+            uint ret = NDalicPINVOKE.GetMaxTextureSize();
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+    }
+}
index 226577c..61e364a 100755 (executable)
@@ -54,53 +54,6 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Dispose
-        /// </summary>
-        /// <param name="type">Dispose Type</param>
-        /// <since_tizen> 3 </since_tizen>
-        /// Please DO NOT use! This will be deprecated!
-        /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required.
-        /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed.
-        [Obsolete("Please do not use! This will be deprecated!")]
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        protected override void Dispose(DisposeTypes type)
-        {
-            if (disposed)
-            {
-                return;
-            }
-
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-
-            }
-
-            //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.
-
-            if (_keyboardTypeChangedEventCallback != null)
-            {
-                KeyboardTypeChangedSignal().Disconnect(_keyboardTypeChangedEventCallback);
-            }
-
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)
-            {
-                if (swigCMemOwn)
-                {
-                    swigCMemOwn = false;
-                    NDalicManualPINVOKE.delete_ImfManager(swigCPtr);
-                }
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, IntPtr.Zero);
-            }
-
-            base.Dispose(type);
-        }
-
-        /// <summary>
         /// This structure is used to pass on data from the IMF regarding predictive text.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
@@ -539,18 +492,6 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Destroy the context of the IMF.<br/>
-        /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        /// Please do not use! This will be deprecated, instead please USE Tizen.NUI.ImfManager.Instance.DestroyContext()!
-        [Obsolete("Please do not use! This will be deprecated! Please use ImfManager.Instance.DestroyContext() instead!")]
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public void Finalize()
-        {
-            DestroyContext();
-        }
-
-        /// <summary>
         /// Retrieves a handle to the instance of the ImfManager.
         /// </summary>
         /// <returns>A handle to the ImfManager.</returns>
index bfa0b8e..11f6f49 100755 (executable)
@@ -17,6 +17,7 @@
 using System;
 using Tizen.NUI.BaseComponents;
 using System.ComponentModel;
+using System.Runtime.InteropServices;
 
 namespace Tizen.NUI
 {
@@ -49,11 +50,18 @@ namespace Tizen.NUI
         /// <since_tizen> 4 </since_tizen>
         public override void Add(View child)
         {
-            NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
-            Children.Add(child);
+            Container oldParent = child.GetParent();
+            if (oldParent != this)
+            {
+                if (oldParent != null)
+                {
+                    oldParent.Remove(child);
+                }
+                NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child));
+                if (NDalicPINVOKE.SWIGPendingException.Pending)
+                    throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                Children.Add(child);
+            }
         }
 
         /// <summary>
@@ -162,7 +170,6 @@ namespace Tizen.NUI
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             if(Window.Instance != null)
             {
-                this.SetParentOrigin(Tizen.NUI.ParentOrigin.TopLeft);
                 this.SetAnchorPoint(Tizen.NUI.PivotPoint.TopLeft);
                 this.SetResizePolicy(ResizePolicyType.FillToParent, DimensionType.AllDimensions);
             }
@@ -180,13 +187,6 @@ namespace Tizen.NUI
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
-        internal void SetParentOrigin(Vector3 origin)
-        {
-            NDalicPINVOKE.Actor_SetParentOrigin(swigCPtr, Vector3.getCPtr(origin));
-            if (NDalicPINVOKE.SWIGPendingException.Pending)
-                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
         /// <summary>
         /// Downcasts a handle to layer handle.
         /// </summary>
@@ -212,8 +212,12 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public View FindChildById(uint id)
         {
+            //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending)
                 throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -258,13 +262,16 @@ namespace Tizen.NUI
             {
                 int currentIdx = parentChildren.IndexOf(this);
 
-                if (currentIdx != parentChildren.Count - 1)
+                if (currentIdx >= 0 && currentIdx < parentChildren.Count - 1)
                 {
                     RaiseAbove(parentChildren[currentIdx + 1]);
 
                     Layer temp = parentChildren[currentIdx + 1];
                     parentChildren[currentIdx + 1] = this;
                     parentChildren[currentIdx] = temp;
+
+                    NDalicPINVOKE.Layer_Raise(swigCPtr);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
                 }
             }
         }
@@ -280,7 +287,7 @@ namespace Tizen.NUI
             {
                 int currentIdx = parentChildren.IndexOf(this);
 
-                if (currentIdx > 0)
+                if (currentIdx > 0 && currentIdx < parentChildren.Count)
                 {
                     LowerBelow(parentChildren[currentIdx - 1]);
 
@@ -288,20 +295,66 @@ namespace Tizen.NUI
                     parentChildren[currentIdx - 1] = this;
                     parentChildren[currentIdx] = temp;
 
+                    NDalicPINVOKE.Layer_Lower(swigCPtr);
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
                 }
             }
         }
 
         internal void RaiseAbove(Layer target)
         {
-            NDalicPINVOKE.Layer_RaiseAbove(swigCPtr, Layer.getCPtr(target));
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            var parentChildren = Window.Instance.LayersChildren;
+            if (parentChildren != null)
+            {
+                int currentIndex = parentChildren.IndexOf(this);
+                int targetIndex = parentChildren.IndexOf(target);
+
+                if(currentIndex < 0 || targetIndex < 0 ||
+                    currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
+                {
+                    NUILog.Error("index should be bigger than 0 and less than children of layer count");
+                    return;
+                }
+
+                // If the currentIndex is less than the target index and the target has the same parent.
+                if (currentIndex < targetIndex)
+                {
+                    parentChildren.Remove(this);
+                    parentChildren.Insert(targetIndex, this);
+
+                    NDalicPINVOKE.Layer_RaiseAbove(swigCPtr, Layer.getCPtr(target));
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                }
+            }
         }
 
         internal void LowerBelow(Layer target)
         {
-            NDalicPINVOKE.Layer_LowerBelow(swigCPtr, Layer.getCPtr(target));
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            var parentChildren = Window.Instance.LayersChildren;
+
+            if (parentChildren != null)
+            {
+                int currentIndex = parentChildren.IndexOf(this);
+                int targetIndex = parentChildren.IndexOf(target);
+
+                if(currentIndex < 0 || targetIndex < 0 ||
+                    currentIndex >= parentChildren.Count || targetIndex >= parentChildren.Count)
+                {
+                    NUILog.Error("index should be bigger than 0 and less than children of layer count");
+                    return;
+                }
+
+                // If the currentIndex is not already the 0th index and the target has the same parent.
+                if ((currentIndex != 0) && (targetIndex != -1) &&
+                    (currentIndex > targetIndex))
+                {
+                    parentChildren.Remove(this);
+                    parentChildren.Insert(targetIndex, this);
+
+                    NDalicPINVOKE.Layer_LowerBelow(swigCPtr, Layer.getCPtr(target));
+                    if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+                }
+            }
         }
 
         /// <summary>
@@ -316,9 +369,10 @@ namespace Tizen.NUI
             {
                 parentChildren.Remove(this);
                 parentChildren.Add(this);
+
+                NDalicPINVOKE.Layer_RaiseToTop(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
-            NDalicPINVOKE.Layer_RaiseToTop(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
         /// <summary>
@@ -333,10 +387,11 @@ namespace Tizen.NUI
             {
                 parentChildren.Remove(this);
                 parentChildren.Insert(0, this);
+
+                NDalicPINVOKE.Layer_LowerToBottom(swigCPtr);
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             }
 
-            NDalicPINVOKE.Layer_LowerToBottom(swigCPtr);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
         /// <summary>
index 000cc7a..97bba6c 100755 (executable)
@@ -168,17 +168,7 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         protected override void OnCreate()
         {
-            // This is also required to create DisposeQueue on main thread.
-            DisposeQueue disposeQ = DisposeQueue.Instance;
-            disposeQ.Initialize();
             base.OnCreate();
-
-            // Dali's default layer is default center origin. need to change as top left.
-            // NUI's Layer is like a transparent film which covers entire window. (Layer is not an actor of Dali)
-            // otherwise, this makes ScreenPosition as wrong value.
-            Layer defaultLayer = Window.Instance.GetDefaultLayer();
-            defaultLayer.SetParentOrigin(Tizen.NUI.ParentOrigin.TopLeft);
-            defaultLayer.SetAnchorPoint(Tizen.NUI.PivotPoint.TopLeft);
         }
 
         /// <summary>
index 90375d7..88920dc 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (c) 2017 Samsung Electronics Co., Ltd.
+// Copyright (c) 2018 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -1256,6 +1256,14 @@ namespace Tizen.NUI
         /// <since_tizen> 4 </since_tizen>
         public static readonly int FrameDelay = NDalic.IMAGE_VISUAL_FRAME_DELAY;
         /// <summary>
+        /// The number of times the AnimatedImageVisual will be looped
+        /// Default -1. if < 0, loop unlimited. else, loop loopCount times.
+        /// </summary>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static readonly int LoopCount = NDalic.IMAGE_VISUAL_LOOP_COUNT;
+        /// <summary>
         /// The policy to determine when an image should no longer be cached
         /// </summary>
         /// <since_tizen> 5 </since_tizen>
@@ -2410,7 +2418,6 @@ namespace Tizen.NUI
     /// An enum of text direction.
     /// </summary>
     /// <since_tizen> 5 </since_tizen>
-    [EditorBrowsable(EditorBrowsableState.Never)]
     public enum TextDirection
     {
         /// <summary>
@@ -2427,6 +2434,31 @@ namespace Tizen.NUI
     }
 
     /// <summary>
+    /// An enum of vertical line alignment.
+    /// </summary>
+    /// <since_tizen> 5 </since_tizen>
+    public enum VerticalLineAlignment
+    {    
+        /// <summary>
+        /// vertical line alignment is from top. 
+        /// </summary>
+        /// <since_tizen> 5 </since_tizen>
+        Top,
+
+        /// <summary>
+        /// vertical line alignment is from center.
+        /// </summary>
+        /// <since_tizen> 5 </since_tizen>
+        Center,
+
+        /// <summary>
+        /// vertical line alignment is from bottom.
+        /// </summary>
+        /// <since_tizen> 5 </since_tizen>
+        Bottom
+    }
+
+    /// <summary>
     /// Enumeration type for the font's slant.
     /// </summary>
     /// <since_tizen> 5 </since_tizen>
index ce61032..70c52fd 100755 (executable)
  * limitations under the License.
  *
  */
-
-using System;
-using System.ComponentModel;
 using Tizen.Applications;
 using Tizen.Applications.CoreBackend;
-using Tizen.NUI;
+using System.Collections.Generic;
 
 namespace Tizen.NUI
 {
@@ -28,32 +25,34 @@ namespace Tizen.NUI
     /// Represents an application that have UI screen. The NUIWidgetApplication class has a default stage.
     /// </summary>
     /// <since_tizen> 4 </since_tizen>
-    [Obsolete("Please do not use! This will be deprecated!")]
-    [EditorBrowsable(EditorBrowsableState.Never)]
     public class NUIWidgetApplication : CoreApplication
     {
-
         /// <summary>
         /// The default constructor.
         /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        public NUIWidgetApplication() : base(new NUIWidgetCoreBackend())
+        /// <remarks>Widget ID will be replaced as the application ID.</remarks>
+        /// <param name="widgetType">Derived widget class type.</param>
+        public NUIWidgetApplication( System.Type widgetType ) : base(new NUIWidgetCoreBackend())
         {
-            Tizen.Log.Fatal("NUI", "### NUIWidgetApplication called");
+            NUIWidgetCoreBackend core = Backend as NUIWidgetCoreBackend;
+            core?.RegisterWidgetInfo(new Dictionary<System.Type, string> { { widgetType, ApplicationInfo.ApplicationId } });
         }
 
         /// <summary>
-        /// The constructor with stylesheet.
+        /// The default constructor with stylesheet.
         /// </summary>
+        /// <remarks>Widget ID will be replaced as the application ID.</remarks>
+        /// <param name="widgetType">Derived widget class type.</param>
         /// <param name="styleSheet">The styleSheet url.</param>
         /// <since_tizen> 4 </since_tizen>
-        public NUIWidgetApplication(string styleSheet) : base(new NUIWidgetCoreBackend(styleSheet))
+        public NUIWidgetApplication(System.Type widgetType, string styleSheet) : base(new NUIWidgetCoreBackend(styleSheet))
         {
-            Tizen.Log.Fatal("NUI", "### NUIWidgetApplication(string) called");
+            NUIWidgetCoreBackend core = Backend as NUIWidgetCoreBackend;
+            core?.RegisterWidgetInfo(new Dictionary<System.Type, string> { { widgetType, ApplicationInfo.ApplicationId } });
         }
 
         /// <summary>
-        /// Overrides this method if want to handle behavior.
+        /// Overrides this method if want to handle OnLocaleChanged behavior.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
         protected override void OnLocaleChanged(LocaleChangedEventArgs e)
@@ -63,7 +62,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Overrides this method if want to handle behavior.
+        /// Overrides this method if want to handle OnLowBattery behavior.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
         protected override void OnLowBattery(LowBatteryEventArgs e)
@@ -73,7 +72,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Overrides this method if want to handle behavior.
+        /// Overrides this method if want to handle OnLowMemory behavior.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
         protected override void OnLowMemory(LowMemoryEventArgs e)
@@ -83,7 +82,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Overrides this method if want to handle behavior.
+        /// Overrides this method if want to handle OnRegionFormatChanged behavior.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
         protected override void OnRegionFormatChanged(RegionFormatChangedEventArgs e)
@@ -93,7 +92,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Overrides this method if want to handle behavior.
+        /// Overrides this method if want to handle OnTerminate behavior.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
         protected override void OnTerminate()
@@ -103,7 +102,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Overrides this method if want to handle behavior.
+        /// Overrides this method if want to handle OnPreCreate behavior.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
         protected virtual void OnPreCreate()
@@ -112,7 +111,7 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Overrides this method if want to handle behavior.
+        /// Overrides this method if want to handle OnCreate behavior.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
         protected override void OnCreate()
diff --git a/src/Tizen.NUI/src/public/PixelBuffer.cs b/src/Tizen.NUI/src/public/PixelBuffer.cs
new file mode 100755 (executable)
index 0000000..5c922f1
--- /dev/null
@@ -0,0 +1,311 @@
+/** Copyright (c) 2017 Samsung Electronics Co., Ltd.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*/
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+
+    /// <summary>
+    /// The PixelBuffer object holds a pixel buffer.
+    /// The PixelBuffer keeps ownership of it's initial buffer however, the
+    /// user is free to modify the pixel data, either directly, or via image operations.
+    ///
+    /// In order to upload the pixel data to texture memory, there are two
+    /// possibilities - either convert it back to a PixelData object, which
+    /// releases the PixelBuffer object, leaving the user with an empty handle
+    /// (ideal for one-time indirect image manipulation), or create a new
+    /// PixelData object from this object, leaving the buffer intact (ideal
+    /// for continuous manipulation)
+    /// </summary>
+    /// <since_tizen> 5 </since_tizen>
+    /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class PixelBuffer : BaseHandle
+    {
+        private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+
+        internal PixelBuffer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PixelBuffer_SWIGUpcast(cPtr), cMemoryOwn)
+        {
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+        }
+
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PixelBuffer obj)
+        {
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+        }
+
+        /// <summary>
+        /// Dispose.
+        /// </summary>
+        /// <since_tizen> 5 </since_tizen>
+        protected override void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+                //Called by User
+                //Release your own managed resources here.
+                //You should release all of your own disposable objects here.
+
+            }
+
+            //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.
+            if (swigCPtr.Handle != global::System.IntPtr.Zero)
+            {
+                if (swigCMemOwn)
+                {
+                    swigCMemOwn = false;
+                    NDalicPINVOKE.delete_PixelBuffer(swigCPtr);
+                }
+                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+            }
+
+            base.Dispose(type);
+        }
+
+        /// <summary>
+        /// Create a PixelBuffer with it's own data buffer.
+        /// </summary>
+        /// <param name="width">The pixel buffer width</param>
+        /// <param name="height">The pixel buffer height</param>
+        /// <param name="pixelFormat">The pixel format</param>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public PixelBuffer(uint width, uint height, PixelFormat pixelFormat) : this(NDalicPINVOKE.PixelBuffer_New(width, height, (int)pixelFormat), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        internal PixelBuffer(PixelBuffer handle) : this(NDalicPINVOKE.new_PixelBuffer__SWIG_1(PixelBuffer.getCPtr(handle)), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        internal PixelBuffer Assign(PixelBuffer rhs)
+        {
+            PixelBuffer ret = new PixelBuffer(NDalicPINVOKE.PixelBuffer_Assign(swigCPtr, PixelBuffer.getCPtr(rhs)), false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Convert to a pixel data and release the pixelBuffer's object.
+        /// This handle is left empty.
+        /// Any other handles that keep a reference to this object
+        /// will be left with no buffer, trying to access it will return NULL.
+        /// </summary>
+        /// <param name="pixelBuffer">A pixel buffer</param>
+        /// <returns>A new PixelData which takes ownership of the PixelBuffer's buffer.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static PixelData Convert(PixelBuffer pixelBuffer)
+        {
+            PixelData ret = new PixelData(NDalicPINVOKE.PixelBuffer_Convert(PixelBuffer.getCPtr(pixelBuffer)), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Copy the data from this object into a new PixelData object, which could be
+        /// used for uploading to a texture.
+        /// </summary>
+        /// <returns>The pixel data.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public PixelData CreatePixelData()
+        {
+            PixelData ret = new PixelData(NDalicPINVOKE.PixelBuffer_CreatePixelData(swigCPtr), true);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        internal SWIGTYPE_p_unsigned_char GetBuffer()
+        {
+            global::System.IntPtr cPtr = NDalicPINVOKE.PixelBuffer_GetBuffer(swigCPtr);
+            SWIGTYPE_p_unsigned_char ret = (cPtr == global::System.IntPtr.Zero) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Gets the width of the buffer in pixels.
+        /// </summary>
+        /// <returns>The width of the buffer in pixels.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public uint GetWidth()
+        {
+            uint ret = NDalicPINVOKE.PixelBuffer_GetWidth(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Gets the height of the buffer in pixels.
+        /// </summary>
+        /// <returns>The height of the buffer in pixels.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public uint GetHeight()
+        {
+            uint ret = NDalicPINVOKE.PixelBuffer_GetHeight(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Gets the pixel format.
+        /// </summary>
+        /// <returns>The pixel format.</returns>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public PixelFormat GetPixelFormat()
+        {
+            PixelFormat ret = (PixelFormat)NDalicPINVOKE.PixelBuffer_GetPixelFormat(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        /// <summary>
+        /// Apply the mask to this pixel data, and return a new pixel data containing
+        /// the masked image. If this PixelBuffer doesn't have an alpha channel, then
+        /// the resultant PixelBuffer will be converted to a format that supports at
+        /// least the width of the color channels and the alpha channel from the mask.
+        ///
+        /// If cropToMask is set to true, then the contentScale is applied first to
+        /// this buffer, and the target buffer is cropped to the size of the mask. If
+        /// it's set to false, then the mask is scaled to match this buffer's size
+        /// before the mask is applied.
+        /// </summary>
+        /// <param name="mask">The mask to apply.</param>
+        /// <param name="contentScale">The scaling factor to apply to the content.</param>
+        /// <param name="cropToMask">Whether to crop the output to the mask size (true) or scale the mask to the content size (false).</param>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void ApplyMask(PixelBuffer mask, float contentScale, bool cropToMask)
+        {
+            NDalicPINVOKE.PixelBuffer_ApplyMask__SWIG_0(swigCPtr, PixelBuffer.getCPtr(mask), contentScale, cropToMask);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Apply the mask to this pixel data, and return a new pixel data containing
+        /// the masked image. If this PixelBuffer doesn't have an alpha channel, then
+        /// the resultant PixelBuffer will be converted to a format that supports at
+        /// least the width of the color channels and the alpha channel from the mask.
+        ///
+        /// If cropToMask is set to true, then the contentScale is applied first to
+        /// this buffer, and the target buffer is cropped to the size of the mask. If
+        /// it's set to false, then the mask is scaled to match this buffer's size
+        /// before the mask is applied.
+        /// </summary>
+        /// <param name="mask">The mask to apply.</param>
+        /// <param name="contentScale">The scaling factor to apply to the content.</param>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void ApplyMask(PixelBuffer mask, float contentScale)
+        {
+            NDalicPINVOKE.PixelBuffer_ApplyMask__SWIG_1(swigCPtr, PixelBuffer.getCPtr(mask), contentScale);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Apply the mask to this pixel data, and return a new pixel data containing
+        /// the masked image. If this PixelBuffer doesn't have an alpha channel, then
+        /// the resultant PixelBuffer will be converted to a format that supports at
+        /// least the width of the color channels and the alpha channel from the mask.
+        ///
+        /// If cropToMask is set to true, then the contentScale is applied first to
+        /// this buffer, and the target buffer is cropped to the size of the mask. If
+        /// it's set to false, then the mask is scaled to match this buffer's size
+        /// before the mask is applied.
+        /// </summary>
+        /// <param name="mask">The mask to apply.</param>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void ApplyMask(PixelBuffer mask)
+        {
+            NDalicPINVOKE.PixelBuffer_ApplyMask__SWIG_2(swigCPtr, PixelBuffer.getCPtr(mask));
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Apply a Gaussian blur to this pixel data with the given radius.
+        /// A bigger radius will yield a blurrier image. Only works for pixel data in RGBA format.
+        /// </summary>
+        /// <param name="blurRadius">The radius for Gaussian blur. A value of 0 or negative value indicates no blur.</param>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void ApplyGaussianBlur(float blurRadius)
+        {
+            NDalicPINVOKE.PixelBuffer_ApplyGaussianBlur(swigCPtr, blurRadius);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Crops this buffer to the given crop rectangle.
+        /// </summary>
+        /// <param name="x">The top left corner's X.</param>
+        /// <param name="y">The top left corner's Y.</param>
+        /// <param name="width">The crop width.</param>
+        /// <param name="height">The crop height.</param>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void Crop(ushort x, ushort y, ushort width, ushort height)
+        {
+            NDalicPINVOKE.PixelBuffer_Crop(swigCPtr, x, y, width, height);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        /// <summary>
+        /// Resizes the buffer to the given dimensions.
+        /// </summary>
+        /// <param name="width">The new width.</param>
+        /// <param name="height">The new height.</param>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void Resize(ushort width, ushort height)
+        {
+            NDalicPINVOKE.PixelBuffer_Resize(swigCPtr, width, height);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        internal PixelBuffer(SWIGTYPE_p_unsigned_char pointer) : this(NDalicPINVOKE.new_PixelBuffer__SWIG_2(SWIGTYPE_p_unsigned_char.getCPtr(pointer)), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+    }
+
+}
index 33c58b5..9754a3c 100755 (executable)
@@ -14,8 +14,6 @@
  * limitations under the License.
  *
  */
-
-using System;
 using System.ComponentModel;
 
 namespace Tizen.NUI
@@ -31,8 +29,8 @@ namespace Tizen.NUI
     /// And this would make some problem, because dotnet runtime would change the address of memory allocated.
     /// So this is required to be removed.
     /// currently no use. will be added later
-    /// <since_tizen> 3 </since_tizen>
-    [Obsolete("Please do not use! This will be deprecated!")]
+    /// <since_tizen> 5 </since_tizen>
+    /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
     [EditorBrowsable(EditorBrowsableState.Never)]
     public class PixelData : BaseHandle
     {
@@ -51,7 +49,7 @@ namespace Tizen.NUI
         /// <summary>
         /// Dispose.
         /// </summary>
-        /// <since_tizen> 3 </since_tizen>
+        /// <since_tizen> 5 </since_tizen>
         protected override void Dispose(DisposeTypes type)
         {
             if (disposed)
@@ -94,7 +92,9 @@ namespace Tizen.NUI
         /// <param name="height">Buffer height in pixels.</param>
         /// <param name="pixelFormat">The pixel format.</param>
         /// <param name="releaseFunction">The function used to release the memory.</param>
-        /// <since_tizen> 3 </since_tizen>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public PixelData(byte[] buffer, uint bufferSize, uint width, uint height, PixelFormat pixelFormat, PixelData.ReleaseFunction releaseFunction) : this(NDalicPINVOKE.PixelData_New(buffer, bufferSize, width, height, (int)pixelFormat, (int)releaseFunction), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -105,7 +105,9 @@ namespace Tizen.NUI
         /// Gets the width of the buffer in pixels.
         /// </summary>
         /// <returns>The width of the buffer in pixels.</returns>
-        /// <since_tizen> 3 </since_tizen>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public uint GetWidth()
         {
             uint ret = NDalicPINVOKE.PixelData_GetWidth(swigCPtr);
@@ -117,7 +119,9 @@ namespace Tizen.NUI
         /// Gets the height of the buffer in pixels.
         /// </summary>
         /// <returns>The height of the buffer in pixels.</returns>
-        /// <since_tizen> 3 </since_tizen>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public uint GetHeight()
         {
             uint ret = NDalicPINVOKE.PixelData_GetHeight(swigCPtr);
@@ -129,7 +133,9 @@ namespace Tizen.NUI
         /// Gets the pixel format.
         /// </summary>
         /// <returns>The pixel format.</returns>
-        /// <since_tizen> 3 </since_tizen>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public PixelFormat GetPixelFormat()
         {
             PixelFormat ret = (PixelFormat)NDalicPINVOKE.PixelData_GetPixelFormat(swigCPtr);
@@ -140,20 +146,20 @@ namespace Tizen.NUI
         /// <summary>
         /// Enumeration for Function to release the pixel buffer.
         /// </summary>
-        /// <since_tizen> 3 </since_tizen>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public enum ReleaseFunction
         {
             /// <summary>
             /// Use free function to release the pixel buffer.
             /// </summary>
-            FREE,
+            Free,
 
             /// <summary>
             /// Use delete[] operator to release the pixel buffer.
             /// </summary>
-            DELETE_ARRAY
+            DeleteArray
         }
-
     }
-
 }
\ No newline at end of file
index ae904d7..98cd07c 100755 (executable)
@@ -1302,7 +1302,7 @@ namespace Tizen.NUI
             {
                 throw new global::System.InvalidOperationException("Unimplemented type for Property Value :" + type.Name);
             }
-            NUILog.Debug(" got an property value of =" + type.Name);
+            //NUILog.Debug(" got an property value of =" + type.Name);
             return value;
         }
 
index 2556d75..e345ddd 100755 (executable)
@@ -15,6 +15,8 @@
  *
  */
 
+using System.Runtime.InteropServices;
+
 namespace Tizen.NUI
 {
     /// <summary>
@@ -229,8 +231,12 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public Geometry GetGeometry()
         {
+            //to fix memory leak issue, match the handle count with native side.
             System.IntPtr cPtr = NDalicPINVOKE.Renderer_GetGeometry(swigCPtr);
-            Geometry ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Geometry;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            Geometry ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Geometry;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -266,8 +272,12 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public TextureSet GetTextures()
         {
+            //to fix memory leak issue, match the handle count with native side.
             System.IntPtr cPtr = NDalicPINVOKE.Renderer_GetTextures(swigCPtr);
-            TextureSet ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as TextureSet;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            TextureSet ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as TextureSet;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -291,8 +301,12 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public Shader GetShader()
         {
+            //to fix memory leak issue, match the handle count with native side.
             System.IntPtr cPtr = NDalicPINVOKE.Renderer_GetShader(swigCPtr);
-            Shader ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Shader;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            Shader ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Shader;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
index 8dc30d3..4e57e16 100644 (file)
@@ -59,51 +59,6 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Dispose.
-        /// </summary>
-        /// Please DO NOT use! This will be deprecated!
-        /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required.
-        /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed.
-        /// <since_tizen> 3 </since_tizen>
-        [Obsolete("Please do not use! This will be deprecated!")]
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        protected override void Dispose(DisposeTypes type)
-        {
-            if (disposed)
-            {
-                return;
-            }
-
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-            }
-
-            //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.
-
-            if (_styleManagerStyleChangedCallbackDelegate != null)
-            {
-                StyleChangedSignal().Disconnect(_styleManagerStyleChangedCallbackDelegate);
-            }
-
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)
-            {
-                if (swigCMemOwn)
-                {
-                    swigCMemOwn = false;
-                    NDalicPINVOKE.delete_StyleManager(swigCPtr);
-                }
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-            }
-
-            base.Dispose(type);
-        }
-
-        /// <summary>
         /// Style changed event arguments.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
index 30e2ff5..52bfbea 100644 (file)
@@ -53,52 +53,6 @@ namespace Tizen.NUI
             }
         }
 
-        /// <summary>
-        /// Dispose.
-        /// </summary>
-        /// <param name="type">The dispose type</param>
-        /// <since_tizen> 3 </since_tizen>
-        /// Please DO NOT use! This will be deprecated!
-        /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required.
-        /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed.
-        [Obsolete("Please do not use! This will be deprecated!")]
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        protected override void Dispose(DisposeTypes type)
-        {
-            if (disposed)
-            {
-                return;
-            }
-
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-            }
-
-            //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.
-
-            if (_stateChangedEventCallback != null)
-            {
-                StateChangedSignal().Disconnect(_stateChangedEventCallback);
-            }
-
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)
-            {
-                if (swigCMemOwn)
-                {
-                    swigCMemOwn = false;
-                    NDalicManualPINVOKE.delete_TtsPlayer(swigCPtr);
-                }
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-            }
-
-            base.Dispose(type);
-        }
-
         internal TTSPlayer() : this(NDalicManualPINVOKE.new_TtsPlayer__SWIG_0(), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
index 6951097..949dece 100755 (executable)
@@ -15,6 +15,8 @@
  *
  */
 
+using System.Runtime.InteropServices;
+
 namespace Tizen.NUI
 {
     /// <summary>
@@ -102,8 +104,12 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public Texture GetTexture(uint index)
         {
+            //to fix memory leak issue, match the handle count with native side.
             System.IntPtr cPtr = NDalicPINVOKE.TextureSet_GetTexture(swigCPtr, index);
-            Texture ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Texture;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            Texture ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Texture;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -129,8 +135,12 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public Sampler GetSampler(uint index)
         {
+            //to fix memory leak issue, match the handle count with native side.
             System.IntPtr cPtr = NDalicPINVOKE.TextureSet_GetSampler(swigCPtr, index);
-            Sampler ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Sampler;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            Sampler ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Sampler;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
index f733e25..52cb554 100755 (executable)
@@ -41,6 +41,16 @@ namespace Tizen.NUI
         internal Timer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Timer_SWIGUpcast(cPtr), cMemoryOwn)
         {
             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+
+            _timerTickCallbackDelegate = OnTick;
+            _timerTickCallbackOfNative = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(_timerTickCallbackDelegate);
+
+            NUILog.Debug($"(0x{swigCPtr.Handle:X})Timer() contructor!");
+        }
+
+        ~Timer()
+        {
+            NUILog.Debug($"(0x{swigCPtr.Handle:X})Timer() distructor!, disposed={disposed}");
         }
 
         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Timer obj)
@@ -54,6 +64,13 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         protected override void Dispose(DisposeTypes type)
         {
+            NUILog.Debug($"(0x{swigCPtr.Handle:X}) Timer.Dispose(type={type}, disposed={disposed})");
+
+            if (this != null && _timerTickCallbackDelegate != null)
+            {
+                TickSignal().Disconnect(_timerTickCallbackOfNative);
+            }
+
             if (disposed)
             {
                 return;
@@ -70,11 +87,6 @@ namespace Tizen.NUI
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            if (_timerTickCallbackDelegate != null)
-            {
-                TickSignal().Disconnect(_timerTickCallbackDelegate);
-            }
-
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
                 if (swigCMemOwn)
@@ -99,10 +111,12 @@ namespace Tizen.NUI
         }
 
         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        private delegate bool TickCallbackDelegate(IntPtr data);
+        private delegate bool TickCallbackDelegate();
         private EventHandlerWithReturnType<object, TickEventArgs, bool> _timerTickEventHandler;
         private TickCallbackDelegate _timerTickCallbackDelegate;
 
+        private System.IntPtr _timerTickCallbackOfNative;
+
         /// <summary>
         /// @brief Event for the ticked signal, which can be used to subscribe or unsubscribe the event handler
         /// provided by the user. The ticked signal is emitted after specified time interval.<br />
@@ -112,10 +126,9 @@ namespace Tizen.NUI
         {
             add
             {
-                if (_timerTickEventHandler == null)
+                if (_timerTickEventHandler == null && disposed == false)
                 {
-                    _timerTickCallbackDelegate = new TickCallbackDelegate(OnTick);
-                    TickSignal().Connect(_timerTickCallbackDelegate);
+                    TickSignal().Connect(_timerTickCallbackOfNative);
                 }
                 _timerTickEventHandler += value;
             }
@@ -124,18 +137,19 @@ namespace Tizen.NUI
                 _timerTickEventHandler -= value;
                 if (_timerTickEventHandler == null && TickSignal().Empty() == false)
                 {
-                    TickSignal().Disconnect(_timerTickCallbackDelegate);
+                    TickSignal().Disconnect(_timerTickCallbackOfNative);
                 }
             }
         }
 
-        private bool OnTick(IntPtr data)
+        private bool OnTick()
         {
             TickEventArgs e = new TickEventArgs();
 
             if (played == false)
             {
-                Tizen.Log.Fatal("NUI", $"({swigCPtr.Handle}) OnTick() is called even played is false!");
+                Tizen.Log.Fatal("NUI", $"(0x{swigCPtr.Handle:X}) OnTick() is called even played is false!");
+                //throw new System.InvalidOperationException($"OnTick() excpetion!");
             }
 
             if (_timerTickEventHandler != null && played == true)
@@ -156,7 +170,7 @@ namespace Tizen.NUI
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
 
-            Tizen.Log.Error("NUI", $"({swigCPtr.Handle}) Timer({milliSec}) Constructor!");
+            NUILog.Debug($"(0x{swigCPtr.Handle:X})  Timer({milliSec}) Constructor!");
         }
         internal Timer(Timer timer) : this(NDalicPINVOKE.new_Timer__SWIG_1(Timer.getCPtr(timer)), true)
         {
@@ -191,6 +205,9 @@ namespace Tizen.NUI
         /// <summary>
         /// Gets/Sets the interval of the timer.
         /// </summary>
+        /// <remarks>For setter, this sets a new interval on the timer and starts the timer. <br />
+        /// Cancels the previous timer.
+        /// </remarks>
         /// <since_tizen> 4 </since_tizen>
         public uint Interval
         {
@@ -211,20 +228,18 @@ namespace Tizen.NUI
         /// <param name="milliSec">MilliSec interval in milliseconds.</param>
         internal void SetInterval(uint milliSec)
         {
+            NUILog.Debug($"(0x{swigCPtr.Handle:X})SetInterval({milliSec})");
 
-            Tizen.Log.Error("NUI", $"({swigCPtr.Handle}) SetInterval({milliSec})");
+            played = true;
 
             NDalicPINVOKE.Timer_SetInterval(swigCPtr, milliSec);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
-            played = true;
         }
 
         internal uint GetInterval()
         {
             uint ret = NDalicPINVOKE.Timer_GetInterval(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            Tizen.Log.Error("NUI", $"({swigCPtr.Handle})GetInterval({ret})");
             return ret;
         }
 
index 2fe9de8..635c679 100755 (executable)
@@ -17,6 +17,7 @@
 
 namespace Tizen.NUI
 {
+    using System.Runtime.InteropServices;
     using Tizen.NUI.BaseComponents;
     /// <summary>
     /// Touch events are a collection of points at a specific moment in time.<br />
@@ -164,8 +165,12 @@ namespace Tizen.NUI
         /// <since_tizen> 3 </since_tizen>
         public View GetHitView(uint point)
         {
+            //to fix memory leak issue, match the handle count with native side.
             global::System.IntPtr cPtr = NDalicPINVOKE.Touch_GetHitActor(swigCPtr, point);
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
index 636eddb..5e668f3 100755 (executable)
@@ -72,8 +72,10 @@ 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.
-
-            DisConnectFromSignals();
+            if (this != null)
+            {
+                DisConnectFromSignals();
+            }
 
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
@@ -755,8 +757,8 @@ namespace Tizen.NUI.UIComponents
                 Tizen.NUI.PropertyMap map = new Tizen.NUI.PropertyMap();
                 GetProperty( Button.Property.LABEL).Get(map);
                 Tizen.NUI.PropertyValue value = map.Find( TextVisualProperty.Text, "Text");
-                string str;
-                value.Get(out str);
+                string str = "";
+                value?.Get(out str);
                 return str;
             }
             set
@@ -791,4 +793,4 @@ namespace Tizen.NUI.UIComponents
 
     }
 
-}
\ No newline at end of file
+}
index 3da49bf..1a557ee 100755 (executable)
@@ -62,15 +62,17 @@ 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.
-
-            if (_popUpHiddenEventCallbackDelegate != null)
+            if (this != null)
             {
-                HiddenSignal().Disconnect(_popUpHiddenEventCallbackDelegate);
-            }
+                if (_popUpHiddenEventCallbackDelegate != null)
+                {
+                    HiddenSignal().Disconnect(_popUpHiddenEventCallbackDelegate);
+                }
 
-            if (_popUpHidingEventCallbackDelegate != null)
-            {
-                HidingSignal().Disconnect(_popUpHidingEventCallbackDelegate);
+                if (_popUpHidingEventCallbackDelegate != null)
+                {
+                    HidingSignal().Disconnect(_popUpHidingEventCallbackDelegate);
+                }
             }
 
             if (_popUpShownEventCallbackDelegate != null)
@@ -403,8 +405,12 @@ namespace Tizen.NUI.UIComponents
 
         internal View GetTitle()
         {
+            //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = NDalicPINVOKE.Popup_GetTitle(swigCPtr);
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -423,8 +429,12 @@ namespace Tizen.NUI.UIComponents
 
         internal View GetContent()
         {
+            //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = NDalicPINVOKE.Popup_GetContent(swigCPtr);
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
@@ -443,8 +453,12 @@ namespace Tizen.NUI.UIComponents
 
         internal View GetFooter()
         {
+            //to fix memory leak issue, match the handle count with native side.
             IntPtr cPtr = NDalicPINVOKE.Popup_GetFooter(swigCPtr);
-            View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+            HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+            View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
+            NDalicPINVOKE.delete_BaseHandle(CPtr);
+            CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
 
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
index 3d88973..4a280b3 100755 (executable)
@@ -63,7 +63,7 @@ namespace Tizen.NUI.UIComponents
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            if (_progressBarValueChangedCallbackDelegate != null)
+            if (this != null && _progressBarValueChangedCallbackDelegate != null)
             {
                 ValueChangedSignal().Disconnect(_progressBarValueChangedCallbackDelegate);
             }
index e2d752d..44c39de 100755 (executable)
@@ -61,15 +61,17 @@ 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.
-
-            if (_scrollBarScrollPositionIntervalReachedEventCallbackDelegate != null)
+            if (this != null)
             {
-                ScrollPositionIntervalReachedSignal().Disconnect(_scrollBarScrollPositionIntervalReachedEventCallbackDelegate);
-            }
+                if (_scrollBarScrollPositionIntervalReachedEventCallbackDelegate != null)
+                {
+                    ScrollPositionIntervalReachedSignal().Disconnect(_scrollBarScrollPositionIntervalReachedEventCallbackDelegate);
+                }
 
-            if (_scrollBarPanFinishedEventCallbackDelegate != null)
-            {
-                PanFinishedSignal().Disconnect(_scrollBarPanFinishedEventCallbackDelegate);
+                if (_scrollBarPanFinishedEventCallbackDelegate != null)
+                {
+                    PanFinishedSignal().Disconnect(_scrollBarPanFinishedEventCallbackDelegate);
+                }
             }
 
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
index cf4159b..3041525 100755 (executable)
@@ -64,7 +64,7 @@ namespace Tizen.NUI
             //You should not access any managed member here except static instance.
             //because the execution order of Finalizes is non-deterministic.
 
-            if (_scrollViewSnapStartedCallbackDelegate != null)
+            if (this != null && _scrollViewSnapStartedCallbackDelegate != null)
             {
                 this.SnapStartedSignal().Disconnect(_scrollViewSnapStartedCallbackDelegate);
             }
index 5e7e51a..322cb4a 100755 (executable)
@@ -62,20 +62,22 @@ 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.
-
-            if (_sliderValueChangedCallbackDelegate != null)
+            if (this != null)
             {
-                ValueChangedSignal().Disconnect(_sliderValueChangedCallbackDelegate);
-            }
+                if (_sliderValueChangedCallbackDelegate != null)
+                {
+                    ValueChangedSignal().Disconnect(_sliderValueChangedCallbackDelegate);
+                }
 
-            if (_sliderSlidingFinishedCallbackDelegate != null)
-            {
-                SlidingFinishedSignal().Disconnect(_sliderSlidingFinishedCallbackDelegate);
-            }
+                if (_sliderSlidingFinishedCallbackDelegate != null)
+                {
+                    SlidingFinishedSignal().Disconnect(_sliderSlidingFinishedCallbackDelegate);
+                }
 
-            if (_sliderMarkReachedCallbackDelegate != null)
-            {
-                MarkReachedSignal().Disconnect(_sliderMarkReachedCallbackDelegate);
+                if (_sliderMarkReachedCallbackDelegate != null)
+                {
+                    MarkReachedSignal().Disconnect(_sliderMarkReachedCallbackDelegate);
+                }
             }
 
             if (swigCPtr.Handle != global::System.IntPtr.Zero)
index e965dd6..0c1e066 100755 (executable)
@@ -40,47 +40,6 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Dispose.
-        /// </summary>
-        /// <param name="type">The dispose type</param>
-        /// <since_tizen> 3 </since_tizen>
-        /// Please DO NOT use! This will be deprecated!
-        /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required.
-        /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed.
-        [Obsolete("Please do not use! This will be deprecated!")]
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        protected override void Dispose(DisposeTypes type)
-        {
-            if (disposed)
-            {
-                return;
-            }
-
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-            }
-
-            //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.
-
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)
-            {
-                if (swigCMemOwn)
-                {
-                    swigCMemOwn = false;
-                    NDalicPINVOKE.delete_VisualFactory(swigCPtr);
-                }
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-            }
-
-            base.Dispose(type);
-        }
-
-        /// <summary>
         /// Please do not use! this will be deprecated, please use VisualFactory.Instance instead.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
index 4dc5420..2acf366 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2018 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -2311,6 +2311,7 @@ namespace Tizen.NUI
         private int? _batchSize = null;
         private int? _cacheSize = null;
         private float? _frameDelay = null;
+        private float? _loopCount = null;
 
         /// <summary>
         /// Gets and Sets the url in the AnimatedImageVisual.
@@ -2413,6 +2414,26 @@ namespace Tizen.NUI
         }
 
         /// <summary>
+        /// Gets and Sets the number of times the AnimatedImageVisual will be looped.
+        /// Default -1. if < 0, loop unlimited. else, loop loopCount times.
+        /// </summary>
+        /// <since_tizen> 5 </since_tizen>
+        /// This will be released at Tizen.NET API Level 5, so currently this would be used as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public float LoopCount
+        {
+            get
+            {
+                return _loopCount ?? -1;
+            }
+            set
+            {
+                _loopCount = value;
+                UpdateVisual();
+            }
+        }
+
+        /// <summary>
         /// Compose the out visual map.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
@@ -2438,6 +2459,7 @@ namespace Tizen.NUI
                 if (_batchSize != null ) {_outputVisualMap.Add((int)ImageVisualProperty.BatchSize, new PropertyValue((int)_batchSize)); }
                 if (_cacheSize != null ) {_outputVisualMap.Add((int)ImageVisualProperty.CacheSize, new PropertyValue((int)_cacheSize)); }
                 if (_frameDelay != null ) {_outputVisualMap.Add((int)ImageVisualProperty.FrameDelay, new PropertyValue((float)_frameDelay)); }
+                if (_loopCount != null ) {_outputVisualMap.Add((int)ImageVisualProperty.LoopCount, new PropertyValue((int)_loopCount)); }
                 if (_shader != null) { _outputVisualMap.Add((int)Visual.Property.Shader, new PropertyValue(_shader)); }
                 if (_premultipliedAlpha != null) { _outputVisualMap.Add((int)Visual.Property.PremultipliedAlpha, new PropertyValue((bool)_premultipliedAlpha)); }
                 if (_mixColor != null) { _outputVisualMap.Add((int)Visual.Property.MixColor, new PropertyValue(_mixColor)); }
index 4752cb7..cd4fc57 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
- *
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
+ *Z:\Desktop\shared\tizenfx\src\Tizen.NUI\src\public\BaseComponents\CustomView.cs
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  * limitations under the License.
  *
  */
+
 using System;
-using System.ComponentModel;
-using System.Runtime.InteropServices;
 
 namespace Tizen.NUI
 {
     /// <summary>
-    /// Widget object should be created by WidgetApplication.
+    /// Widget provides some common functionality required by all custom widget.
     /// </summary>
-    /// This is an experimental feature. We do recommend not to use it.
     /// <since_tizen> 4 </since_tizen>
-    [Obsolete("Please do not use! This will be deprecated!")]
-    [EditorBrowsable(EditorBrowsableState.Never)]
     public class Widget : BaseHandle
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
+        internal WidgetImpl widgetImpl;
 
-        internal Widget(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.Widget_SWIGUpcast(cPtr), cMemoryOwn)
+        internal Widget(WidgetImpl widgetImpl, bool swigCMemOwn) : this(NDalicManualPINVOKE.Widget_New__SWIG_1(WidgetImpl.getCPtr(widgetImpl)), swigCMemOwn)
         {
-            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
-        }
+            this.widgetImpl = widgetImpl;
+            widgetImpl.WidgetInstanceCreated += OnWidgetInstanceCreated;
+            widgetImpl.WidgetInstanceDestroyed += OnWidgetInstanceDestroyed;
+            widgetImpl.WidgetInstancePaused += OnWidgetInstancePaused;
+            widgetImpl.WidgetInstanceResumed += OnWidgetInstanceResumed;
+            widgetImpl.WidgetInstanceResized += OnWidgetInstanceResized;
+            widgetImpl.WidgetInstanceUpdated += OnWidgetInstanceUpdated;
 
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Widget obj)
-        {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
+            WidgetApplication.Instance?.AddWidgetInstance(this);
         }
 
-        /// <summary>
-        /// To make Widget instance be disposed.
-        /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        protected override void Dispose(DisposeTypes type)
+        internal Widget(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.Widget_SWIGUpcast(cPtr), cMemoryOwn)
         {
-            if(disposed)
-            {
-                return;
-            }
-
-            if(type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-            }
-
-            //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.
-            if (_createCallback != null)
-            {
-                this.CreateSignal().Disconnect(_createCallback);
-            }
-
-            if (_pauseCallback != null)
-            {
-                this.PauseSignal().Disconnect(_pauseCallback);
-            }
-
-            if (_resizeCallback != null)
-            {
-                this.ResizeSignal().Disconnect(_resizeCallback);
-            }
-
-            if (_resumeCallback != null)
-            {
-                this.ResumeSignal().Disconnect(_resumeCallback);
-            }
-
-            if (_terminateCallback != null)
-            {
-                this.TerminateSignal().Disconnect(_terminateCallback);
-            }
-
-            if (_updateCallback != null)
-            {
-                this.UpdateSignal().Disconnect(_updateCallback);
-            }
-
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)
-            {
-                if (swigCMemOwn)
-                {
-                    swigCMemOwn = false;
-                    NDalicManualPINVOKE.delete_Widget(swigCPtr);
-                }
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-            }
-
-            base.Dispose(type);
+            swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
         }
 
-        /// <summary>
-        /// This is the constructor for Widget.
-        /// </summary>
-        /// <param name="id">for widget instance</param>
-        /// <since_tizen> 4 </since_tizen>
-        public Widget(string id) : this(NDalicManualPINVOKE.Widget_New(id), true)
+        private void OnWidgetInstanceCreated(object sender, WidgetImpl.WIdgetInstanceOnCreateArgs e)
         {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            OnCreate(e.ContentInfo, e.Window);
         }
 
-        internal Widget(Widget widget) : this(NDalicManualPINVOKE.new_Widget__SWIG_1(Widget.getCPtr(widget)), true)
+        private void OnWidgetInstanceDestroyed(object sender, WidgetImpl.WIdgetInstanceOnDestroyArgs e)
         {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            OnTerminate(e.ContentInfo, e.TerminateType);
         }
 
-        internal Widget Assign(Widget widget)
+        private void OnWidgetInstancePaused(object sender, EventArgs e)
         {
-            Widget ret = new Widget(NDalicManualPINVOKE.Widget_Assign(swigCPtr, Widget.getCPtr(widget)), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
+            OnPause();
         }
 
-        /// <summary>
-        /// Event arguments that passed via KeyEvent signal.
-        /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        public class CreateEventArgs : EventArgs
+        private void OnWidgetInstanceResumed(object sender, EventArgs e)
         {
-            /// <summary>
-            /// widget id.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            public string ID
-            {
-                get;
-                set;
-            }
-
-            /// <summary>
-            /// a bundle.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            public SWIGTYPE_p_bundle Bundle
-            {
-                get;
-                set;
-            }
-
-            /// <summary>
-            /// window.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            public Window Window
-            {
-                get;
-                set;
-            }
+            OnResume();
         }
 
-        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        private delegate void CreateCallbackType(string id, IntPtr bundle, IntPtr window);
-        private CreateCallbackType _createCallback;
-        private EventHandler<CreateEventArgs> _createEventHandler;
-
-        /// <summary>
-        /// Create event.
-        /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        public event EventHandler<CreateEventArgs> Create
+        private void OnWidgetInstanceResized(object sender, WidgetImpl.WidgetInstanceOnResizeArgs e)
         {
-            add
-            {
-                if (_createEventHandler == null)
-                {
-                    _createCallback = OnCreate;
-                    CreateSignal().Connect(_createCallback);
-                }
-
-                _createEventHandler += value;
-            }
-
-            remove
-            {
-                _createEventHandler -= value;
-
-                if (_createEventHandler == null && CreateSignal().Empty() == false)
-                {
-                   CreateSignal().Disconnect(_createCallback);
-                }
-            }
+            OnResize(e.Window);
         }
 
-        private void OnCreate(string id, IntPtr bundle, IntPtr window)
+        private void OnWidgetInstanceUpdated(object sender, WidgetImpl.WidgetInstanceOnUpdateArgs e)
         {
-            CreateEventArgs e = new CreateEventArgs();
-
-            e.ID = id;
-
-            if (bundle != null)
-            {
-                e.Bundle = new SWIGTYPE_p_bundle(bundle, false);
-            }
-            if (window != null)
-            {
-                e.Window = new Window(window, false);
-            }
-
-            _createEventHandler?.Invoke(this, e);
+            OnUpdate(e.ContentInfo, e.Force);
         }
 
-        internal WidgetCreateSignalType CreateSignal()
+        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Widget obj)
         {
-            WidgetCreateSignalType ret = new WidgetCreateSignalType(NDalicManualPINVOKE.Widget_CreateSignal(swigCPtr), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
+            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
         /// <summary>
-        /// Event arguments that passed via terminate event signal.
+        /// Dispose.
         /// </summary>
+        /// <param name="type">The dispose type</param>
         /// <since_tizen> 4 </since_tizen>
-        public class TerminateEventArgs : EventArgs
+        protected override void Dispose(DisposeTypes type)
         {
-            /// <summary>
-            /// widget id.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            public string ID
-            {
-                get;
-                set;
-            }
-
-            /// <summary>
-            /// a bundle.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            public SWIGTYPE_p_bundle Bundle
-            {
-                get;
-                set;
-            }
-
-            /// <summary>
-            /// widget terminate type.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            public WidgetTerminateType WidgetTerminateType
+            if(disposed)
             {
-                get;
-                set;
+                return;
             }
-        }
-
-        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        private delegate void TerminateCallbackType(string id, IntPtr bundle, WidgetTerminateType widgetTerminateType);
-        private TerminateCallbackType _terminateCallback;
-        private EventHandler<TerminateEventArgs> _terminateEventHandler;
 
-        /// <summary>
-        /// Terminate event.
-        /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        public event EventHandler<TerminateEventArgs> Terminate
-        {
-            add
+            if(type == DisposeTypes.Explicit)
             {
-                if (_terminateEventHandler == null)
-                {
-                    _terminateCallback = OnTerminate;
-                    TerminateSignal().Connect(_terminateCallback);
-                }
-
-                _terminateEventHandler += value;
+                //Called by User
+                //Release your own managed resources here.
+                //You should release all of your own disposable objects here.
             }
 
-            remove
+            if (swigCPtr.Handle != global::System.IntPtr.Zero)
             {
-                _terminateEventHandler -= value;
-
-                if (_terminateEventHandler == null && TerminateSignal().Empty() == false)
+                if (swigCMemOwn)
                 {
-                   TerminateSignal().Disconnect(_terminateCallback);
+                    swigCMemOwn = false;
+                    NDalicManualPINVOKE.delete_Widget(swigCPtr);
                 }
+                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
             }
-        }
-
-        private void OnTerminate(string id, IntPtr bundle, WidgetTerminateType widgetTerminateType)
-        {
-            TerminateEventArgs e = new TerminateEventArgs();
-            e.ID = id;
-
-            if (bundle != null)
-            {
-                e.Bundle = new SWIGTYPE_p_bundle(bundle, false);
-            }
-
-            e.WidgetTerminateType = widgetTerminateType;
-            _terminateEventHandler?.Invoke(this, e);
-        }
 
-        internal WidgetTerminateSignalType TerminateSignal()
-        {
-            WidgetTerminateSignalType ret = new WidgetTerminateSignalType(NDalicManualPINVOKE.Widget_TerminateSignal(swigCPtr), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
+            base.Dispose(type);
         }
-
         /// <summary>
-        /// Event arguments that passed via pause event signal.
+        /// Enumeration for termination type of widget
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
-        public class PauseEventArgs : EventArgs
+        public enum TerminationType
         {
             /// <summary>
-            /// widget id.
+            /// User deleted this widget from the viewer
             /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-            public string ID
-            {
-                get;
-                set;
-            }
+            /// <since_tizen> 4 </since_tizen>
+            Permanent,
+            /// <summary>
+            /// Widget is deleted because of other reasons (e.g. widget process is terminated temporarily by system)
+            /// </summary>
+            /// <since_tizen> 4 </since_tizen>
+            Temporary
         }
 
-        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        private delegate void PauseCallbackType(string id);
-        private PauseCallbackType _pauseCallback;
-        private EventHandler<PauseEventArgs> _pauseEventHandler;
-
         /// <summary>
-        /// Pause event.
+        /// Creates a Widget handle.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
-        public event EventHandler<PauseEventArgs> Pause
-        {
-            add
-            {
-                if (_pauseEventHandler == null)
-                {
-                    _pauseCallback = OnPause;
-                    PauseSignal().Connect(_pauseCallback);
-                }
-
-                _pauseEventHandler += value;
-            }
-
-            remove
-            {
-                _pauseEventHandler -= value;
+        public Widget () : this (new WidgetImpl(), true) {
+                       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+               }
 
-                if (_pauseEventHandler == null && PauseSignal().Empty() == false)
-                {
-                   PauseSignal().Disconnect(_pauseCallback);
-                }
-            }
-        }
-
-        private void OnPause(string id)
-        {
-            PauseEventArgs e = new PauseEventArgs();
-            e.ID = id;
-
-            _pauseEventHandler?.Invoke(this, e);
-        }
-
-        internal WidgetPauseSignalType PauseSignal()
+        internal Widget Assign(Widget widget)
         {
-            WidgetPauseSignalType ret = new WidgetPauseSignalType(NDalicManualPINVOKE.Widget_PauseSignal(swigCPtr), false);
+            Widget ret = new Widget(NDalicManualPINVOKE.Widget_Assign(swigCPtr, Widget.getCPtr(widget)), false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
         /// <summary>
-        /// Event arguments that passed via pause event signal.
+        /// The user should override this function to determine when they create widget.
         /// </summary>
+        /// <param name="contentInfo">Information from WidgetView for creating. It contains previous status of widget which is sent by SetContentInfo before.</param>
+        /// <param name="window">Window for widget</param>
         /// <since_tizen> 4 </since_tizen>
-        public class ResumeEventArgs : EventArgs
+        protected virtual void OnCreate(string contentInfo, Window window)
         {
-            /// <summary>
-            /// widget id.
-            /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-            public string ID
-            {
-                get;
-                set;
-            }
         }
 
-        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        private delegate void ResumeCallbackType(string id);
-        private ResumeCallbackType _resumeCallback;
-        private EventHandler<ResumeEventArgs> _resumeEventHandler;
-
         /// <summary>
-        /// Resume event.
+        /// The user should override this function to determine when they terminate widget.
         /// </summary>
+        /// <param name="contentInfo">Data from WidgetView for deleting</param>
+        /// <param name="type">Termination type. When user delete widget view, termination type is PERMANENT.</param>
         /// <since_tizen> 4 </since_tizen>
-        public event EventHandler<ResumeEventArgs> Resume
+        protected virtual void OnTerminate(string contentInfo, Widget.TerminationType type)
         {
-            add
-            {
-                if (_resumeEventHandler == null)
-                {
-                    _resumeCallback = OnResume;
-                    ResumeSignal().Connect(_resumeCallback);
-                }
-
-                _resumeEventHandler += value;
-            }
-
-            remove
-            {
-                _resumeEventHandler -= value;
-
-                if (_resumeEventHandler == null && ResumeSignal().Empty() == false)
-                {
-                   ResumeSignal().Disconnect(_resumeCallback);
-                }
-            }
-        }
-
-        private void OnResume(string id)
-        {
-            ResumeEventArgs e = new ResumeEventArgs();
-            e.ID = id;
-
-            _resumeEventHandler?.Invoke(this, e);
-        }
-
-        internal WidgetResumeSignalType ResumeSignal()
-        {
-            WidgetResumeSignalType ret = new WidgetResumeSignalType(NDalicManualPINVOKE.Widget_ResumeSignal(swigCPtr), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
         }
 
         /// <summary>
-        /// Event arguments that passed via resize signal.
+        /// The user should override this function to determine when they pause widget.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
-        public class ResizeEventArgs : EventArgs
+        protected virtual void OnPause()
         {
-            /// <summary>
-            /// widget id.
-            /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-            public string ID
-            {
-                get;
-                set;
-            }
-
-            /// <summary>
-            /// window.
-            /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-            public Window Window
-            {
-                get;
-                set;
-            }
         }
 
-        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        private delegate void ResizeCallbackType(string id, IntPtr window);
-        private ResizeCallbackType _resizeCallback;
-        private EventHandler<ResizeEventArgs> _resizeEventHandler;
-
         /// <summary>
-        /// Resize event.
+        /// The user should override this function to determine when they resume widget.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
-        public event EventHandler<ResizeEventArgs> Resize
-        {
-            add
-            {
-                if (_resizeEventHandler == null)
-                {
-                    _resizeCallback = OnResize;
-                    ResizeSignal().Connect(_resizeCallback);
-                }
-
-                _resizeEventHandler += value;
-            }
-
-            remove
-            {
-                _resizeEventHandler -= value;
-
-                if (_resizeEventHandler == null && ResizeSignal().Empty() == false)
-                {
-                   ResizeSignal().Disconnect(_resizeCallback);
-                }
-            }
-        }
-
-        private void OnResize(string id, IntPtr window)
-        {
-            ResizeEventArgs e = new ResizeEventArgs();
-            e.ID = id;
-            if (window != null)
-            {
-                e.Window = new Window(window, false);
-            }
-
-            _resizeEventHandler?.Invoke(this, e);
-        }
-
-        internal WidgetResizeSignalType ResizeSignal()
+        protected virtual void OnResume()
         {
-            WidgetResizeSignalType ret = new WidgetResizeSignalType(NDalicManualPINVOKE.Widget_ResizeSignal(swigCPtr), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
         }
 
         /// <summary>
-        /// Event arguments that passed via update event signal.
+        /// The user should override this function to determine when they resize widget.
         /// </summary>
+        /// <param name="window">Window for widget</param>
         /// <since_tizen> 4 </since_tizen>
-        public class UpdateEventArgs : EventArgs
+        protected virtual void OnResize(Window window)
         {
-            /// <summary>
-            /// widget data.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            public string ID
-            {
-                get;
-                set;
-            }
-
-            /// <summary>
-            /// A bundle.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            public SWIGTYPE_p_bundle Bundle
-            {
-                get;
-                set;
-            }
-
-            /// <summary>
-            /// It means several steps.
-            /// </summary>
-            /// <remark>
-            /// 0 -> no force
-            /// 1 -> force but do something
-            /// 2 -> force
-            /// </remark>
-            /// <since_tizen> 4 </since_tizen>
-            public int Force
-            {
-                get;
-                set;
-            }
         }
 
-        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
-        private delegate void UpdateCallbackType(string id, IntPtr bundle, int force);
-        private UpdateCallbackType _updateCallback;
-        private EventHandler<UpdateEventArgs> _updateEventHandler;
-
         /// <summary>
-        /// Update event.
+        /// The user should override this function to determine when they update widget.
         /// </summary>
+        /// <param name="contentInfo">Data from WidgetView for updating</param>
+        /// <param name="force">Although the widget is paused, if it is true, the widget can be updated</param>
         /// <since_tizen> 4 </since_tizen>
-        public event EventHandler<UpdateEventArgs> Update
+        protected virtual void OnUpdate(string contentInfo, int force)
         {
-            add
-            {
-                if (_updateEventHandler == null)
-                {
-                    _updateCallback = OnUpdate;
-                    UpdateSignal().Connect(_updateCallback);
-                }
-
-                _updateEventHandler += value;
-            }
-
-            remove
-            {
-                _updateEventHandler -= value;
-
-                if (_updateEventHandler == null && UpdateSignal().Empty() == false)
-                {
-                   UpdateSignal().Disconnect(_updateCallback);
-                }
-            }
-        }
-
-        private void OnUpdate(string id, IntPtr bundle, int force)
-        {
-            UpdateEventArgs e = new UpdateEventArgs();
-            e.ID = id;
-            if (bundle != null)
-            {
-                e.Bundle = new SWIGTYPE_p_bundle(bundle, false);
-            }
-            e.Force = force;
-
-            _updateEventHandler?.Invoke(this, e);
-        }
-
-        internal WidgetUpdateSignalType UpdateSignal()
-        {
-            WidgetUpdateSignalType ret = new WidgetUpdateSignalType(NDalicManualPINVOKE.Widget_UpdateSignal(swigCPtr), false);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
         }
 
         /// <summary>
-        /// Enumeration for terminate type of widget instance.
+        /// Set content info to WidgetView.
         /// </summary>
+        /// <param name="contentInfo">Content info is kind of context information which contains current status of widget.</param>
         /// <since_tizen> 4 </since_tizen>
-        public enum WidgetTerminateType
+        public void SetContentInfo(string contentInfo)
         {
-            /// <summary>
-            /// User deleted this widget from the viewer
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            Permanent,
-            /// <summary>
-            /// Widget is deleted because of other reasons (e.g. widget process is terminated temporarily by the system)
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            Temporary
+            widgetImpl.SetContentInfo(contentInfo);
         }
 
-        /// <summary>
-        /// Enumeration for lifecycle event type of widget instance.
-        /// </summary>
-        /// <since_tizen> 4 </since_tizen>
-        public enum WidgetLifecycleEventType
+        internal System.IntPtr GetIntPtr()
         {
-            /// <summary>
-            /// The widget is dead.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            AppDead = 0,
-            /// <summary>
-            /// The widget is dead.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            Create = 1,
-            /// <summary>
-            /// The widget is destroyed.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            Destroy = 2,
-            /// <summary>
-            /// The widget is paused.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            Pause = 3,
-            /// <summary>
-            /// The widget is resumed.
-            /// </summary>
-            /// <since_tizen> 4 </since_tizen>
-            Resume = 4
+            return swigCPtr.Handle;
         }
     }
 }
index e0cfcb4..48a61d4 100755 (executable)
@@ -57,97 +57,6 @@ namespace Tizen.NUI
             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
         }
 
-        /// <summary>
-        /// To make the window instance be disposed.
-        /// </summary>
-        /// Please DO NOT use! This will be deprecated!
-        /// Dispose() method in Singletone classes (ex: FocusManager, StyleManager, VisualFactory, IMFManager, TtsPlayer, Window) is not required.
-        /// Because it is Sigletone, so it is alive for one thread until the NUI is terminated, so it never be disposed.
-        /// <since_tizen> 3 </since_tizen>
-        [Obsolete("Please do not use! This will be deprecated!")]
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        protected override void Dispose(DisposeTypes type)
-        {
-            if (disposed)
-            {
-                return;
-            }
-
-            if (type == DisposeTypes.Explicit)
-            {
-                //Called by User
-                //Release your own managed resources here.
-                //You should release all of your own disposable objects here.
-            }
-
-            //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.
-
-            if (_windowFocusChangedEventCallback != null)
-            {
-                WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback);
-            }
-
-            if (_stageTouchCallbackDelegate != null)
-            {
-                TouchSignal().Disconnect(_stageTouchCallbackDelegate);
-            }
-
-            if (_stageWheelCallbackDelegate != null)
-            {
-                WheelEventSignal().Disconnect(_stageWheelCallbackDelegate);
-            }
-
-            if (_stageKeyCallbackDelegate != null)
-            {
-                KeyEventSignal().Disconnect(_stageKeyCallbackDelegate);
-            }
-
-            if (_stageEventProcessingFinishedEventCallbackDelegate != null)
-            {
-                EventProcessingFinishedSignal().Disconnect(_stageEventProcessingFinishedEventCallbackDelegate);
-            }
-
-            if (_stageContextLostEventCallbackDelegate != null)
-            {
-                ContextLostSignal().Disconnect(_stageContextLostEventCallbackDelegate);
-            }
-
-            if (_stageContextRegainedEventCallbackDelegate != null)
-            {
-                this.ContextRegainedSignal().Disconnect(_stageContextRegainedEventCallbackDelegate);
-            }
-
-            if (_stageSceneCreatedEventCallbackDelegate != null)
-            {
-                SceneCreatedSignal().Disconnect(_stageSceneCreatedEventCallbackDelegate);
-            }
-
-            if (_windowResizedEventCallback != null)
-            {
-                ResizedSignal().Disconnect(_windowResizedEventCallback);
-            }
-
-            if (_windowFocusChangedEventCallback2 != null)
-            {
-                WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback2);
-            }
-
-            if (swigCPtr.Handle != global::System.IntPtr.Zero)
-            {
-                if (swigCMemOwn)
-                {
-                    swigCMemOwn = false;
-                    NDalicPINVOKE.delete_Window(swigCPtr);
-                    NDalicPINVOKE.delete_Stage(stageCPtr);
-                }
-                swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-            }
-
-            base.Dispose(type);
-        }
-
         internal static Window GetCurrent()
         {
             Window ret = new Window(NDalicPINVOKE.Stage_GetCurrent(), true);
@@ -366,9 +275,14 @@ namespace Tizen.NUI
         }
 
         /// <summary>
-        /// Sets a transparent window's visual state to opaque.
+        /// Sets a transparent window's visual state to opaque. <br />
+        /// If a visual state of a transparent window is opaque, <br />
+        /// then the window manager could handle it as an opaque window when calculating visibility.
         /// </summary>
         /// <param name="opaque">Whether the window's visual state is opaque.</param>
+        /// <remarks>This will have no effect on an opaque window. <br />
+        /// It doesn't change transparent window to opaque window but lets the window manager know the visual state of the window.
+        /// </remarks>
         /// <since_tizen> 3 </since_tizen>
         public void SetOpaqueState(bool opaque)
         {
@@ -380,6 +294,7 @@ namespace Tizen.NUI
         /// Returns whether a transparent window's visual state is opaque or not.
         /// </summary>
         /// <returns>True if the window's visual state is opaque, false otherwise.</returns>
+        /// <remarks> The return value has no meaning on an opaque window. </remarks>
         /// <since_tizen> 3 </since_tizen>
         public bool IsOpaqueState()
         {
diff --git a/test/NUITestSample/NUITestSample/examples/imageview-doaction-test.cs b/test/NUITestSample/NUITestSample/examples/imageview-doaction-test.cs
new file mode 100755 (executable)
index 0000000..3fe14a0
--- /dev/null
@@ -0,0 +1,89 @@
+
+using System;
+using Tizen.NUI;
+using Tizen.NUI.UIComponents;
+using Tizen.NUI.BaseComponents;
+
+namespace ImageViewDoActionTest
+{
+    class Example : NUIApplication
+    {
+        protected override void OnCreate()
+        {
+            base.OnCreate();
+            Initialize();
+            DoActionTest();
+        }
+
+        private static string resourcePath = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
+        private Window window;
+        private Layer defaultLayer;
+        public void Initialize()
+        {
+            Tizen.Log.Error("NUI", "Initialize() START!");
+            window = Window.Instance;
+            window.BackgroundColor = Color.Green;
+            window.TouchEvent += OnWindowTouched;
+            window.WheelEvent += OnWindowWheelMoved;
+            window.KeyEvent += OnWindowKeyPressed;
+
+            defaultLayer = window.GetDefaultLayer();
+
+            Tizen.Log.Error("NUI", "Initialize() END!");
+
+        }
+
+        ImageView imageView1, imageView2;
+        public void DoActionTest()
+        {
+            string myUrl = resourcePath + "/images/gallery-0.jpg";
+
+            imageView1 = new ImageView();
+            imageView1.ResourceUrl = myUrl;
+            imageView1.Position2D = new Position2D(100, 100);
+            imageView1.Size2D = new Size2D(200, 200);
+            defaultLayer.Add(imageView1);
+
+            imageView2 = new ImageView();
+            imageView2.ResourceUrl = myUrl;
+            imageView2.Position2D = new Position2D(500, 100);
+            imageView2.Size2D = new Size2D(400, 400);
+            defaultLayer.Add(imageView2);
+        }
+
+        public void OnWindowKeyPressed(object sender, Window.KeyEventArgs e)
+        {
+            Tizen.Log.Error("NUI", $"OnWindowKeyPressed()! keyPressedName={e.Key.KeyPressedName} state={e.Key.State}");
+
+            if(e.Key.State == Key.StateType.Down)
+            {
+                if(e.Key.KeyPressedName == "Up")
+                {
+                    PropertyMap attributes = new PropertyMap();
+                    imageView1.Reload();
+                }
+                else if (e.Key.KeyPressedName == "Down")
+                {
+
+                }
+            }
+        }
+
+        public void OnWindowWheelMoved(object sender, Window.WheelEventArgs e)
+        {
+            Tizen.Log.Error("NUI", $"OnWindowWheelMoved()! direction={e.Wheel.Direction} type={e.Wheel.Type}");
+        }
+
+        public void OnWindowTouched(object sender, Window.TouchEventArgs e)
+        {
+            Tizen.Log.Error("NUI", $"OnWindowTouched()! e.TouchData.GetState(0)={e.Touch.GetState(0)}");
+        }
+
+        [STAThread]
+        static void _Main(string[] args)
+        {
+            Example example = new Example();
+            example.Run(args);
+        }
+    }
+}
diff --git a/test/NUITestSample/NUITestSample/examples/ref-cnt-error-memory-leak.cs b/test/NUITestSample/NUITestSample/examples/ref-cnt-error-memory-leak.cs
new file mode 100755 (executable)
index 0000000..5e474fa
--- /dev/null
@@ -0,0 +1,288 @@
+using System;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.UIComponents;
+
+namespace RefCountMemoryLeakTest
+{
+    class Program : NUIApplication
+    {
+        protected override void OnCreate()
+        {
+            base.OnCreate();
+            Initialize();
+        }
+
+        View test1;
+        View[] children = new View[10];
+
+        void Initialize()
+        {
+            Window.Instance.KeyEvent += OnKeyEvent;
+            Window.Instance.BackgroundColor = Color.Green;
+
+            test1 = new View();
+            test1.BackgroundColor = Color.Blue;
+            test1.Size2D = new Size2D(100, 100);
+            Window.Instance.Add(test1);
+        }
+
+        Animation animation1;
+        public void OnKeyEvent(object sender, Window.KeyEventArgs e)
+        {
+            if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))
+            {
+                Exit();
+            }
+            else if (e.Key.State == Key.StateType.Down && e.Key.KeyPressedName == "Return")
+            {
+                if(!test1)
+                {
+                    test1 = new View();
+                    test1.BackgroundColor = Color.Blue;
+                    test1.Size2D = new Size2D(100, 100);
+                    Window.Instance.GetDefaultLayer().Add(test1);
+                }
+
+                if (test1)
+                {
+                    if(!animation1)
+                    {
+                        animation1 = new Animation(1000);
+                        animation1.AnimateTo(test1, "Orientation", new Rotation(new Radian(new Degree(180.0f)), PositionAxis.X), 0, 500);
+                        animation1.AnimateTo(test1, "Orientation", new Rotation(new Radian(new Degree(0.0f)), PositionAxis.X), 500, 1000);
+                        Tizen.Log.Fatal("NUI1", $"@@@ new Animation()!");
+                    }
+                    animation1?.Play();
+                }
+            }
+            else if (e.Key.State == Key.StateType.Down && e.Key.KeyPressedName == "Left")
+            {
+                //test1?.GetObjectPtr()?.Unreference();
+                if(animation1)
+                {
+                    animation1.Finished += Animation1_Finished;
+                    Tizen.Log.Fatal("NUI1", $"@@@ ADD finished!");
+                }
+            }
+            else if (e.Key.State == Key.StateType.Down && e.Key.KeyPressedName == "Up")
+            {
+                test1?.Dispose();
+                test1 = null;
+            }
+            else if (e.Key.State == Key.StateType.Down && e.Key.KeyPressedName == "Right")
+            {
+                animation1?.Dispose();
+                animation1 = null;
+            }
+            else if (e.Key.State == Key.StateType.Down && e.Key.KeyPressedName == "1")
+            {
+                Tizen.Log.Fatal("NUI1", $"########## 1 pressed! ##########");
+
+                Layer layer = Window.Instance.GetDefaultLayer();
+
+                Tizen.Log.Fatal("NUI1", $"[1]Add! test1 id={test1.ID} test1's refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                Tizen.Log.Fatal("NUI1", $"layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+                layer?.Add(test1);
+                Tizen.Log.Fatal("NUI1", $"[2]Add! test1 id={test1.ID} test1's refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                Tizen.Log.Fatal("NUI1", $"layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+
+                Tizen.Log.Fatal("NUI1", $"GetParent(): test1's refcnt={test1?.GetParent()?.GetObjectPtr()?.ReferenceCount()}, layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+                layer?.Remove(test1);
+
+                Tizen.Log.Fatal("NUI1", $"[3]Remove! test1 id={test1.ID} test1's refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                Tizen.Log.Fatal("NUI1", $"layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+
+                Tizen.Log.Fatal("NUI1", $"GetParent(): test1's refcnt={test1?.GetParent()?.GetObjectPtr()?.ReferenceCount()}, layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+
+                Tizen.Log.Fatal("NUI1", $"#####################");
+            }
+            else if (e.Key.State == Key.StateType.Down && e.Key.KeyPressedName == "2")
+            {
+                Tizen.Log.Fatal("NUI1", $"########## 2 pressed! ##########");
+
+                Layer layer = Window.Instance.GetDefaultLayer();
+
+                Tizen.Log.Fatal("NUI1", $"[1]Add! test1 id={test1.ID} test1's refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                Tizen.Log.Fatal("NUI1", $"layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+                layer?.Add(test1);
+                Tizen.Log.Fatal("NUI1", $"[2]Add! test1 id={test1.ID} test1's refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                Tizen.Log.Fatal("NUI1", $"layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+
+                Tizen.Log.Fatal("NUI1", $"test1's GetParent() refcnt={test1?.GetParent()?.GetObjectPtr()?.ReferenceCount()}, layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+                for(int i=0; i<5; i++)
+                {
+                    children[i] = new ImageView();
+                    children[i].Size2D = new Size2D(100, 100);
+                    children[i].Position2D = new Position2D(100 + 50 * (i + 1), 100 + 50 * (i + 1));
+                    children[i].BackgroundColor = Color.Red;
+                    layer.Add(children[i]);
+                    Tizen.Log.Fatal("NUI1", $"children[{i}]'s refcnt={children[i]?.GetParent()?.GetObjectPtr()?.ReferenceCount()}, layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+                }
+
+                for (int i = 5; i < 10; i++)
+                {
+                    children[i] = new View();
+                    children[i].Size2D = new Size2D(100, 100);
+                    children[i].Position2D = new Position2D(100 + 50 * (i + 1), 100 + 50 * (i + 1));
+                    children[i].BackgroundColor = Color.Yellow;
+                    test1.Add(children[i]);
+                    Tizen.Log.Fatal("NUI1", $"children[{i}] refcnt={children[i]?.GetParent()?.GetObjectPtr()?.ReferenceCount()}, test1 refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                }
+
+                View temp;
+                for(int i=0; i<8; i++)
+                {
+                    temp = layer.GetChildAt((uint)i);
+                    Tizen.Log.Fatal("NUI1", $"temp(idx[{i}])={temp?.GetTypeName()}'s refcnt={temp?.GetParent()?.GetObjectPtr()?.ReferenceCount()}, layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+                }
+
+                for (int i = 0; i < 8; i++)
+                {
+                    temp = test1.GetChildAt((uint)i);
+                    Tizen.Log.Fatal("NUI1", $"GetChildAt: temp(idx[{i}])={temp?.GetTypeName()}'s refcnt={temp?.GetParent()?.GetObjectPtr()?.ReferenceCount()}, test1's refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                }
+
+                layer?.Remove(test1);
+
+                Tizen.Log.Fatal("NUI1", $"[3]Remove! test1 id={test1.ID} test1's refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                Tizen.Log.Fatal("NUI1", $"layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+
+                Tizen.Log.Fatal("NUI1", $"test1's GetParent() refcnt={test1?.GetParent()?.GetObjectPtr()?.ReferenceCount()}, layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+
+                Tizen.Log.Fatal("NUI1", $"#####################");
+            }
+            else if (e.Key.State == Key.StateType.Down && e.Key.KeyPressedName == "3")
+            {
+                Tizen.Log.Fatal("NUI1", $"########## 3 pressed! ##########");
+
+                Layer layer = Window.Instance.GetDefaultLayer();
+
+                Tizen.Log.Fatal("NUI1", $"[1]Add! test1 id={test1.ID} test1's refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                Tizen.Log.Fatal("NUI1", $"layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+                layer?.Add(test1);
+                Tizen.Log.Fatal("NUI1", $"[2]Add! test1 id={test1.ID} test1's refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                Tizen.Log.Fatal("NUI1", $"layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+
+                Tizen.Log.Fatal("NUI1", $"test1's GetParent() refcnt={test1?.GetParent()?.GetObjectPtr()?.ReferenceCount()}, layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+                for (int i = 0; i < 5; i++)
+                {
+                    children[i] = new ImageView();
+                    children[i].Size2D = new Size2D(100, 100);
+                    children[i].Position2D = new Position2D(100 + 50 * (i + 1), 100 + 50 * (i + 1));
+                    children[i].BackgroundColor = Color.Red;
+                    layer.Add(children[i]);
+                    Tizen.Log.Fatal("NUI1", $"children[{i}]:id({children[i].ID})'s refcnt={children[i]?.GetParent()?.GetObjectPtr()?.ReferenceCount()}, layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+                }
+
+                for (int i = 5; i < 10; i++)
+                {
+                    children[i] = new View();
+                    children[i].Size2D = new Size2D(100, 100);
+                    children[i].Position2D = new Position2D(100 + 50 * (i + 1), 100 + 50 * (i + 1));
+                    children[i].BackgroundColor = Color.Yellow;
+                    test1.Add(children[i]);
+                    Tizen.Log.Fatal("NUI1", $"children[{i}] refcnt={children[i]?.GetParent()?.GetObjectPtr()?.ReferenceCount()}, test1 refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                }
+
+                View temp;
+                for (int i = 1; i < children[9].ID + 1; i++)
+                {
+                    temp = layer.FindChildById((uint)i);
+                    Tizen.Log.Fatal("NUI1", $"FindChildById: temp(id[{i}])={temp?.GetTypeName()}'s refcnt={temp?.GetParent()?.GetObjectPtr()?.ReferenceCount()}, layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+                }
+
+                for (int i = 0; i < 10; i++)
+                {
+                    children[i].Unparent();
+                    children[i].Dispose();
+                    children[i] = null;
+                }
+
+                layer?.Remove(test1);
+
+                Tizen.Log.Fatal("NUI1", $"[3]Remove! test1 id={test1.ID} test1's refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                Tizen.Log.Fatal("NUI1", $"layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+
+                Tizen.Log.Fatal("NUI1", $"test1's GetParent() refcnt={test1?.GetParent()?.GetObjectPtr()?.ReferenceCount()}, layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+
+                Tizen.Log.Fatal("NUI1", $"#####################");
+            }
+            else if (e.Key.State == Key.StateType.Down && e.Key.KeyPressedName == "4")
+            {
+                Tizen.Log.Fatal("NUI1", $"########## 4 pressed! ##########");
+
+                Layer layer = Window.Instance.GetDefaultLayer();
+
+                Tizen.Log.Fatal("NUI1", $"[1]Add! test1 id={test1.ID} test1's refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                Tizen.Log.Fatal("NUI1", $"layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+                layer?.Add(test1);
+                Tizen.Log.Fatal("NUI1", $"[2]Add! test1 id={test1.ID} test1's refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                Tizen.Log.Fatal("NUI1", $"layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+
+                for (int i = 0; i < 5; i++)
+                {
+                    children[i] = new ImageView();
+                    children[i].Size2D = new Size2D(100, 100);
+                    children[i].Position2D = new Position2D(100 + 50 * (i + 1), 100 + 50 * (i + 1));
+                    children[i].BackgroundColor = Color.Red;
+                    children[i].Name = "TestView" + i;
+                    test1.Add(children[i]);
+                    Tizen.Log.Fatal("NUI1", $"children[{i}]:id({children[i].ID})'s refcnt={children[i]?.GetParent()?.GetObjectPtr()?.ReferenceCount()}, test1's refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                }
+
+                for (int i = 5; i < 10; i++)
+                {
+                    children[i] = new View();
+                    children[i].Size2D = new Size2D(100, 100);
+                    children[i].Position2D = new Position2D(100 + 50 * (i + 1), 100 + 50 * (i + 1));
+                    children[i].BackgroundColor = Color.Yellow;
+                    children[i].Name = "TestView" + i;
+                    test1.Add(children[i]);
+                    Tizen.Log.Fatal("NUI1", $"children[{i}] refcnt={children[i]?.GetParent()?.GetObjectPtr()?.ReferenceCount()}, test1 refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                }
+
+                View temp;
+                for (int i = 0; i < 10; i++)
+                {
+                    temp = test1.FindChildByName("TestView" + i);
+                    Tizen.Log.Fatal("NUI1", $"FindChildByName: temp(name:{temp.Name})={temp?.GetTypeName()}'s refcnt={temp?.GetParent()?.GetObjectPtr()?.ReferenceCount()}, test1's refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                }
+
+                for (int i = 0; i < 10; i++)
+                {
+                    children[i].Unparent();
+                    children[i].Dispose();
+                    children[i] = null;
+                }
+
+                layer?.Remove(test1);
+
+                Tizen.Log.Fatal("NUI1", $"[3]Remove! test1 id={test1.ID} test1's refcnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+                Tizen.Log.Fatal("NUI1", $"layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+
+                Tizen.Log.Fatal("NUI1", $"test1's GetParent() refcnt={test1?.GetParent()?.GetObjectPtr()?.ReferenceCount()}, layer's refcnt={layer?.GetObjectPtr()?.ReferenceCount()}");
+
+                Tizen.Log.Fatal("NUI1", $"#####################");
+            }
+
+
+            Tizen.Log.Fatal("NUI1", $"@@@ test1 refcnt={test1?.GetObjectPtr()?.ReferenceCount()} , key={e.Key.KeyPressedName}");
+            Tizen.Log.Fatal("NUI1", $"@@@ animation1 refcnt={animation1?.GetObjectPtr()?.ReferenceCount()}");
+        }
+
+        private void Animation1_Finished(object sender, EventArgs e)
+        {
+            Tizen.Log.Fatal("NUI1", $"@@@ ======== Finished! animation1 ref-cnt={animation1?.GetObjectPtr()?.ReferenceCount()}");
+            Tizen.Log.Fatal("NUI1", $"@@@ test1 ref-cnt={test1?.GetObjectPtr()?.ReferenceCount()}");
+            Tizen.Log.Fatal("NUI1", $"@@@ ==========================================");
+        }
+
+        static void ___Main(string[] args)
+        {
+            var app = new Program();
+            app.Run(args);
+        }
+    }
+}
+
index 11bc56a..40fcb22 100755 (executable)
@@ -121,6 +121,7 @@ namespace TextTest
             hiddenMap.Add(HiddenInputProperty.SubstituteCharacter, new PropertyValue(0x23));
             field.HiddenInputSettings = hiddenMap;
             field.EnableSelection = true;
+            field.EnableShiftSelection = false;
             window.Add(field);
 
             InputMethod inputMethod = new InputMethod();
@@ -165,6 +166,9 @@ namespace TextTest
             FocusManager.Instance.SetCurrentFocusView(editor);
             editor.UpFocusableView = field;
             field.DownFocusableView = editor;
+
+            NUILog.Debug($"### field.EnableShiftSelection={field.EnableShiftSelection}, editor.EnableShiftSelection={editor.EnableShiftSelection}");
+
         }
 
         [STAThread]