1- Making DownCast APIs backward compatible.
2- Making use of Registry instead of creating extra managed object.
3- Corrected conversion of Uint16Pair to Size2D.
4- using correct swigCpt in few APIs (eg Window_ResizedSignal)
Change-Id: Ib18446dbda2602757079145ae882c9b1fc075d08
public new static Alignment DownCast(BaseHandle handle)
{
- Alignment ret = new Alignment(NDalicPINVOKE.Alignment_DownCast(BaseHandle.getCPtr(handle)), true);
+ Alignment ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Alignment;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public static AsyncImageLoader DownCast(BaseHandle handle)
{
- AsyncImageLoader ret = new AsyncImageLoader(NDalicPINVOKE.AsyncImageLoader_DownCast(BaseHandle.getCPtr(handle)), true);
+ AsyncImageLoader ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as AsyncImageLoader;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
public new static BufferImage DownCast(BaseHandle handle)
{
- BufferImage ret = new BufferImage(NDalicPINVOKE.BufferImage_DownCast(BaseHandle.getCPtr(handle)), true);
+ BufferImage ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as BufferImage;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
return ret;
}
- public BaseHandle Create(string templateName)
+ public View Create(string templateName)
{
- BaseHandle ret = new BaseHandle(NDalicPINVOKE.Builder_Create__SWIG_0(swigCPtr, templateName), true);
+ View ret = new View(NDalicPINVOKE.Builder_Create__SWIG_0(swigCPtr, templateName), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
public new static Camera DownCast(BaseHandle handle)
{
- Camera ret = new Camera(NDalicPINVOKE.CameraActor_DownCast(BaseHandle.getCPtr(handle)), true);
+ Camera ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Camera;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public new static CustomActor DownCast(BaseHandle handle)
{
- CustomActor ret = new CustomActor(NDalicPINVOKE.CustomActor_DownCast(BaseHandle.getCPtr(handle)), true);
+ CustomActor ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as CustomActor;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
public new static EncodedBufferImage DownCast(BaseHandle handle)
{
- EncodedBufferImage ret = new EncodedBufferImage(NDalicPINVOKE.EncodedBufferImage_DownCast(BaseHandle.getCPtr(handle)), true);
+ EncodedBufferImage ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as EncodedBufferImage;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public Texture GetColorTexture()
{
- Texture ret = new Texture(NDalicPINVOKE.FrameBuffer_GetColorTexture(swigCPtr), true);
+ global::System.IntPtr cPtr = NDalicPINVOKE.FrameBuffer_GetColorTexture(swigCPtr);
+ Texture ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Texture;
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
public new static FrameBufferImage DownCast(BaseHandle handle)
{
- FrameBufferImage ret = new FrameBufferImage(NDalicPINVOKE.FrameBufferImage_DownCast(BaseHandle.getCPtr(handle)), true);
+ FrameBufferImage ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as FrameBufferImage;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public new static GaussianBlurView DownCast(BaseHandle handle)
{
- GaussianBlurView ret = new GaussianBlurView(NDalicPINVOKE.GaussianBlurView_DownCast(BaseHandle.getCPtr(handle)), true);
+ GaussianBlurView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as GaussianBlurView;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public new static GestureDetector DownCast(BaseHandle handle)
{
- GestureDetector ret = new GestureDetector(NDalicPINVOKE.GestureDetector_DownCast(BaseHandle.getCPtr(handle)), true);
+ GestureDetector ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as GestureDetector;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public static Image DownCast(BaseHandle handle)
{
- Image ret = new Image(NDalicPINVOKE.Image_DownCast(BaseHandle.getCPtr(handle)), true);
+ Image ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Image;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal new static ItemView DownCast(BaseHandle handle)
{
- ItemView ret = new ItemView(NDalicPINVOKE.ItemView_DownCast(BaseHandle.getCPtr(handle)), true);
+ ItemView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as ItemView;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
internal new static LinearConstrainer DownCast(BaseHandle handle)
{
- LinearConstrainer ret = new LinearConstrainer(NDalicPINVOKE.LinearConstrainer_DownCast(BaseHandle.getCPtr(handle)), true);
+ LinearConstrainer ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as LinearConstrainer;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
public new static LongPressGestureDetector DownCast(BaseHandle handle)
{
- LongPressGestureDetector ret = new LongPressGestureDetector(NDalicPINVOKE.LongPressGestureDetector_DownCast(BaseHandle.getCPtr(handle)), true);
+ LongPressGestureDetector ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as LongPressGestureDetector;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public new static Model3dView DownCast(BaseHandle handle)
{
- Model3dView ret = new Model3dView(NDalicPINVOKE.Model3dView_DownCast(BaseHandle.getCPtr(handle)), true);
+ Model3dView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Model3dView;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public new static NativeImage DownCast(BaseHandle handle)
{
- NativeImage ret = new NativeImage(NDalicPINVOKE.NativeImage_DownCast(BaseHandle.getCPtr(handle)), true);
+ NativeImage ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as NativeImage;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public new static PageTurnLandscapeView DownCast(BaseHandle handle)
{
- PageTurnLandscapeView ret = new PageTurnLandscapeView(NDalicPINVOKE.PageTurnLandscapeView_DownCast(BaseHandle.getCPtr(handle)), true);
+ PageTurnLandscapeView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as PageTurnLandscapeView;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public new static PageTurnPortraitView DownCast(BaseHandle handle)
{
- PageTurnPortraitView ret = new PageTurnPortraitView(NDalicPINVOKE.PageTurnPortraitView_DownCast(BaseHandle.getCPtr(handle)), true);
+ PageTurnPortraitView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as PageTurnPortraitView;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public new static PageTurnView DownCast(BaseHandle handle)
{
- PageTurnView ret = new PageTurnView(NDalicPINVOKE.PageTurnView_DownCast(BaseHandle.getCPtr(handle)), true);
+ PageTurnView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as PageTurnView;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
public new static PanGestureDetector DownCast(BaseHandle handle)
{
- PanGestureDetector ret = new PanGestureDetector(NDalicPINVOKE.PanGestureDetector_DownCast(BaseHandle.getCPtr(handle)), true);
+ PanGestureDetector ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as PanGestureDetector;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
public new static PathConstrainer DownCast(BaseHandle handle)
{
- PathConstrainer ret = new PathConstrainer(NDalicPINVOKE.PathConstrainer_DownCast(BaseHandle.getCPtr(handle)), true);
+ PathConstrainer ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as PathConstrainer;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
public new static PinchGestureDetector DownCast(BaseHandle handle)
{
- PinchGestureDetector ret = new PinchGestureDetector(NDalicPINVOKE.PinchGestureDetector_DownCast(BaseHandle.getCPtr(handle)), true);
+ PinchGestureDetector ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as PinchGestureDetector;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public static PropertyNotification DownCast(BaseHandle handle)
{
- PropertyNotification ret = new PropertyNotification(NDalicPINVOKE.PropertyNotification_DownCast(BaseHandle.getCPtr(handle)), true);
+ PropertyNotification ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as PropertyNotification;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public new static RenderTask DownCast(BaseHandle handle)
{
- RenderTask ret = new RenderTask(NDalicPINVOKE.RenderTask_DownCast(BaseHandle.getCPtr(handle)), true);
+ RenderTask ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as RenderTask;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public static RenderTaskList DownCast(BaseHandle handle)
{
- RenderTaskList ret = new RenderTaskList(NDalicPINVOKE.RenderTaskList_DownCast(BaseHandle.getCPtr(handle)), true);
+ RenderTaskList ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as RenderTaskList;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
public static ScrollViewPagePathEffect DownCast(BaseHandle handle)
{
- ScrollViewPagePathEffect ret = new ScrollViewPagePathEffect(NDalicPINVOKE.ScrollViewPagePathEffect_DownCast(BaseHandle.getCPtr(handle)), true);
+ ScrollViewPagePathEffect ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as ScrollViewPagePathEffect;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
public new static TapGestureDetector DownCast(BaseHandle handle)
{
- TapGestureDetector ret = new TapGestureDetector(NDalicPINVOKE.TapGestureDetector_DownCast(BaseHandle.getCPtr(handle)), true);
+ TapGestureDetector ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TapGestureDetector;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
get
{
global::System.IntPtr cPtr = NDalicPINVOKE.TouchPoint_hitActor_get(swigCPtr);
- View ret = (cPtr == global::System.IntPtr.Zero) ? null : new View(cPtr, false);
+ View ret = (cPtr == global::System.IntPtr.Zero) ? null : Registry.GetManagedBaseHandleFromRefObject(cPtr) as View;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private void SwigDirectorOnChildAdd(global::System.IntPtr child)
{
- OnChildAdd(new View(child, false));
+ View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;
+
+ if (view)
+ {
+ OnChildAdd(view);
+ }
}
private void SwigDirectorOnChildRemove(global::System.IntPtr child)
{
- OnChildRemove(new View(child, false));
+ View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;
+
+ if (view)
+ {
+ OnChildRemove(view);
+ }
}
private void SwigDirectorOnPropertySet(int index, global::System.IntPtr propertyValue)
private float SwigDirectorCalculateChildSize(global::System.IntPtr child, int dimension)
{
- return CalculateChildSize(new View(child, false), (DimensionType)dimension);
+ View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;
+ if (view)
+ {
+ return CalculateChildSize(view, (DimensionType)dimension);
+ }
+ return 0.0f;
}
private float SwigDirectorGetHeightForWidth(float width)
private void SwigDirectorOnControlChildAdd(global::System.IntPtr child)
{
- OnControlChildAdd(new View(child, false));
+ View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;
+ if (view)
+ {
+ OnControlChildAdd(view);
+ }
}
private void SwigDirectorOnControlChildRemove(global::System.IntPtr child)
{
- OnControlChildRemove(new View(child, false));
+ View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;
+ if (view)
+ {
+ OnControlChildRemove(view);
+ }
}
private void SwigDirectorOnStyleChange(global::System.IntPtr styleManager, int change)
{
- OnStyleChange(new StyleManager(styleManager, true), (StyleChangeType)change);
+ StyleManager stManager = Registry.GetManagedBaseHandleFromNativePtr(styleManager) as StyleManager;
+ if (stManager)
+ {
+ OnStyleChange(stManager, (StyleChangeType)change);
+ }
}
private bool SwigDirectorOnAccessibilityActivated()
private global::System.IntPtr SwigDirectorGetNextKeyboardFocusableView(global::System.IntPtr currentFocusedView, int direction, bool loopEnabled)
{
- return View.getCPtr(GetNextFocusableView(new View(currentFocusedView, true), (View.FocusDirection)direction, loopEnabled)).Handle;
+ return View.getCPtr(GetNextFocusableView(Registry.GetManagedBaseHandleFromNativePtr(currentFocusedView) as View, (View.FocusDirection)direction, loopEnabled)).Handle;
}
private void SwigDirectorOnKeyboardFocusChangeCommitted(global::System.IntPtr commitedFocusableView)
{
- OnFocusChangeCommitted(new View(commitedFocusableView, true));
+ OnFocusChangeCommitted(Registry.GetManagedBaseHandleFromNativePtr(commitedFocusableView) as View);
}
private bool SwigDirectorOnKeyboardEnter()
public VisualBase GetVisual(int index)
{
- VisualBase ret = new VisualBase(NDalicManualPINVOKE.ViewWrapperImpl_GetVisual(swigCPtr, index), true);
+ System.IntPtr cPtr = NDalicManualPINVOKE.ViewWrapperImpl_GetVisual(swigCPtr, index);
+ VisualBase ret = Registry.GetManagedBaseHandleFromRefObject(cPtr) as VisualBase;
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private void DirectorOnChildAdd(global::System.IntPtr child)
{
- OnChildAdd(new View(child, false));
+ View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;
+ if (view)
+ {
+ OnChildAdd(view);
+ }
}
private void DirectorOnChildRemove(global::System.IntPtr child)
{
- OnChildRemove(new View(child, false));
+ View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;
+ if (view)
+ {
+ OnChildRemove(view);
+ }
}
private void DirectorOnPropertySet(int index, global::System.IntPtr propertyValue)
private float DirectorCalculateChildSize(global::System.IntPtr child, int dimension)
{
- return CalculateChildSize(new View(child, false), (DimensionType)dimension);
+ View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;
+ if (view)
+ {
+ return CalculateChildSize(view, (DimensionType)dimension);
+ }
+ return 0.0f;
}
private float DirectorGetHeightForWidth(float width)
private void DirectorOnControlChildAdd(global::System.IntPtr child)
{
- OnControlChildAdd(new View(child, false));
+ View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;
+ if (view)
+ {
+ OnControlChildAdd(view);
+ }
}
private void DirectorOnControlChildRemove(global::System.IntPtr child)
{
- OnControlChildRemove(new View(child, false));
+ View view = Registry.GetManagedBaseHandleFromNativePtr(child) as View;
+ if (view)
+ {
+ OnControlChildRemove(view);
+ }
}
private void DirectorOnStyleChange(global::System.IntPtr styleManager, int change)
private global::System.IntPtr DirectorGetNextFocusableActor(global::System.IntPtr currentFocusedActor, int direction, bool loopEnabled)
{
- return View.getCPtr(GetNextFocusableView(new View(currentFocusedActor, false), (View.FocusDirection)direction, loopEnabled)).Handle;
+ View view = GetNextFocusableView(Registry.GetManagedBaseHandleFromNativePtr(currentFocusedActor) as View, (View.FocusDirection)direction, loopEnabled);
+ if (view)
+ {
+ return View.getCPtr(view).Handle;
+ }
+ else
+ {
+ return currentFocusedActor;
+ }
}
private void DirectorOnFocusChangeCommitted(global::System.IntPtr commitedFocusableView)
{
- OnFocusChangeCommitted(new View(commitedFocusableView, false));
+ OnFocusChangeCommitted(Registry.GetManagedBaseHandleFromNativePtr(commitedFocusableView) as View);
}
private bool DirectorOnKeyboardEnter()
/// <returns>Handle to an Animation object or an uninitialized handle</returns>
public static Animation DownCast(BaseHandle handle)
{
- Animation ret = new Animation(NDalicPINVOKE.Animation_DownCast(BaseHandle.getCPtr(handle)), true);
+ Animation ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Animation;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
[Obsolete("Please do not use! this will be deprecated")]
public new static ImageView DownCast(BaseHandle handle)
{
- ImageView ret = new ImageView(NDalicPINVOKE.ImageView_DownCast(BaseHandle.getCPtr(handle)), true);
+ ImageView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as ImageView;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
[Obsolete("Please do not use! this will be deprecated")]
public new static TableView DownCast(BaseHandle handle)
{
- TableView ret = new TableView(NDalicPINVOKE.TableView_DownCast(BaseHandle.getCPtr(handle)), true);
+ TableView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TableView;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <returns>Child that was in the cell or an uninitialized handle</returns>
public View GetChildAt(TableView.CellPosition position)
{
- View ret = new View(NDalicPINVOKE.TableView_GetChildAt(swigCPtr, TableView.CellPosition.getCPtr(position)), true);
+ IntPtr cPtr = NDalicPINVOKE.TableView_GetChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <returns>Child that was removed or an uninitialized handle</returns>
public View RemoveChildAt(TableView.CellPosition position)
{
- View ret = new View(NDalicPINVOKE.TableView_RemoveChildAt(swigCPtr, TableView.CellPosition.getCPtr(position)), true);
+ IntPtr cPtr = NDalicPINVOKE.TableView_RemoveChildAt(swigCPtr, TableView.CellPosition.getCPtr(position));
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
[Obsolete("Please do not use! this will be deprecated")]
public new static TextEditor DownCast(BaseHandle handle)
{
- TextEditor ret = new TextEditor(NDalicPINVOKE.TextEditor_DownCast(BaseHandle.getCPtr(handle)), true);
+ TextEditor ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TextEditor;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
[Obsolete("Please do not use! this will be deprecated")]
public new static TextField DownCast(BaseHandle handle)
{
- TextField ret = new TextField(NDalicPINVOKE.TextField_DownCast(BaseHandle.getCPtr(handle)), true);
+ TextField ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TextField;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
[Obsolete("Please do not use! this will be deprecated")]
public new static TextLabel DownCast(BaseHandle handle)
{
- TextLabel ret = new TextLabel(NDalicPINVOKE.TextLabel_DownCast(BaseHandle.getCPtr(handle)), true);
+ TextLabel ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as TextLabel;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
[Obsolete("Please do not use! this will be deprecated")]
public new static VideoView DownCast(BaseHandle handle)
{
- VideoView ret = new VideoView(NDalicPINVOKE.VideoView_DownCast(BaseHandle.getCPtr(handle)), true);
+ VideoView ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as VideoView;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// </summary>
/// <param name="handle">Handle to an object</param>
/// <returns>A handle to a View or an uninitialized handle</returns>
+ [Obsolete("Please do not use! this will be deprecated, instead please us as keyword.")]
public new static View DownCast(BaseHandle handle)
{
- View ret = new View(NDalicPINVOKE.View_DownCast(BaseHandle.getCPtr(handle)), true);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as View;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
- [Obsolete("Please do not use! this will be deprecated")]
+ [Obsolete("Please do not use! this will be deprecated, instead please us as keyword.")]
public static T DownCast<T>(View view) where T : View
{
- //View ret = ViewRegistry.GetViewFromBaseHandle(view);
- View ret = View.DownCast(view);
+ T ret = Registry.GetManagedBaseHandleFromNativePtr(view) as T;
if (ret != null)
{
- return (T)ret;
+ return ret;
}
return null;
}
internal Layer GetLayer()
{
- Layer ret = new Layer(NDalicPINVOKE.Actor_GetLayer(swigCPtr), true);
+ IntPtr cPtr = NDalicPINVOKE.Actor_GetLayer(swigCPtr);
+ Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
+
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
public Renderer GetRendererAt(uint index)
{
- Renderer ret = new Renderer(NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index), true);
+ IntPtr cPtr = NDalicPINVOKE.Actor_GetRendererAt(swigCPtr, index);
+ Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
+
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
if (visualIndex > 0)
{
- visual = VisualFactory.Get().CreateVisual(visualMap.OutputVisualMap); // Create a visual for the new one.
+ visual = VisualFactory.Instance.CreateVisual(visualMap.OutputVisualMap); // Create a visual for the new one.
visual.Name = visualName;
visual.DepthIndex = visualMap.DepthIndex;
{
VisualBase visual = null;
- visual = VisualFactory.Get().CreateVisual(visualMap.OutputVisualMap);
+ visual = VisualFactory.Instance.CreateVisual(visualMap.OutputVisualMap);
visual.Name = visualName;
visual.DepthIndex = visualMap.DepthIndex;
// Create image visual for the arrow keys
_arrowVisualPropertyIndex = RegisterProperty("ArrowImage", new PropertyValue(_arrowImage), Tizen.NUI.PropertyAccessMode.ReadWrite);
- _arrowVisual = VisualFactory.Get().CreateVisual(
+ _arrowVisual = VisualFactory.Instance.CreateVisual(
new PropertyMap().Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image))
.Add(ImageVisualProperty.URL, new PropertyValue(_arrowImage))
.Add(ImageVisualProperty.DesiredHeight, new PropertyValue(150))
}
else
{
- // Return a native empty handle as nothing can be focused in the left or right
- nextFocusedView = new View();
- nextFocusedView.Reset();
+ // Return null
+ return null;
}
return nextFocusedView;
set
{
_arrowImage = value;
- _arrowVisual = VisualFactory.Get().CreateVisual(
+ _arrowVisual = VisualFactory.Instance.CreateVisual(
new PropertyMap().Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image))
.Add(ImageVisualProperty.URL, new PropertyValue(_arrowImage))
.Add(ImageVisualProperty.DesiredHeight, new PropertyValue(150))
[Obsolete("Please do not use! this will be deprecated")]
public static KeyFrames DownCast(BaseHandle handle)
{
- KeyFrames ret = new KeyFrames(NDalicPINVOKE.KeyFrames_DownCast(BaseHandle.getCPtr(handle)), true);
+ KeyFrames ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as KeyFrames;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
[Obsolete("Please do not use! this will be deprecated")]
public new static Layer DownCast(BaseHandle handle)
{
- Layer ret = new Layer(NDalicPINVOKE.Layer_DownCast(BaseHandle.getCPtr(handle)), true);
+ Layer ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Layer;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <returns> A handle to the view if found, or an empty handle if not. </returns>
public View FindChildById(uint id)
{
- View ret = new View(NDalicPINVOKE.Actor_FindChildById(swigCPtr, id), true);
+ IntPtr cPtr = NDalicPINVOKE.Actor_FindChildById(swigCPtr, id);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
[Obsolete("Please do not use! this will be deprecated")]
public new static Path DownCast(BaseHandle handle)
{
- Path ret = new Path(NDalicPINVOKE.Path_DownCast(BaseHandle.getCPtr(handle)), true);
+ Path ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Path;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public Geometry GetGeometry()
{
- Geometry ret = new Geometry(NDalicPINVOKE.Renderer_GetGeometry(swigCPtr), true);
+ System.IntPtr cPtr = NDalicPINVOKE.Renderer_GetGeometry(swigCPtr);
+ Geometry ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Geometry;
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public TextureSet GetTextures()
{
- TextureSet ret = new TextureSet(NDalicPINVOKE.Renderer_GetTextures(swigCPtr), true);
+ System.IntPtr cPtr = NDalicPINVOKE.Renderer_GetTextures(swigCPtr);
+ TextureSet ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as TextureSet;
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public Shader GetShader()
{
- Shader ret = new Shader(NDalicPINVOKE.Renderer_GetShader(swigCPtr), true);
+ System.IntPtr cPtr = NDalicPINVOKE.Renderer_GetShader(swigCPtr);
+ Shader ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Shader;
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public Texture GetTexture(uint index)
{
- Texture ret = new Texture(NDalicPINVOKE.TextureSet_GetTexture(swigCPtr, index), true);
+ System.IntPtr cPtr = NDalicPINVOKE.TextureSet_GetTexture(swigCPtr, index);
+ Texture ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Texture;
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public Sampler GetSampler(uint index)
{
- Sampler ret = new Sampler(NDalicPINVOKE.TextureSet_GetSampler(swigCPtr, index), true);
+ System.IntPtr cPtr = NDalicPINVOKE.TextureSet_GetSampler(swigCPtr, index);
+ Sampler ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Sampler;
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
[Obsolete("Please do not use! this will be deprecated")]
public static Timer DownCast(BaseHandle handle)
{
- Timer ret = new Timer(NDalicPINVOKE.Timer_DownCast(BaseHandle.getCPtr(handle)), true);
+ Timer ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Timer;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal static Touch GetTouchFromPtr(global::System.IntPtr cPtr)
{
- Touch ret = new Touch(cPtr, false);
+ Touch ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Touch;
+ if (ret == null)
+ {
+ ret = new Touch(cPtr, false);
+ }
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <returns>The actor that was underneath the point specified</returns>
public View GetHitView(uint point)
{
- View ret = new View(NDalicPINVOKE.Touch_GetHitActor(swigCPtr, point), true);
+ global::System.IntPtr cPtr = NDalicPINVOKE.Touch_GetHitActor(swigCPtr, point);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
[Obsolete("Please do not use! this will be deprecated")]
public new static Popup DownCast(BaseHandle handle)
{
- Popup ret = new Popup(NDalicPINVOKE.Popup_DownCast(BaseHandle.getCPtr(handle)), true);
+ Popup ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Popup;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal View GetTitle()
{
- View ret = new View(NDalicPINVOKE.Popup_GetTitle(swigCPtr), true);
+ IntPtr cPtr = NDalicPINVOKE.Popup_GetTitle(swigCPtr);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal View GetContent()
{
- View ret = new View(NDalicPINVOKE.Popup_GetContent(swigCPtr), true);
+ IntPtr cPtr = NDalicPINVOKE.Popup_GetContent(swigCPtr);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal View GetFooter()
{
- View ret = new View(NDalicPINVOKE.Popup_GetFooter(swigCPtr), true);
+ IntPtr cPtr = NDalicPINVOKE.Popup_GetFooter(swigCPtr);
+ View ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as View;
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
[Obsolete("Please do not use! this will be deprecated")]
public new static PushButton DownCast(BaseHandle handle)
{
- PushButton ret = new PushButton(NDalicPINVOKE.PushButton_DownCast(BaseHandle.getCPtr(handle)), true);
+ PushButton ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as PushButton;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
[Obsolete("Please do not use! this will be deprecated")]
public new static ScrollBar DownCast(BaseHandle handle)
{
- ScrollBar ret = new ScrollBar(NDalicPINVOKE.ScrollBar_DownCast(BaseHandle.getCPtr(handle)), true);
+ ScrollBar ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as ScrollBar;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <returns>Handle to a Slider or an uninitialized handle</returns>
public new static Slider DownCast(BaseHandle handle)
{
- Slider ret = new Slider(NDalicPINVOKE.Slider_DownCast(BaseHandle.getCPtr(handle)), true);
+ Slider ret = Registry.GetManagedBaseHandleFromNativePtr(handle) as Slider;
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// Create or retrieve VisualFactory singleton.
/// </summary>
/// <returns>A handle to the VisualFactory control.</returns>
- public static VisualFactory Get()
+ private static VisualFactory Get()
{
VisualFactory ret = new VisualFactory(NDalicPINVOKE.VisualFactory_Get(), true);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
public Layer GetLayer(uint depth)
{
- Layer ret = new Layer(NDalicPINVOKE.Stage_GetLayer(stageCPtr, depth), true);
+ IntPtr cPtr = NDalicPINVOKE.Stage_GetLayer(stageCPtr, depth);
+ Layer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Layer;
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
internal ResizedSignal ResizedSignal()
{
- ResizedSignal ret = new ResizedSignal(NDalicManualPINVOKE.Window_ResizedSignal(stageCPtr), false);
+ ResizedSignal ret = new ResizedSignal(NDalicManualPINVOKE.Window_ResizedSignal(swigCPtr), false);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private WindowResizedEventCallbackType _windowResizedEventCallback;
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
- private delegate void WindowResizedEventCallbackType(Size2D windowSize);
+ private delegate void WindowResizedEventCallbackType(IntPtr windowSize);
private event EventHandler<ResizedEventArgs> _windowResizedEventHandler;
public event EventHandler<ResizedEventArgs> Resized
}
}
- private void OnResized(Size2D windowSize)
+ private void OnResized(IntPtr windowSize)
{
ResizedEventArgs e = new ResizedEventArgs();
- e.WindowSize = windowSize;
+ var val = new Uint16Pair(windowSize, false);
+ e.WindowSize = new Size2D(val.GetWidth(), val.GetHeight());
+ val.Dispose();
if (_windowResizedEventHandler != null)
{
internal Size2D GetWindowSize()
{
- Size2D ret = new Size2D(NDalicManualPINVOKE.GetSize(swigCPtr), true);
+ var val = new Uint16Pair(NDalicManualPINVOKE.GetSize(swigCPtr), false);
+ Size2D ret = new Size2D(val.GetWidth(), val.GetHeight());
+ val.Dispose();
+
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}