Added Dispose Queue bindings for missing C# classes
[platform/core/uifw/dali-toolkit.git] / plugins / dali-swig / manual / csharp / ViewWrapperImpl.cs
index 0f42e4e..358a6bb 100644 (file)
@@ -58,8 +58,6 @@ namespace Dali
         public delegate void OnPanDelegate(PanGesture pan);
         public delegate void OnTapDelegate(TapGesture tap);
         public delegate void OnLongPressDelegate(LongPressGesture longPress);
-        public delegate void SignalConnectedDelegate(SlotObserver slotObserver, SWIGTYPE_p_Dali__CallbackBase callback);
-        public delegate void SignalDisconnectedDelegate(SlotObserver slotObserver, SWIGTYPE_p_Dali__CallbackBase callback);
 
         public OnStageConnectionDelegate OnStageConnection;
         public OnStageDisconnectionDelegate OnStageDisconnection;
@@ -99,8 +97,6 @@ namespace Dali
         public OnPanDelegate OnPan;
         public OnTapDelegate OnTap;
         public OnLongPressDelegate OnLongPress;
-        public SignalConnectedDelegate SignalConnected;
-        public SignalDisconnectedDelegate SignalDisconnected;
 
         internal ViewWrapperImpl(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicManualPINVOKE.ViewWrapperImpl_SWIGUpcast(cPtr), cMemoryOwn)
         {
@@ -114,11 +110,17 @@ namespace Dali
 
         ~ViewWrapperImpl()
         {
-            Dispose();
+            DisposeQueue.Instance.Add(this);
         }
 
         public override void Dispose()
         {
+            if (!Stage.IsInstalled())
+            {
+                DisposeQueue.Instance.Add(this);
+                return;
+            }
+
             lock(this)
             {
                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
@@ -312,7 +314,10 @@ namespace Dali
 
         private void DirectorOnPropertySet(int index, global::System.IntPtr propertyValue)
         {
-            OnPropertySet(index, new Property.Value(propertyValue, true));
+            if (OnPropertySet != null)
+            {
+                OnPropertySet(index, new Property.Value(propertyValue, true));
+            }
         }
 
         private void DirectorOnSizeSet(global::System.IntPtr targetSize)
@@ -411,7 +416,10 @@ namespace Dali
 
         private void DirectorOnStyleChange(global::System.IntPtr styleManager, int change)
         {
-            OnStyleChange(new StyleManager(styleManager, false), (StyleChangeType)change);
+            if (OnStyleChange != null)
+            {
+                OnStyleChange(new StyleManager(styleManager, false), (StyleChangeType)change);
+            }
         }
 
         private bool DirectorOnAccessibilityActivated()
@@ -484,16 +492,6 @@ namespace Dali
             OnLongPress(new LongPressGesture(longPress, false));
         }
 
-        private void DirectorSignalConnected(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 DirectorSignalDisconnected(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 DelegateViewWrapperImpl_0(int depth);
         public delegate void DelegateViewWrapperImpl_1();
         public delegate void DelegateViewWrapperImpl_2(global::System.IntPtr child);