Remove Tizen.UI dependancy
authorKangho Hur <kangho.hur@samsung.com>
Thu, 8 Sep 2016 01:42:19 +0000 (10:42 +0900)
committerKangho Hur <kangho.hur@samsung.com>
Thu, 8 Sep 2016 04:22:38 +0000 (13:22 +0900)
Change-Id: I374102179381b4f6245496a7771aeb1f1de2a0bb
Signed-off-by: Kangho Hur <kangho.hur@samsung.com>
Tizen.Applications.WidgetApplication/Tizen.Applications.WidgetApplication.project.json [changed mode: 0755->0644]
Tizen.Applications.WidgetApplication/Tizen.Applications/WidgetBase.cs [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 6da012f..2296644
@@ -1,19 +1,18 @@
-{\r
-  "buildOptions": {\r
-    "debugType": "portable",\r
-    "platform": "AnyCPU",\r
-    "preserveCompilationContext": true\r
-  },\r
-  "dependencies": {\r
-    "NETStandard.Library": "1.6.0",\r
-    "Tizen": "1.0.0",\r
-    "Tizen.Applications": "1.0.0",\r
-    "Tizen.UI": "1.0.0"\r
-  },\r
-  "runtimes": {\r
-    "win": {}\r
-  },\r
-  "frameworks": {\r
-    "netstandard1.6": {}\r
-  }\r
-}
\ No newline at end of file
+{
+  "buildOptions": {
+    "debugType": "portable",
+    "platform": "AnyCPU",
+    "preserveCompilationContext": true
+  },
+  "dependencies": {
+    "NETStandard.Library": "1.6.0",
+    "Tizen": "1.0.0",
+    "Tizen.Applications": "1.0.0",
+  },
+  "runtimes": {
+    "win": {}
+  },
+  "frameworks": {
+    "netstandard1.6": {}
+  }
+}
old mode 100755 (executable)
new mode 100644 (file)
index fc669aa..e2b97a7
@@ -7,7 +7,6 @@
 // you entered into with Samsung.
 
 using System;
-using Tizen.UI;
 
 namespace Tizen.Applications
 {
@@ -21,11 +20,6 @@ namespace Tizen.Applications
         protected static readonly string LogTag = typeof(WidgetBase).Namespace;
 
         /// <summary>
-        /// The main window instance of the widget instance.
-        /// </summary>
-        public Window Window { get; private set; }
-
-        /// <summary>
         /// Delete type
         /// </summary>
         public enum WidgetDestroyType
@@ -152,7 +146,7 @@ namespace Tizen.Applications
 
             Interop.Widget.GetWin(Handle, out win);
 
-            //TODO: convert win to an instance of Window
+            OnPreCreate(win, w, h);
         }
 
         /// <summary>
@@ -195,5 +189,14 @@ namespace Tizen.Applications
         public virtual void OnUpdate(Bundle content, bool isForce)
         {
         }
+
+        /// <summary>
+        /// Overrides this method if want to handle behavior before OnCreate() is completed.
+        /// <param name="w">The pixel value for widget width</param>
+        /// <param name="h">The pixel value for widget height</param>
+        /// </summary>
+        protected virtual void OnPreCreate(IntPtr window, int w, int h)
+        {
+        }
     }
 }