From 852c56f82f9c13754ad559e39484ef3e8857e2ac Mon Sep 17 00:00:00 2001 From: "minho.sun" Date: Mon, 14 Aug 2017 20:18:05 +0900 Subject: [PATCH] [Tizen] Fix Window Set/Get Size/Position This reverts commit ac59cf7a4d84081aa50f5a2b43ffefdc31636b3b. Change-Id: I87bec91a5ba2a1bcf20cb66c567f432a2a8d1d3d --- Tizen.NUI/src/public/Window.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Tizen.NUI/src/public/Window.cs b/Tizen.NUI/src/public/Window.cs index 020ea72..2954ffd 100755 --- a/Tizen.NUI/src/public/Window.cs +++ b/Tizen.NUI/src/public/Window.cs @@ -1278,7 +1278,9 @@ namespace Tizen.NUI internal void SetWindowSize(Size2D size) { - NDalicManualPINVOKE.SetSize(swigCPtr, Size2D.getCPtr(size)); + var val = new Uint16Pair((uint)size.Width, (uint)size.Height); + NDalicManualPINVOKE.SetSize(swigCPtr, Uint16Pair.getCPtr(val)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } @@ -1286,7 +1288,6 @@ namespace Tizen.NUI { 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; @@ -1294,13 +1295,17 @@ namespace Tizen.NUI internal void SetPosition(Position2D position) { - NDalicManualPINVOKE.SetPosition(swigCPtr, Position2D.getCPtr(position)); + var val = new Uint16Pair( (uint)position.X, (uint)position.Y ); + NDalicManualPINVOKE.SetPosition(swigCPtr, Uint16Pair.getCPtr(val)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } internal Position2D GetPosition() { - Position2D ret = new Position2D(NDalicManualPINVOKE.GetPosition(swigCPtr), true); + var val = new Uint16Pair(NDalicManualPINVOKE.GetPosition(swigCPtr), true); + Position2D ret = new Position2D(val.GetX(), val.GetY()); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } -- 2.7.4