From 12968b24ae614ea94ca7919a74217f6137b3ee86 Mon Sep 17 00:00:00 2001 From: "minho.sun" Date: Tue, 1 Aug 2017 10:19:22 +0900 Subject: [PATCH] Revert "[Tizen] ApplicationHandle in NUIApplication added" This reverts commit 03df2285b533e4f5ea43ffc59b589d21dc84dceb. Change-Id: Ic250ba63ef8bfadadcd621ded73be94f2fd27edc --- src/Tizen.NUI/src/internal/NUICoreBackend.cs | 9 --------- src/Tizen.NUI/src/public/BaseHandle.cs | 9 +++++++++ src/Tizen.NUI/src/public/NUIApplication.cs | 12 +++++++++++- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/Tizen.NUI/src/internal/NUICoreBackend.cs b/src/Tizen.NUI/src/internal/NUICoreBackend.cs index 20dff95..35a855d 100755 --- a/src/Tizen.NUI/src/internal/NUICoreBackend.cs +++ b/src/Tizen.NUI/src/internal/NUICoreBackend.cs @@ -234,14 +234,5 @@ namespace Tizen.NUI handler?.Invoke(); } - - internal Application ApplicationHandle - { - get - { - return _application; - } - } - } } diff --git a/src/Tizen.NUI/src/public/BaseHandle.cs b/src/Tizen.NUI/src/public/BaseHandle.cs index c692895..0f03701 100755 --- a/src/Tizen.NUI/src/public/BaseHandle.cs +++ b/src/Tizen.NUI/src/public/BaseHandle.cs @@ -55,6 +55,15 @@ namespace Tizen.NUI } } + internal BaseHandle(global::System.IntPtr cPtr) + { + _registerMe = swigCMemOwn = true; + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + + // Register this instance of BaseHandle in the registry. + Registry.Register(this); + } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BaseHandle obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; diff --git a/src/Tizen.NUI/src/public/NUIApplication.cs b/src/Tizen.NUI/src/public/NUIApplication.cs index b5bdacb..10a75ea 100755 --- a/src/Tizen.NUI/src/public/NUIApplication.cs +++ b/src/Tizen.NUI/src/public/NUIApplication.cs @@ -176,12 +176,22 @@ namespace Tizen.NUI Transparent = 1 } + /// + /// Get the window instance. + /// + public Window Window + { + get + { + return _application.GetWindow(); + } + } internal Application ApplicationHandle { get { - return ((NUICoreBackend)this.Backend).ApplicationHandle; + return _application; } } -- 2.7.4