- Ensure to get 'already registered, or create new one' what we get item from DALi engine
- Let we also ensure create only one items if we use static ::Get() API
- Do not register to Registry if we copy the reference.
- Remove some useless copy constructor.
- Do not register to Registry if we create empty object.
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
public static KeyInputFocusManager Get()
{
- KeyInputFocusManager ret = new KeyInputFocusManager(Interop.KeyInputFocusManager.Get(), true);
+ global::System.IntPtr cPtr = Interop.KeyInputFocusManager.Get();
+
+ KeyInputFocusManager ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as KeyInputFocusManager;
+ if (ret != null)
+ {
+ object dummyObect = new object();
+
+ global::System.Runtime.InteropServices.HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(dummyObect, cPtr);
+ Interop.BaseHandle.DeleteBaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+ else
+ {
+ ret = new KeyInputFocusManager(cPtr, true);
+ }
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
return ret;
}
- internal LinearConstrainer(LinearConstrainer handle) : this(Interop.LinearConstrainer.NewLinearConstrainer(LinearConstrainer.getCPtr(handle)), true)
- {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
internal LinearConstrainer Assign(LinearConstrainer rhs)
{
LinearConstrainer ret = new LinearConstrainer(Interop.LinearConstrainer.Assign(SwigCPtr, LinearConstrainer.getCPtr(rhs)), false);
{
internal class ObjectRegistry : BaseHandle
{
- internal ObjectRegistry(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ internal ObjectRegistry(global::System.IntPtr cPtr, bool cMemoryOwn) : this(cPtr, cMemoryOwn, cMemoryOwn)
+ {
+ }
+
+ internal ObjectRegistry(global::System.IntPtr cPtr, bool cMemoryOwn, bool cRegister) : base(cPtr, cMemoryOwn, cRegister)
{
}
}
- public ObjectRegistry() : this(Interop.ObjectRegistry.NewObjectRegistry(), true)
- {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- public ObjectRegistry(ObjectRegistry handle) : this(Interop.ObjectRegistry.NewObjectRegistry(ObjectRegistry.getCPtr(handle)), true)
+ public ObjectRegistry() : this(Interop.ObjectRegistry.NewObjectRegistry(), true, false)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
return ret;
}
- internal PathConstrainer(PathConstrainer handle) : this(Interop.PathConstrainer.NewPathConstrainer(PathConstrainer.getCPtr(handle)), true)
- {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
internal PathConstrainer Assign(PathConstrainer rhs)
{
PathConstrainer ret = new PathConstrainer(Interop.PathConstrainer.Assign(SwigCPtr, PathConstrainer.getCPtr(rhs)), false);
return ret;
}
- /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public RenderTaskList(RenderTaskList handle) : this(Interop.RenderTask.NewRenderTaskList(RenderTaskList.getCPtr(handle)), true)
- {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- public RenderTaskList Assign(RenderTaskList rhs)
+ internal RenderTaskList Assign(RenderTaskList rhs)
{
RenderTaskList ret = new RenderTaskList(Interop.RenderTask.RenderTaskListAssign(SwigCPtr, RenderTaskList.getCPtr(rhs)), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
internal PathConstrainer GetPathConstrainer(string pathConstrainerName)
{
- PathConstrainer ret = new PathConstrainer(Interop.Builder.GetPathConstrainer(SwigCPtr, pathConstrainerName), true);
+ global::System.IntPtr cPtr = Interop.Builder.GetPathConstrainer(SwigCPtr, pathConstrainerName);
+
+ PathConstrainer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as PathConstrainer;
+ if (ret != null)
+ {
+ global::System.Runtime.InteropServices.HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ Interop.BaseHandle.DeleteBaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+ else
+ {
+ ret = new PathConstrainer(cPtr, true);
+ }
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal LinearConstrainer GetLinearConstrainer(string linearConstrainerName)
{
- LinearConstrainer ret = new LinearConstrainer(Interop.Builder.GetLinearConstrainer(SwigCPtr, linearConstrainerName), true);
+ global::System.IntPtr cPtr = Interop.Builder.GetLinearConstrainer(SwigCPtr, linearConstrainerName);
+
+ LinearConstrainer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as LinearConstrainer;
+ if (ret != null)
+ {
+ global::System.Runtime.InteropServices.HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ Interop.BaseHandle.DeleteBaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+ else
+ {
+ ret = new LinearConstrainer(cPtr, true);
+ }
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal static AccessibilityManager Get()
{
- AccessibilityManager ret = new AccessibilityManager(Interop.AccessibilityManager.Get(), true);
+ global::System.IntPtr cPtr = Interop.AccessibilityManager.Get();
+
+ AccessibilityManager ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as AccessibilityManager;
+ if (ret != null)
+ {
+ object dummyObect = new object();
+
+ global::System.Runtime.InteropServices.HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(dummyObect, cPtr);
+ Interop.BaseHandle.DeleteBaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+ else
+ {
+ ret = new AccessibilityManager(cPtr, true);
+ }
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// Create a property condition instance.
/// </summary>
/// <since_tizen> 4 </since_tizen>
- public PropertyCondition() : this(Interop.PropertyCondition.NewPropertyCondition(), true)
+ public PropertyCondition() : this(Interop.PropertyCondition.NewPropertyCondition(), true, false)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- internal PropertyCondition(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ internal PropertyCondition(global::System.IntPtr cPtr, bool cMemoryOwn) : this(cPtr, cMemoryOwn, cMemoryOwn)
+ {
+ }
+
+ internal PropertyCondition(global::System.IntPtr cPtr, bool cMemoryOwn, bool cRegister) : base(cPtr, cMemoryOwn, cRegister)
{
}
/// Create a instance of PropertyNotification.
/// </summary>
/// <since_tizen> 4 </since_tizen>
- public PropertyNotification() : this(Interop.PropertyNotification.NewPropertyNotification(), true)
+ public PropertyNotification() : this(Interop.PropertyNotification.NewPropertyNotification(), true, false)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// Create a instance of PropertyNotification.
/// </summary>
/// <since_tizen> 4 </since_tizen>
- public PropertyNotification(PropertyNotification handle) : this(Interop.PropertyNotification.NewPropertyNotification(PropertyNotification.getCPtr(handle)), true)
+ public PropertyNotification(PropertyNotification handle) : this(Interop.PropertyNotification.NewPropertyNotification(PropertyNotification.getCPtr(handle)), true, false)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- internal PropertyNotification(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ internal PropertyNotification(global::System.IntPtr cPtr, bool cMemoryOwn) : this(cPtr, cMemoryOwn, cMemoryOwn)
+ {
+ }
+
+ internal PropertyNotification(global::System.IntPtr cPtr, bool cMemoryOwn, bool cRegister) : base(cPtr, cMemoryOwn, cRegister)
{
}
/// <since_tizen> 4 </since_tizen>
public PropertyCondition GetCondition()
{
- PropertyCondition ret = new PropertyCondition(Interop.PropertyNotification.GetCondition(SwigCPtr), true);
+ global::System.IntPtr cPtr = Interop.PropertyNotification.GetCondition(SwigCPtr);
+
+ PropertyCondition ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as PropertyCondition;
+ if (ret != null)
+ {
+ global::System.Runtime.InteropServices.HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ Interop.BaseHandle.DeleteBaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+ else
+ {
+ ret = new PropertyCondition(cPtr, true);
+ }
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// </summary>
/// <since_tizen> 3 </since_tizen>
[Obsolete("Deprecated in API9, will be removed in API11. Use ThemeManager instead.")]
- public StyleManager() : this(Interop.StyleManager.NewStyleManager(), true)
+ public StyleManager() : this(Interop.StyleManager.NewStyleManager(), true, false)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
[Obsolete("Deprecated in API9, will be removed in API11. Use ThemeManager instead.")]
public static StyleManager Get()
{
- StyleManager ret = new StyleManager(Interop.StyleManager.Get(), true);
+ global::System.IntPtr cPtr = Interop.StyleManager.Get();
+
+ StyleManager ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as StyleManager;
+ if (ret != null)
+ {
+ object dummyObect = new object();
+
+ HandleRef CPtr = new HandleRef(dummyObect, cPtr);
+ Interop.BaseHandle.DeleteBaseHandle(CPtr);
+ CPtr = new HandleRef(null, global::System.IntPtr.Zero);
+ }
+ else
+ {
+ ret = new StyleManager(cPtr, true);
+ }
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
return ret;
}
- internal StyleManager(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ internal StyleManager(global::System.IntPtr cPtr, bool cMemoryOwn) : this(cPtr, cMemoryOwn, cMemoryOwn)
+ {
+ }
+
+ internal StyleManager(global::System.IntPtr cPtr, bool cMemoryOwn, bool cRegister) : base(cPtr, cMemoryOwn, cRegister)
{
}
/// Creates TypeInfo object.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public TypeInfo() : this(Interop.TypeInfo.NewTypeInfo(), true)
+ public TypeInfo() : this(Interop.TypeInfo.NewTypeInfo(), true, false)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
[EditorBrowsable(EditorBrowsableState.Never)]
public class TypeRegistry : BaseHandle
{
+ internal TypeRegistry(global::System.IntPtr cPtr, bool cMemoryOwn) : this(cPtr, cMemoryOwn, cMemoryOwn)
+ {
+ }
- internal TypeRegistry(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ internal TypeRegistry(global::System.IntPtr cPtr, bool cMemoryOwn, bool cRegister) : base(cPtr, cMemoryOwn, cRegister)
{
}
[EditorBrowsable(EditorBrowsableState.Never)]
public static TypeRegistry Get()
{
- TypeRegistry ret = new TypeRegistry(Interop.TypeRegistry.Get(), true);
+ global::System.IntPtr cPtr = Interop.TypeRegistry.Get();
+
+ TypeRegistry ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as TypeRegistry;
+ if (ret != null)
+ {
+ object dummyObect = new object();
+
+ global::System.Runtime.InteropServices.HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(dummyObect, cPtr);
+ Interop.BaseHandle.DeleteBaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+ else
+ {
+ ret = new TypeRegistry(cPtr, true);
+ }
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public TypeRegistry() : this(Interop.TypeRegistry.NewTypeRegistry(), true)
+ public TypeRegistry() : this(Interop.TypeRegistry.NewTypeRegistry(), true, false)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- internal TypeRegistry(TypeRegistry handle) : this(Interop.TypeRegistry.NewTypeRegistry(TypeRegistry.getCPtr(handle)), true)
+ internal TypeRegistry(TypeRegistry handle) : this(Interop.TypeRegistry.NewTypeRegistry(TypeRegistry.getCPtr(handle)), true, false)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
[EditorBrowsable(EditorBrowsableState.Never)]
public Tizen.NUI.TypeInfo GetTypeInfo(string uniqueTypeName)
{
- Tizen.NUI.TypeInfo ret = new Tizen.NUI.TypeInfo(Interop.TypeRegistry.GetTypeInfo(SwigCPtr, uniqueTypeName), true);
+ global::System.IntPtr cPtr = Interop.TypeRegistry.GetTypeInfo(SwigCPtr, uniqueTypeName);
+
+ Tizen.NUI.TypeInfo ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Tizen.NUI.TypeInfo;
+ if (ret != null)
+ {
+ global::System.Runtime.InteropServices.HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ Interop.BaseHandle.DeleteBaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+ else
+ {
+ ret = new Tizen.NUI.TypeInfo(cPtr, true);
+ }
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- internal Hover(Hover other) : this(Interop.Hover.NewHover(Hover.getCPtr(other)), true)
- {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
internal Hover(global::System.IntPtr cPtr, bool cMemoryOwn) : this(cPtr, cMemoryOwn, cMemoryOwn)
{
}
/// Calling member functions with an uninitialized touch handle is not allowed.<br />
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public Touch() : this(Interop.Touch.NewTouch(), true)
- {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- internal Touch(Touch other) : this(Interop.Touch.NewTouch(Touch.getCPtr(other)), true)
+ public Touch() : this(Interop.Touch.NewTouch(), true, false)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
mCachedBuffer = buffer;
}
- internal EncodedImageBuffer(EncodedImageBuffer handle) : this(Interop.EncodedImageBuffer.NewEncodedImageBuffer(EncodedImageBuffer.getCPtr(handle)), true)
- {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
internal EncodedImageBuffer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
}
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- internal PixelBuffer(PixelBuffer handle) : this(Interop.PixelBuffer.NewPixelBuffer(PixelBuffer.getCPtr(handle)), true)
+ internal PixelBuffer(PixelBuffer handle) : this(Interop.PixelBuffer.NewPixelBuffer(PixelBuffer.getCPtr(handle)), true, false)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- internal AutofillContainer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ internal AutofillContainer(global::System.IntPtr cPtr, bool cMemoryOwn) : this(cPtr, cMemoryOwn, cMemoryOwn)
{
}
- internal AutofillContainer(AutofillContainer autofillContainer) : this(Interop.AutofillContainer.NewAutofillContainer(AutofillContainer.getCPtr(autofillContainer)), true)
+ internal AutofillContainer(global::System.IntPtr cPtr, bool cMemoryOwn, bool cRegister) : base(cPtr, cMemoryOwn, cRegister)
+ {
+ }
+
+ internal AutofillContainer(AutofillContainer autofillContainer) : this(Interop.AutofillContainer.NewAutofillContainer(AutofillContainer.getCPtr(autofillContainer)), true, false)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- internal FontClient(FontClient handle) : this(Interop.FontClient.NewFontClient(FontClient.getCPtr(handle)), true)
- {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
internal static uint DefaultPointSize
{
get
internal static FontClient Get()
{
- FontClient ret = new FontClient(Interop.FontClient.Get(), true);
+ global::System.IntPtr cPtr = Interop.FontClient.Get();
+
+ FontClient ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as FontClient;
+ if (ret != null)
+ {
+ object dummyObect = new object();
+
+ global::System.Runtime.InteropServices.HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(dummyObect, cPtr);
+ Interop.BaseHandle.DeleteBaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+ else
+ {
+ ret = new FontClient(cPtr, true);
+ }
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private static readonly TTSPlayer instance = TTSPlayer.Get();
private StateChangedEventCallbackType stateChangedEventCallback;
- internal TTSPlayer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(Interop.TtsPlayer.Upcast(cPtr), cMemoryOwn)
+ internal TTSPlayer(global::System.IntPtr cPtr, bool cMemoryOwn) : this(cPtr, cMemoryOwn, cMemoryOwn)
{
}
- internal TTSPlayer() : this(Interop.TtsPlayer.NewTtsPlayer(), true)
+ internal TTSPlayer(global::System.IntPtr cPtr, bool cMemoryOwn, bool cRegister) : base(cPtr, cMemoryOwn, cRegister)
+ {
+ }
+
+ internal TTSPlayer() : this(Interop.TtsPlayer.NewTtsPlayer(), true, false)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- internal TTSPlayer(TTSPlayer handle) : this(Interop.TtsPlayer.NewTtsPlayer(TTSPlayer.getCPtr(handle)), true)
+ internal TTSPlayer(TTSPlayer handle) : this(Interop.TtsPlayer.NewTtsPlayer(TTSPlayer.getCPtr(handle)), true, false)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <since_tizen> 3 </since_tizen>
public static TTSPlayer Get(TTSMode mode)
{
- TTSPlayer ret = new TTSPlayer(Interop.TtsPlayer.Get((int)mode), true);
+ global::System.IntPtr cPtr = Interop.TtsPlayer.Get((int)mode);
+
+ TTSPlayer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as TTSPlayer;
+ if (ret != null)
+ {
+ object dummyObect = new object();
+
+ HandleRef CPtr = new HandleRef(dummyObect, cPtr);
+ Interop.BaseHandle.DeleteBaseHandle(CPtr);
+ CPtr = new HandleRef(null, global::System.IntPtr.Zero);
+ }
+ else
+ {
+ ret = new TTSPlayer(cPtr, true);
+ }
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <since_tizen> 3 </since_tizen>
public static TTSPlayer Get()
{
- TTSPlayer ret = new TTSPlayer(Interop.TtsPlayer.Get(), true);
+ global::System.IntPtr cPtr = Interop.TtsPlayer.Get();
+
+ TTSPlayer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as TTSPlayer;
+ if (ret != null)
+ {
+ object dummyObect = new object();
+
+ HandleRef CPtr = new HandleRef(dummyObect, cPtr);
+ Interop.BaseHandle.DeleteBaseHandle(CPtr);
+ CPtr = new HandleRef(null, global::System.IntPtr.Zero);
+ }
+ else
+ {
+ ret = new TTSPlayer(cPtr, true);
+ }
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
NUILog.Debug($"(0x{SwigCPtr.Handle:X}) Timer({milliSec}) Constructor!");
}
- internal Timer(Timer timer) : this(Interop.Timer.NewTimer(Timer.getCPtr(timer)), true)
+ internal Timer(Timer timer) : this(Interop.Timer.NewTimer(Timer.getCPtr(timer)), true, false)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- internal Timer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ internal Timer(global::System.IntPtr cPtr, bool cMemoryOwn) : this(cPtr, cMemoryOwn, cMemoryOwn)
+ {
+ }
+
+ internal Timer(global::System.IntPtr cPtr, bool cMemoryOwn, bool cRegister) : base(cPtr, cMemoryOwn, cRegister)
{
timerTickCallbackDelegate = OnTick;
timerTickCallbackOfNative = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate<System.Delegate>(timerTickCallbackDelegate);
/// Creates an empty visual handle.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public VisualBase() : this(Interop.VisualBase.NewVisualBase(), true)
+ public VisualBase() : this(Interop.VisualBase.NewVisualBase(), true, false)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- internal VisualBase(VisualBase handle) : this(Interop.VisualBase.NewVisualBase(VisualBase.getCPtr(handle)), true)
+ internal VisualBase(VisualBase handle) : this(Interop.VisualBase.NewVisualBase(VisualBase.getCPtr(handle)), true, false)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- internal VisualBase(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+
+ internal VisualBase(global::System.IntPtr cPtr, bool cMemoryOwn) : this(cPtr, cMemoryOwn, cMemoryOwn)
+ {
+ }
+
+ internal VisualBase(global::System.IntPtr cPtr, bool cMemoryOwn, bool cRegister) : base(cPtr, cMemoryOwn, cRegister)
{
}
/// </summary>
private static VisualFactory instance;
- internal VisualFactory(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ private VisualFactory(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
}
- internal VisualFactory() : this(Interop.VisualFactory.NewVisualFactory(), true)
+ private VisualFactory() : this(Interop.VisualFactory.NewVisualFactory(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
}
- internal WidgetView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ internal WidgetView(global::System.IntPtr cPtr, bool cMemoryOwn) : this(cPtr, cMemoryOwn, cMemoryOwn)
{
}
- internal WidgetView(WidgetView handle) : this(Interop.WidgetView.NewWidgetView(WidgetView.getCPtr(handle)), true)
+
+ internal WidgetView(global::System.IntPtr cPtr, bool cMemoryOwn, bool cRegister) : base(cPtr, cMemoryOwn, true, cRegister)
+ {
+ }
+
+ internal WidgetView(WidgetView handle) : this(Interop.WidgetView.NewWidgetView(WidgetView.getCPtr(handle)), true, false)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
internal ObjectRegistry GetObjectRegistry()
{
- ObjectRegistry ret = new ObjectRegistry(Interop.Stage.GetObjectRegistry(stageCPtr), true);
+ global::System.IntPtr cPtr = Interop.Stage.GetObjectRegistry(stageCPtr);
+
+ ObjectRegistry ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as ObjectRegistry;
+ if (ret != null)
+ {
+ global::System.Runtime.InteropServices.HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ Interop.BaseHandle.DeleteBaseHandle(CPtr);
+ CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ }
+ else
+ {
+ ret = new ObjectRegistry(cPtr, true);
+ }
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}