From: shiva.jm Date: Fri, 28 Oct 2016 10:09:58 +0000 (+0530) Subject: Garbage Collection using Dispose Queue method X-Git-Tag: dali_1.2.16~16^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=refs%2Fchanges%2F04%2F90804%2F19 Garbage Collection using Dispose Queue method Change-Id: If9896902e86d6925a0bb4a04610f161f3e441f9b Signed-off-by: shiva.jm --- diff --git a/build/tizen/plugins/csharp/Makefile.am b/build/tizen/plugins/csharp/Makefile.am index 8aa499a..0e32717 100755 --- a/build/tizen/plugins/csharp/Makefile.am +++ b/build/tizen/plugins/csharp/Makefile.am @@ -18,13 +18,14 @@ BUILT_SOURCES = \ $(dali_swig_dir)/automatic/cpp/dali_wrap.cpp \ $(dali_swig_dir)/automatic/cpp/dali_wrap.h \ $(dali_swig_dir)/manual/cpp/keyboard_focus_manager_wrap.cpp \ - $(dali_swig_dir)/manual/cpp/view-wrapper-impl-wrap.cpp + $(dali_swig_dir)/manual/cpp/view-wrapper-impl-wrap.cpp \ + $(dali_swig_dir)/manual/cpp/callbackbase_wrap.cpp all-local: gbs-local: libNDalic.so NDali.dll -libNDalic.so: $(dali_swig_dir)/automatic/cpp/dali_wrap.o $(dali_swig_dir)/manual/cpp/keyboard_focus_manager_wrap.o $(dali_swig_dir)/manual/cpp/view-wrapper-impl-wrap.o - $(CXX) -shared $(dali_swig_dir)/automatic/cpp/dali_wrap.o $(dali_swig_dir)/manual/cpp/keyboard_focus_manager_wrap.o $(dali_swig_dir)/manual/cpp/view-wrapper-impl-wrap.o -o $(dali_swig_dir)/libNDalic.so $(DALICORE_LIBS) $(DALIADAPTOR_LIBS) $(DALITOOLKIT_LIBS) +libNDalic.so: $(dali_swig_dir)/automatic/cpp/dali_wrap.o $(dali_swig_dir)/manual/cpp/keyboard_focus_manager_wrap.o $(dali_swig_dir)/manual/cpp/view-wrapper-impl-wrap.o $(dali_swig_dir)/manual/cpp/callbackbase_wrap.o + $(CXX) -shared $(dali_swig_dir)/automatic/cpp/dali_wrap.o $(dali_swig_dir)/manual/cpp/keyboard_focus_manager_wrap.o $(dali_swig_dir)/manual/cpp/view-wrapper-impl-wrap.o $(dali_swig_dir)/manual/cpp/callbackbase_wrap.o -o $(dali_swig_dir)/libNDalic.so $(DALICORE_LIBS) $(DALIADAPTOR_LIBS) $(DALITOOLKIT_LIBS) $(dali_swig_dir)/automatic/cpp/dali_wrap.o: $(BUILT_SOURCES) $(CXX) -c -fpic $(CXXFLAGS) $(DALICORE_CFLAGS) $(DALIADAPTOR_CFLAGS) $(DALITOOLKIT_CFLAGS) $(dali_swig_dir)/automatic/cpp/dali_wrap.cpp -o $(dali_swig_dir)/automatic/cpp/dali_wrap.o @@ -35,6 +36,9 @@ $(dali_swig_dir)/manual/cpp/keyboard_focus_manager_wrap.o: $(BUILT_SOURCES) $(dali_swig_dir)/manual/cpp/view-wrapper-impl-wrap.o: $(BUILT_SOURCES) $(CXX) -c -fpic $(CXXFLAGS) $(DALICORE_CFLAGS) $(DALIADAPTOR_CFLAGS) $(DALITOOLKIT_CFLAGS) $(dali_swig_dir)/manual/cpp/view-wrapper-impl-wrap.cpp -o $(dali_swig_dir)/manual/cpp/view-wrapper-impl-wrap.o +$(dali_swig_dir)/manual/cpp/callbackbase_wrap.cpp.o: $(BUILT_SOURCES) + $(CXX) -c -fpic $(CXXFLAGS) $(DALICORE_CFLAGS) $(DALIADAPTOR_CFLAGS) $(DALITOOLKIT_CFLAGS) $(dali_swig_dir)/manual/cpp/callbackbase_wrap.cpp -o $(dali_swig_dir)/manual/cpp/callbackbase_wrap.o + NDali.dll: $(BUILT_SOURCES) # mcs -nologo -target:library -out:$(dali_swig_dir)/NDali.dll $(dali_swig_dir)/automatic/csharp/*.cs $(dali_swig_dir)/manual/csharp/*.cs diff --git a/plugins/dali-swig/Makefile.am b/plugins/dali-swig/Makefile.am index 9ed6c33..6b6966a 100644 --- a/plugins/dali-swig/Makefile.am +++ b/plugins/dali-swig/Makefile.am @@ -23,8 +23,8 @@ if BUILD_MCS all-local: libNDalic.so NDali.dll -libNDalic.so: automatic/cpp/dali_wrap.o manual/cpp/keyboard_focus_manager_wrap.o manual/cpp/view-wrapper-impl-wrap.o - g++ -shared automatic/cpp/dali_wrap.o manual/cpp/keyboard_focus_manager_wrap.o manual/cpp/view-wrapper-impl-wrap.o -o libNDalic.so $(DALICORE_LIBS) $(DALIADAPTOR_LIBS) $(DALITOOLKIT_LIBS) +libNDalic.so: automatic/cpp/dali_wrap.o manual/cpp/keyboard_focus_manager_wrap.o manual/cpp/view-wrapper-impl-wrap.o manual/cpp/callbackbase_wrap.o + g++ -shared automatic/cpp/dali_wrap.o manual/cpp/keyboard_focus_manager_wrap.o manual/cpp/view-wrapper-impl-wrap.o manual/cpp/callbackbase_wrap.o -o libNDalic.so $(DALICORE_LIBS) $(DALIADAPTOR_LIBS) $(DALITOOLKIT_LIBS) automatic/cpp/dali_wrap.o: $(BUILT_SOURCES) g++ -c -fpic $(CXXFLAGS) $(DALICORE_CFLAGS) $(DALIADAPTOR_CFLAGS) $(DALITOOLKIT_CFLAGS) automatic/cpp/dali_wrap.cpp -o automatic/cpp/dali_wrap.o @@ -35,6 +35,9 @@ manual/cpp/keyboard_focus_manager_wrap.o: $(BUILT_SOURCES) manual/cpp/view-wrapper-impl-wrap.o: $(BUILT_SOURCES) g++ -c -fpic $(CXXFLAGS) $(DALICORE_CFLAGS) $(DALIADAPTOR_CFLAGS) $(DALITOOLKIT_CFLAGS) manual/cpp/view-wrapper-impl-wrap.cpp -o manual/cpp/view-wrapper-impl-wrap.o +manual/cpp/callbackbase_wrap.o: $(BUILT_SOURCES) + g++ -c -fpic $(CXXFLAGS) $(DALICORE_CFLAGS) $(DALIADAPTOR_CFLAGS) $(DALITOOLKIT_CFLAGS) manual/cpp/callbackbase_wrap.cpp -o manual/cpp/callbackbase_wrap.o + NDali.dll: $(BUILT_SOURCES) $(MCS) -nologo -target:library -out:NDali.dll automatic/csharp/*.cs manual/csharp/*.cs diff --git a/plugins/dali-swig/SWIG/dali-gc.i b/plugins/dali-swig/SWIG/dali-gc.i new file mode 100644 index 0000000..ea71121 --- /dev/null +++ b/plugins/dali-swig/SWIG/dali-gc.i @@ -0,0 +1,1491 @@ +/* + * Copyright (c) 2016 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. + * + */ + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_##ClassName(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( NameSpace, ClassName ) +%typemap(csdestruct_derived, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_##ClassName(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + base.Dispose(); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~ClassName() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VIDEOVIEWSIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~VideoViewSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VIDEOVIEWSIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_VideoViewSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_APPLICATIONSIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~ApplicationSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_APPLICATIONSIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_ApplicationSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_APPLICATIONCONTROLSIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~ApplicationControlSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_APPLICATIONCONTROLSIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_ApplicationControlSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_IMAGESIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~ImageSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_IMAGESIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_ImageSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RESOURCESIMAGESIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~ResourceImageSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RESOURCESIMAGESIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_ResourceImageSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RECTINT( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~RectInteger() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RECTINT( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_RectInteger(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RECTDOUBLE( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~RectDouble() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RECTDOUBLE( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_RectDouble(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RECTFLOAT( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~RectFloat() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RECTFLOAT( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_RectFloat(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RECTUNSIGNEDINT( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~RectUnsignedInteger() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RECTUNSIGNEDINT( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_RectUnsignedInteger(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_STRINGVALUEPAIR( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~StringValuePair() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_STRINGVALUEPAIR( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_StringValuePair(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TOUCHCONTAINER( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~TouchPointContainer() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TOUCHCONTAINER( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_TouchPointContainer(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_BOOLSIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~BoolSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_BOOLSIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_BoolSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ACCESSIBILITYACTIONSIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~AccessibilityActionSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ACCESSIBILITYACTIONSIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_AccessibilityActionSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ACCESSIBILITYACTIONSCROLLSIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~AccessibilityActionScrollSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ACCESSIBILITYACTIONSCROLLSIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_AccessibilityActionScrollSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ACCESSIBILITYFOCUSSIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~AccessibilityFocusOvershotSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ACCESSIBILITYFOCUSSIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_AccessibilityFocusOvershotSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VECTORINT( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~VectorInteger() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VECTORINT( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_VectorInteger(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VECTORFLOAT( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~VectorFloat() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VECTORFLOAT( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_VectorFloat(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VECTORUNSIGNEDCHAR( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~VectorUnsignedChar() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VECTORUNSIGNEDCHAR( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_VectorUnsignedChar(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VECTORUINT16PAIR( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~VectorUint16Pair() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VECTORUINT16PAIR( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_VectorUint16Pair(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TIMERSIGNALTYPE( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~TimerSignalType() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TIMERSIGNALTYPE( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_TimerSignalType(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ACTOR( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~ActorSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ACTOR( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_ActorSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ANIMATIONSIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~AnimationSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ANIMATIONSIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_AnimationSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_BUTTON( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~ButtonSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_BUTTON( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_ButtonSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_PAGETURNSIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~PageTurnSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_PAGETURNSIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_PageTurnSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_PAGEVIEWSIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~PagePanSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_PAGEVIEWSIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_PagePanSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_PANGESTURESIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~PanGestureDetectedSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_PANGESTURESIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_PanGestureDetectedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_PINCHGESTURESIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~PinchGestureDetectedSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_PINCHGESTURESIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_PinchGestureDetectedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENDERTASKSIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~RenderTaskSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENDERTASKSIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_RenderTaskSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_SCROLLABLESIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~ScrollableSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_SCROLLABLESIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_ScrollableSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_SCROLLVIEWSIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~ScrollViewSnapStartedSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_SCROLLVIEWSIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_ScrollViewSnapStartedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_SLIDERVALUECHANGEDSIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~SliderValueChangedSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_SLIDERVALUECHANGEDSIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_SliderValueChangedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_SLIDERMARKCHANGEDSIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~SliderMarkReachedSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_SLIDERMARKCHANGEDSIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_SliderMarkReachedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_STAGESIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~StageWheelEventSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_STAGESIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_StageWheelEventSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_STYLECHANGEDSIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~StyleChangedSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_STYLECHANGEDSIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_StyleChangedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TAPGESTURESIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~TapGestureDetectedSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TAPGESTURESIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_TapGestureDetectedSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TEXTFIELDSIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~TextFieldSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TEXTFIELDSIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_TextFieldSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TEXTEDITORSIGNAL( NameSpace, ClassName ) +%typemap(csfinalize) NameSpace::ClassName %{ + ~TextEditorSignal() { + DisposeQueue.Instance.Add(this); + } +%} +%enddef + +%define DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TEXTEDITORSIGNAL( NameSpace, ClassName ) +%typemap(csdestruct, methodname="Dispose", methodmodifiers="public") NameSpace::ClassName %{{ + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + + lock(this) { + if (swigCPtr.Handle != global::System.IntPtr.Zero) { + if (swigCMemOwn) { + swigCMemOwn = false; + NDalicPINVOKE.delete_TextEditorSignal(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + global::System.GC.SuppressFinalize(this); + } + } +%} +%enddef + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Any ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, Any ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Actor ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Actor ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, AlphaFunction ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, AlphaFunction ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Animation ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Animation ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, AngleAxis ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, AngleAxis ); + +//DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, BaseObject ); +//DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, BaseObject ); +//DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, RefObject ); +//DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, RefObject ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Handle ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Handle ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, ObjectRegistry ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, ObjectRegistry ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, BaseHandle ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, BaseHandle ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, BufferImage ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, BufferImage ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, CameraActor ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, CameraActor ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, CustomActor ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, CustomActor ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, CustomActorImpl ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, CustomActorImpl ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, ConnectionTracker ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, ConnectionTracker ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, ConnectionTrackerInterface ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, ConnectionTrackerInterface ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Degree ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, Degree ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, EncodedBufferImage ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, EncodedBufferImage ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, FrameBuffer ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, FrameBuffer ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, FrameBufferImage ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, FrameBufferImage ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Geometry ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Geometry ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Gesture ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, Gesture ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, GestureDetector ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, GestureDetector ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, TapGesture ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, TapGesture ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, TapGestureDetector ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, TapGestureDetector ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, PanGesture ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, PanGesture ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, PanGestureDetector ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, PanGestureDetector ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, PinchGesture ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, PinchGesture ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, PinchGestureDetector ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, PinchGestureDetector ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, LongPressGesture ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, LongPressGesture ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, LongPressGestureDetector ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, LongPressGestureDetector ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, KeyEvent ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, KeyEvent ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, HoverEvent ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, HoverEvent ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, TouchEvent ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, TouchEvent ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, WheelEvent ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, WheelEvent ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Renderer ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Renderer ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, RenderTask ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, RenderTask ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, RenderTaskList ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, RenderTaskList ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, RelayoutContainer ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, RelayoutContainer ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Radian ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, Radian ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Quaternion ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, Quaternion ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Matrix ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, Matrix ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Matrix3 ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, Matrix3 ); + +//DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, RulerPtr ); +//DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, RulerPtr ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Layer ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Layer ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, KeyFrames ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, KeyFrames ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Stage ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Stage ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Sampler ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Sampler ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Shader ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Shader ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Vector2 ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, Vector2 ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Vector3 ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, Vector3 ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Vector4 ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, Vector4 ); +//DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, VectorBase ); +//DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, VectorBase ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Image ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Image ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, NativeImage ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, NativeImage ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, NinePatchImage ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, NinePatchImage ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, ResourceImage ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, ResourceImage ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Path ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Path ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Property ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, Property ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, PropertyBuffer ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, PropertyBuffer ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, PropertyCondition ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, PropertyCondition ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, PropertyNotification ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, PropertyNotification ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, PixelData ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, PixelData ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Uint16Pair ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, Uint16Pair ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, TypeInfo ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, TypeInfo ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Texture ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Texture ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, TextureSet ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, TextureSet ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, TimePeriod ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, TimePeriod ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, LinearConstrainer ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, LinearConstrainer ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, PathConstrainer ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, PathConstrainer ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, TouchPoint ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali, TouchPoint ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, TouchData ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, TouchData ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Application ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Application ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, DragAndDropDetector ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, DragAndDropDetector ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Timer ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Timer ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali, Window ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali, Window ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, AccessibilityManager ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, AccessibilityManager ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, Alignment ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, Alignment ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, Button ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, Button ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, CheckBoxButton ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, CheckBoxButton ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, PushButton ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, PushButton ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, RadioButton ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, RadioButton ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, Builder ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, Builder ); + +//DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, View ); +//DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, View ); +//DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, ViewImpl ); +//DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, ViewImpl ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, FlexContainer ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, FlexContainer ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, GaussianBlurView ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, GaussianBlurView ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, ImageView ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, ImageView ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, ItemView ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, ItemView ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, ItemFactory ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali::Toolkit, ItemFactory ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, ItemLayout ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, ItemLayout ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, ItemRange ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali::Toolkit, ItemRange ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, Model3dView ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, Model3dView ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, PageFactory ); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION( Dali::Toolkit, PageFactory ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, PageTurnLandscapeView ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, PageTurnLandscapeView ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, PageTurnPortraitView ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, PageTurnPortraitView ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, PageTurnView ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, PageTurnView ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, Popup ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, Popup ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, ProgressBar ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, ProgressBar ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, Scrollable ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, Scrollable ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, ScrollBar ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, ScrollBar ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, ScrollView ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, ScrollView ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, ScrollViewEffect ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, ScrollViewEffect ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, ScrollViewPagePathEffect ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, ScrollViewPagePathEffect ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, StyleManager ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, StyleManager ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, Slider ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, Slider ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, TableView ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, TableView ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, TextEditor ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, TextEditor ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, TextField ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, TextField ); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, TextLabel ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, TextLabel ); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, VideoView ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, VideoView ); +//DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, VisualBase ); +//DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, VisualBase); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION( Dali::Toolkit, VisualFactory ); +DALI_CREATE_CUSTOM_DISPOSE_DERIVED_FUNCTION( Dali::Toolkit, VisualFactory ); + +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_APPLICATIONSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_APPLICATIONSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_APPLICATIONCONTROLSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_APPLICATIONCONTROLSIGNAL( Dali, Signal); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VIDEOVIEWSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VIDEOVIEWSIGNAL( Dali, Signal); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_IMAGESIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_IMAGESIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RESOURCESIMAGESIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RESOURCESIMAGESIGNAL( Dali, Signal); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RECTINT( Dali, Rect); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RECTINT( Dali, Rect); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RECTDOUBLE( Dali, Rect); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RECTDOUBLE( Dali, Rect); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RECTFLOAT( Dali, Rect); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RECTFLOAT( Dali, Rect); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RECTUNSIGNEDINT( Dali, Rect); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RECTUNSIGNEDINT( Dali, Rect); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TOUCHCONTAINER( std, vector); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TOUCHCONTAINER( std, vector); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VECTORINT( Dali, Vector); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VECTORINT( Dali, Vector); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VECTORFLOAT( Dali, Vector); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VECTORFLOAT( Dali, Vector); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VECTORUNSIGNEDCHAR( Dali, Vector); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VECTORUNSIGNEDCHAR( Dali, Vector); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_VECTORUINT16PAIR( Dali, Vector); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_VECTORUINT16PAIR( Dali, Vector); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ACCESSIBILITYACTIONSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ACCESSIBILITYACTIONSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ACCESSIBILITYACTIONSCROLLSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ACCESSIBILITYACTIONSCROLLSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ACCESSIBILITYFOCUSSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ACCESSIBILITYFOCUSSIGNAL( Dali, Signal); +//DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_STRINGVALUEPAIR( Dali, pair); +//DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_STRINGVALUEPAIR( Dali, pair); +//DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_BOOLSIGNAL( Dali, Signal); +//DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_BOOLSIGNAL( Dali, Signal); +//DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TIMERSIGNALTYPE( Dali, Signal); +//DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TIMERSIGNALTYPE( Dali, Signal); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ACTOR( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ACTOR( Dali, Signal); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_ANIMATIONSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_ANIMATIONSIGNAL( Dali, Signal); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_BUTTON( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_BUTTON( Dali, Signal); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_PAGETURNSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_PAGETURNSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_PAGEVIEWSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_PAGEVIEWSIGNAL( Dali, Signal); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_PANGESTURESIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_PANGESTURESIGNAL( Dali, Signal); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_PINCHGESTURESIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_PINCHGESTURESIGNAL( Dali, Signal); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_RENDERTASKSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_RENDERTASKSIGNAL( Dali, Signal); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_SCROLLABLESIGNAL( Dali, Signal< void(const Dali::Vector2&)>); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_SCROLLABLESIGNAL( Dali, Signal< void(const Dali::Vector2&)>); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_SCROLLVIEWSIGNAL( Dali, Signal< void(const Dali::Toolkit::ScrollView::SnapEvent&)>); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_SCROLLVIEWSIGNAL( Dali, Signal< void(const Dali::Toolkit::ScrollView::SnapEvent&)>); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_SLIDERVALUECHANGEDSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_SLIDERVALUECHANGEDSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_SLIDERMARKCHANGEDSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_SLIDERMARKCHANGEDSIGNAL( Dali, Signal); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_STAGESIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_STAGESIGNAL( Dali, Signal); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_STYLECHANGEDSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_STYLECHANGEDSIGNAL( Dali, Signal); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TAPGESTURESIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TAPGESTURESIGNAL( Dali, Signal); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TEXTEDITORSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TEXTEDITORSIGNAL( Dali, Signal); + +DALI_CREATE_CUSTOM_DESTRUCTOR_FUNCTION_TEXTFIELDSIGNAL( Dali, Signal); +DALI_CREATE_CUSTOM_DISPOSE_FUNCTION_TEXTFIELDSIGNAL( Dali, Signal); diff --git a/plugins/dali-swig/SWIG/dali.i b/plugins/dali-swig/SWIG/dali.i index 3659b21..fdcd4b2 100755 --- a/plugins/dali-swig/SWIG/dali.i +++ b/plugins/dali-swig/SWIG/dali.i @@ -25,6 +25,7 @@ #endif %include exception.i +%include dali-gc.i %exception { try { diff --git a/plugins/dali-swig/SWIG/events/application-event.i b/plugins/dali-swig/SWIG/events/application-event.i index 69fdb2b..b6acb9d 100644 --- a/plugins/dali-swig/SWIG/events/application-event.i +++ b/plugins/dali-swig/SWIG/events/application-event.i @@ -927,7 +927,7 @@ } } - private static Application instance; // singleton + private static Application _instance; // singleton public delegate void InitDelegate(); @@ -984,6 +984,14 @@ // instance.InitDelegate(); } + public static Application Instance + { + get + { + return _instance; + } + } + public static Application GetApplicationFromPtr(global::System.IntPtr cPtr) { Application ret = new Application(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -999,11 +1007,13 @@ } public static Application NewApplication() { - return NewApplication("",Application.WINDOW_MODE.OPAQUE); + _instance = NewApplication("", Application.WINDOW_MODE.OPAQUE); + return _instance; } public static Application NewApplication(string stylesheet) { - return NewApplication(stylesheet, Application.WINDOW_MODE.OPAQUE); + _instance = NewApplication(stylesheet, Application.WINDOW_MODE.OPAQUE); + return _instance; } public static Application NewApplication(string stylesheet, Application.WINDOW_MODE windowMode) { @@ -1014,10 +1024,19 @@ // we've got an application now connect the signals ret.SetupDelegates(); // set the singleton - + _instance = ret; return ret; } + public bool AddIdle(System.Delegate func) { + System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); + System.IntPtr ip2 = NDalicManualPINVOKE.MakeCallback(new System.Runtime.InteropServices.HandleRef(this, ip)); + + bool ret = NDalicPINVOKE.Application_AddIdle(swigCPtr, new System.Runtime.InteropServices.HandleRef(this, ip2)); + + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } %} %enddef diff --git a/plugins/dali-swig/manual/cpp/callbackbase_wrap.cpp b/plugins/dali-swig/manual/cpp/callbackbase_wrap.cpp new file mode 100644 index 0000000..6b925d4 --- /dev/null +++ b/plugins/dali-swig/manual/cpp/callbackbase_wrap.cpp @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2016 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. + * + */ + +#ifndef CSHARP_CALLBACK_BASE +#define CSHARP_CALLBACK_BASE +#endif + +#include "common.h" + +#ifdef __cplusplus +extern "C" { +#endif + +SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_MakeCallback(void * jarg1) { + void * jresult ; + void (*arg1)(void) = (void (*)(void)) 0 ; + Dali::CallbackBase *result = 0 ; + + arg1 = (void (*)(void))jarg1; + { + try { + result = (Dali::CallbackBase *)Dali::MakeCallback(arg1); + } catch (std::out_of_range& e) { + { + SWIG_CSharpException(SWIG_IndexError, const_cast(e.what())); return 0; + }; + } catch (std::exception& e) { + { + SWIG_CSharpException(SWIG_RuntimeError, const_cast(e.what())); return 0; + }; + } catch (...) { + { + SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0; + }; + } + } + + jresult = (void *)result; + + return jresult; +} + +#ifdef __cplusplus +} +#endif + diff --git a/plugins/dali-swig/manual/csharp/DisposeQueue.cs b/plugins/dali-swig/manual/csharp/DisposeQueue.cs new file mode 100644 index 0000000..a62843b --- /dev/null +++ b/plugins/dali-swig/manual/csharp/DisposeQueue.cs @@ -0,0 +1,60 @@ +// Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved +// PROPRIETARY/CONFIDENTIAL +// This software is the confidential and proprietary +// information of SAMSUNG ELECTRONICS ("Confidential Information"). You shall +// not disclose such Confidential Information and shall use it only in +// accordance with the terms of the license agreement you entered into with +// SAMSUNG ELECTRONICS. +// + +using System; +using System.Collections.Generic; + +namespace Dali +{ + + public class DisposeQueue + { + private static DisposeQueue _disposableQueue = new DisposeQueue(); + private List _disposables = new List(); + private Object _listLock = new object(); + private delegate int ProcessDisposablesDelegate(IntPtr ptr); + private ProcessDisposablesDelegate _disposequeueProcessDisposablesDelegate; + + private DisposeQueue() + { + _disposequeueProcessDisposablesDelegate = new ProcessDisposablesDelegate(ProcessDisposables); + Application.Instance.AddIdle(_disposequeueProcessDisposablesDelegate); + } + + ~DisposeQueue() + { + } + + public static DisposeQueue Instance + { + get { return _disposableQueue; } + } + + public void Add(IDisposable disposable) + { + lock(_listLock) + { + _disposables.Add(disposable); + } + } + + private int ProcessDisposables(IntPtr ptr) + { + lock(_listLock) + { + foreach (IDisposable disposable in _disposables) + { + disposable.Dispose(); + } + _disposables.Clear(); + } + return 0; + } + } +} diff --git a/plugins/dali-swig/manual/csharp/KeyboardFocusManager.cs b/plugins/dali-swig/manual/csharp/KeyboardFocusManager.cs index 6509966..4051b36 100644 --- a/plugins/dali-swig/manual/csharp/KeyboardFocusManager.cs +++ b/plugins/dali-swig/manual/csharp/KeyboardFocusManager.cs @@ -32,10 +32,15 @@ public class KeyboardFocusManager : BaseHandle { } ~KeyboardFocusManager() { - 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) { if (swigCMemOwn) { diff --git a/plugins/dali-swig/manual/csharp/KeyboardPreFocusChangeSignal.cs b/plugins/dali-swig/manual/csharp/KeyboardPreFocusChangeSignal.cs index 5980e96..949dfb8 100644 --- a/plugins/dali-swig/manual/csharp/KeyboardPreFocusChangeSignal.cs +++ b/plugins/dali-swig/manual/csharp/KeyboardPreFocusChangeSignal.cs @@ -35,10 +35,15 @@ public class KeyboardPreFocusChangeSignal : global::System.IDisposable { } ~KeyboardPreFocusChangeSignal() { - Dispose(); + DisposeQueue.Instance.Add(this); } public virtual void Dispose() { + if (!Stage.IsInstalled()) { + DisposeQueue.Instance.Add(this); + return; + } + lock(this) { if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { diff --git a/plugins/dali-swig/manual/csharp/ManualPINVOKE.cs b/plugins/dali-swig/manual/csharp/ManualPINVOKE.cs index 782ad37..d39ebcb 100644 --- a/plugins/dali-swig/manual/csharp/ManualPINVOKE.cs +++ b/plugins/dali-swig/manual/csharp/ManualPINVOKE.cs @@ -183,5 +183,9 @@ namespace Dali [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_ViewWrapperImpl_ApplyThemeStyle")] public static extern void ViewWrapperImpl_ApplyThemeStyle(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_MakeCallback")] + public static extern global::System.IntPtr MakeCallback(global::System.Runtime.InteropServices.HandleRef jarg1); + } }