INTERNAL_NUGET_VERSION=5.0.0.999
# RPM Version Suffix
-RPM_VERSION_SUFFIX=nui83
+RPM_VERSION_SUFFIX=nui500
// Callback for Application InitSignal
private void OnApplicationInit(IntPtr data)
{
+ if (Version.DaliVersionMatchWithNUI() == false)
+ {
+ Tizen.Log.Fatal("NUI", "Dali and NUI are version mismatched!");
+ }
+
// Initialize DisposeQueue Singleton class. This is also required to create DisposeQueue on main thread.
DisposeQueue.Instance.Initialize();
internal class NUILog
{
- [Conditional("DEBUG_ON")]
+ //[Conditional("DEBUG_ON")]
public static void Debug(string msg,
[CallerLineNumber] int lineNum = 0,
[CallerMemberName] string caller = null,
public Texture GetColorTexture()
{
- //to fix memory leak issue, match the handle count with native side.
- global::System.IntPtr cPtr = NDalicPINVOKE.FrameBuffer_GetColorTexture(swigCPtr);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- Texture ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Texture;
- NDalicPINVOKE.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ Texture texture = new Texture(NDalicPINVOKE.FrameBuffer_GetColorTexture(swigCPtr), true);
+ Texture ret = Registry.GetManagedBaseHandleFromNativePtr(texture) as Texture;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_ImageView_IMAGE_VISUAL_ACTION_STOP_get")]
public static extern int ImageView_IMAGE_VISUAL_ACTION_STOP_get();
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_NUI_InternalAPIVersionCheck")]
+ public static extern bool InternalAPIVersionCheck(ref int ver1, ref int ver2, ref int ver3);
+
}
}
public static extern uint GetMaxTextureSize();
}
-}
+}
*/
using System;
-using System.Collections.Generic;
+using System.Collections.Concurrent;
using System.Threading;
namespace Tizen.NUI
/// Given a C++ object, the dictionary allows us to find which C# object it belongs to.
/// By keeping the weak reference only, it will allow the object to be garbage collected.
/// </summary>
- private Dictionary<IntPtr, WeakReference> _controlMap;
+ private ConcurrentDictionary<IntPtr, WeakReference> _controlMap;
private Registry()
{
- _controlMap = new Dictionary<IntPtr, WeakReference>();
+ _controlMap = new ConcurrentDictionary<IntPtr, WeakReference>();
}
/// <param name="baseHandle">The instance of BaseHandle (C# base class).</param>
internal static void Register(BaseHandle baseHandle)
{
-
// We store a pointer to the RefObject for the control
RefObject refObj = baseHandle.GetObjectPtr();
IntPtr refCptr = (IntPtr)RefObject.getCPtr(refObj);
- //NUILog.Debug("Storing ref object cptr in control map Hex: {0:X}" + refCptr);
+ RegistryCurrentThreadCheck();
- if (!Instance._controlMap.ContainsKey(refCptr))
+ if(Instance._controlMap.TryAdd(refCptr, new WeakReference(baseHandle, false)) != true)
{
- Instance._controlMap.Add(refCptr, new WeakReference(baseHandle, false));
+ NUILog.Debug("refCptr is already exist! OR something wrong!");
}
return;
RefObject refObj = baseHandle.GetObjectPtr();
IntPtr refCptr = (IntPtr)RefObject.getCPtr(refObj);
- if (Instance._controlMap.ContainsKey(refCptr))
+ RegistryCurrentThreadCheck();
+
+ WeakReference removeTarget;
+ if(Instance._controlMap.TryRemove(refCptr, out removeTarget) != true)
{
- Instance._controlMap.Remove(refCptr);
+ NUILog.Debug("something wrong when removing refCptr!");
}
return;
RefObject refObj = baseHandle.GetObjectPtr();
IntPtr refObjectPtr = (IntPtr)RefObject.getCPtr(refObj);
- if (refObjectPtr != null)
- {
// we store a dictionary of ref-obects (C++ land) to managed obects (C# land)
return GetManagedBaseHandleFromRefObject(refObjectPtr);
}
- else
- {
- NUILog.Error("NUI Registry RefObjectPtr is NULL!");
- return null;
- }
- }
internal static BaseHandle GetManagedBaseHandleFromNativePtr(IntPtr cPtr)
{
IntPtr refObjectPtr = NDalicPINVOKE.GetRefObjectPtr(cPtr);
- if (refObjectPtr != null)
- {
// we store a dictionary of ref-obects (C++ land) to managed obects (C# land)
return GetManagedBaseHandleFromRefObject(refObjectPtr);
}
- else
+
+ internal static BaseHandle GetManagedBaseHandleFromRefObject(IntPtr refObjectPtr)
+ {
+ if (refObjectPtr == global::System.IntPtr.Zero)
{
- NUILog.Error("NUI Registry RefObjectPtr is NULL!");
+ NUILog.Debug("Registry refObjectPtr is NULL! This means bind native object is NULL!");
return null;
}
+ else
+ {
+ NUILog.Debug($"refObjectPtr=0x{refObjectPtr.ToInt64():X}");
}
- internal static BaseHandle GetManagedBaseHandleFromRefObject(IntPtr refObjectPtr)
- {
+ RegistryCurrentThreadCheck();
+
// we store a dictionary of ref-obects (C++ land) to managed obects (C# land)
WeakReference weakReference;
if (Instance._controlMap.TryGetValue(refObjectPtr, out weakReference))
{
- if(weakReference == null) { throw new System.InvalidOperationException("Error! NUI Registry weakReference should not be NULL!"); }
+ if(weakReference == null)
+ {
+ throw new System.InvalidOperationException("Error! NUI Registry weakReference should not be NULL!");
+ }
+
BaseHandle ret = weakReference.Target as BaseHandle;
return ret;
}
}
}
+ private static void RegistryCurrentThreadCheck()
+ {
+ if(savedApplicationThread == null)
+ {
+ Tizen.Log.Fatal("NUI", $"Error! maybe main thread is created by other process ");
+ return;
+ }
+ int currentId = Thread.CurrentThread.ManagedThreadId;
+ int mainThreadId = savedApplicationThread.ManagedThreadId;
+
+ if(currentId != mainThreadId)
+ {
+ Tizen.Log.Fatal("NUI", $"Error! current thread({currentId}) which is NOT main thread({mainThreadId}) utilizes NUI object!");
+ }
+ }
+
+
}
}
*/
using System;
+using System.Diagnostics;
namespace Tizen.NUI
{
//This version should be updated and synced for every Dali native release
internal static class Version
{
- public const int daliVer1 = 1;
- public const int daliVer2 = 2;
- public const int daliVer3 = 83;
- public const int nuiVer1 = 1;
- public const int nuiVer2 = 2;
- public const int nuiVer3 = 83;
- public const string nuiRelease = "";
-
+ //dali_1.3.xx : NUI internal API version 500
+ public const int nuiAPIVer = 500;
+ public const int reservedVer1 = 0;
+ public const int reservedVer2 = 0;
static internal bool DaliVersionMatchWithNUI()
{
try
{
- if (NDalicManualPINVOKE.NativeVersionCheck(ref ver1, ref ver2, ref ver3))
+ if (NDalicManualPINVOKE.InternalAPIVersionCheck(ref ver1, ref ver2, ref ver3) == true)
{
- if (ver1 != daliVer1 || ver2 != daliVer2 || ver3 != daliVer3)
+ if (ver1 != nuiAPIVer)
{
- NUILog.Error($"Dali native version mismatch error! nui={ nuiVer1}.{ nuiVer2}.{ nuiVer3} but dali= { ver1 }.{ ver2}.{ ver3}");
- throw new System.InvalidOperationException($"Dali native version mismatch error! nui={ nuiVer1}.{ nuiVer2}.{ nuiVer3} but dali={ ver1 }.{ ver2}.{ ver3}");
+ NUILog.Error($"NUI API version mismatch error! NUI API Version: ({nuiAPIVer}) but read version from native: ({ver1}.{ver2}.{ver3})");
+ throw new System.InvalidOperationException($"NUI API version mismatch error! NUI API version should be ({nuiAPIVer}) but read version from native: ({ver1}.{ver2}.{ver3})");
}
}
else
{
- NUILog.Error($"Dali native version mismatch error! nui={ nuiVer1}.{ nuiVer2}.{ nuiVer3} but dali= { ver1 }.{ ver2}.{ ver3}");
- throw new System.InvalidOperationException($"Dali native version mismatch error! nui={ nuiVer1}.{ nuiVer2}.{ nuiVer3} but dali={ ver1 }.{ ver2}.{ ver3}");
+ NUILog.Error($"NUI API version mismatch error! NUI API Version: ({nuiAPIVer}) but read version from native: ({ver1}.{ver2}.{ver3})");
+ throw new System.InvalidOperationException($"NUI API version mismatch error! NUI API version should be ({nuiAPIVer}) but read version from native: ({ver1}.{ver2}.{ver3})");
}
}
catch (Exception)
{
- NUILog.Error($"Dali native version mismatch error! nui={ nuiVer1}.{ nuiVer2}.{ nuiVer3} but dali= { ver1 }.{ ver2}.{ ver3}");
- throw new System.InvalidOperationException($"Dali native version mismatch error! nui={ nuiVer1}.{ nuiVer2}.{ nuiVer3} but dali={ ver1 }.{ ver2}.{ ver3}");
+ NUILog.Error($"NUI API version mismatch error! NUI API Version: ({nuiAPIVer}) but read version from native: ({ver1}.{ver2}.{ver3})");
+ throw new System.InvalidOperationException($"NUI API version mismatch error! NUI API version should be ({nuiAPIVer}) but read version from native: ({ver1}.{ver2}.{ver3})");
}
- NUILog.Debug($"version info: nui={ nuiVer1}.{ nuiVer2}.{ nuiVer3}, dali= { ver1 }.{ ver2}.{ ver3}");
+
+ PrintDaliNativeVersion();
return true;
}
+
+ //[Conditional("DEBUG_ON")]
+ static private void PrintDaliNativeVersion()
+ {
+ int ver1 = -1;
+ int ver2 = -1;
+ int ver3 = -1;
+
+ NDalicManualPINVOKE.NativeVersionCheck(ref ver1, ref ver2, ref ver3);
+ NUILog.Debug($"DALi Version: ({ver1}.{ver2}.{ver3}), NUI API Version: ({nuiAPIVer})");
+ }
}
}
public VisualBase GetVisual(int index)
{
- //to fix memory leak issue, match the handle count with native side.
- System.IntPtr cPtr = NDalicManualPINVOKE.ViewWrapperImpl_GetVisual(swigCPtr, index);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- VisualBase ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as VisualBase;
- NDalicPINVOKE.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ VisualBase visualBase = new VisualBase(NDalicManualPINVOKE.ViewWrapperImpl_GetVisual(swigCPtr, index), true);
+ VisualBase ret = Registry.GetManagedBaseHandleFromNativePtr(visualBase) as VisualBase;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// <since_tizen> 3 </since_tizen>
public View GetChildAt(TableView.CellPosition position)
{
- //to fix memory leak issue, match the handle count with native side.
- IntPtr cPtr = NDalicPINVOKE.TableView_GetChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- NDalicPINVOKE.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ View view = new View(NDalicPINVOKE.TableView_GetChildAt(swigCPtr, TableView.CellPosition.getCPtr(position)), true, true);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(view) as View;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// <since_tizen> 3 </since_tizen>
public View RemoveChildAt(TableView.CellPosition position)
{
- //to fix memory leak issue, match the handle count with native side.
- IntPtr cPtr = NDalicPINVOKE.TableView_RemoveChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- NDalicPINVOKE.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ View view = new View(NDalicPINVOKE.TableView_RemoveChildAt(swigCPtr, TableView.CellPosition.getCPtr(position)), true, true);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(view) as View;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
+ internal View(global::System.IntPtr cPtr, bool cMemoryOwn, bool ignore) : base(NDalicPINVOKE.View_SWIGUpcast(cPtr), cMemoryOwn)
+ {
+ swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
+ }
+
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj)
{
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
Children.Add(child);
+ child.SetParent(this);
}
}
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
Children.Remove(child);
+ child.SetParent(null);
}
/// <summary>
/// <since_tizen> 4 </since_tizen>
protected override Container GetParent()
{
- //to fix memory leak issue, match the handle count with native side.
- IntPtr cPtr = NDalicPINVOKE.Actor_GetParent(swigCPtr);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- BaseHandle basehandle = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle);
- NDalicPINVOKE.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
-
- if (NDalicPINVOKE.SWIGPendingException.Pending)
- throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
- return basehandle as Container;
+ return Parent;
}
internal bool IsTopLevelView()
/// <since_tizen> 5 </since_tizen>
public Layer GetLayer()
{
- //to fix memory leak issue, match the handle count with native side.
- IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- Layer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Layer;
- NDalicPINVOKE.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ Layer layer = new Layer(NDalicPINVOKE.Actor_GetLayer(swigCPtr), true);
+ Layer ret = Registry.GetManagedBaseHandleFromNativePtr(layer) as Layer;
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// <since_tizen> 3 </since_tizen>
public View FindChildByName(string viewName)
{
- //to fix memory leak issue, match the handle count with native side.
- IntPtr cPtr = NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- NDalicPINVOKE.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ View view = new View(NDalicPINVOKE.Actor_FindChildByName(swigCPtr, viewName), true, true);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(view) as View;
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
internal View FindChildById(uint id)
{
- //to fix memory leak issue, match the handle count with native side.
- IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- NDalicPINVOKE.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ View view = new View(NDalicPINVOKE.Actor_FindChildById(swigCPtr, id), true, true);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(view) as View;
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
/// <since_tizen> 3 </since_tizen>
public Renderer GetRendererAt(uint index)
{
- //to fix memory leak issue, match the handle count with native side.
- IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Renderer;
- NDalicPINVOKE.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ Renderer renderer = new Renderer(NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index), true);
+ Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(renderer) as Renderer;
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
{
private List<View> _childViews = new List<View>();
+ private Container _parent = null;
/// <summary>
/// List of children of Container.
base.Dispose(type);
}
+ /// <summary>
+ /// This should be implemented in derived child classes such as View and Layer
+ /// </summary>
+ /// <returns>parent object of mine, which will be Container class</returns>
protected abstract Container GetParent();
/// <summary>
{
get
{
- return GetParent();
+ return _parent;
}
}
+ internal void SetParent(Container parent)
+ {
+ _parent = parent;
+ }
+
/// <summary>
/// Gets the number of children for this container.
/// Read only
/// <since_tizen> 3 </since_tizen>
public View GetCurrentFocusView()
{
- //to fix memory leak issue, match the handle count with native side.
- IntPtr cPtr = NDalicManualPINVOKE.FocusManager_GetCurrentFocusActor(swigCPtr);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- NDalicPINVOKE.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ View view = new View(NDalicManualPINVOKE.FocusManager_GetCurrentFocusActor(swigCPtr), true, true);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(view) as View;
return ret;
}
/// <since_tizen> 3 </since_tizen>
public View GetFocusGroup(View view)
{
- //to fix memory leak issue, match the handle count with native side.
- IntPtr cPtr = NDalicManualPINVOKE.FocusManager_GetFocusGroup(swigCPtr, View.getCPtr(view));
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- NDalicPINVOKE.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ View localView = new View(NDalicManualPINVOKE.FocusManager_GetFocusGroup(swigCPtr, View.getCPtr(view)), true, true);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(localView) as View;
return ret;
}
internal View GetFocusIndicatorView()
{
- //to fix memory leak issue, match the handle count with native side.
- IntPtr cPtr = NDalicManualPINVOKE.FocusManager_GetFocusIndicatorActor(swigCPtr);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- NDalicPINVOKE.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ View view = new View(NDalicManualPINVOKE.FocusManager_GetFocusIndicatorActor(swigCPtr), true, true);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(view) as View;
return ret;
}
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
Children.Add(child);
+ child.SetParent(this);
}
}
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
Children.Remove(child);
+ child.SetParent(null);
}
/// <summary>
}
}
+ /// <summary>
+ /// protected override method derived from Container abstract parent class
+ /// </summary>
+ /// <returns>always return null, because in NUI, Layer can be added under Window</returns>
protected override Container GetParent()
{
return null;
/// <since_tizen> 3 </since_tizen>
public View FindChildById(uint id)
{
- //to fix memory leak issue, match the handle count with native side.
- IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- NDalicPINVOKE.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ View view = new View(NDalicPINVOKE.Actor_FindChildById(swigCPtr, id), true, true);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(view) as View;
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
internal View GetTitle()
{
- //to fix memory leak issue, match the handle count with native side.
- IntPtr cPtr = NDalicPINVOKE.Popup_GetTitle(swigCPtr);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- NDalicPINVOKE.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ View view = new View(NDalicPINVOKE.Popup_GetTitle(swigCPtr), true, true);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(view) as View;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
internal View GetContent()
{
- //to fix memory leak issue, match the handle count with native side.
- IntPtr cPtr = NDalicPINVOKE.Popup_GetContent(swigCPtr);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- NDalicPINVOKE.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ View view = new View(NDalicPINVOKE.Popup_GetContent(swigCPtr), true, true);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(view) as View;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
internal View GetFooter()
{
- //to fix memory leak issue, match the handle count with native side.
- IntPtr cPtr = NDalicPINVOKE.Popup_GetFooter(swigCPtr);
- HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
- View ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as View;
- NDalicPINVOKE.delete_BaseHandle(CPtr);
- CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
+ View view = new View(NDalicPINVOKE.Popup_GetFooter(swigCPtr), true, true);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(view) as View;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
/// </summary>
/// <param name="transparent">Whether the window is transparent.</param>
/// <since_tizen> 5 </since_tizen>
- public void SetTransparency(bool transparent) {
+ public void SetTransparency(bool transparent)
+ {
NDalicManualPINVOKE.SetTransparency(swigCPtr, transparent);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}