Modify widget window type
authorHyunho Kang <hhstark.kang@samsung.com>
Fri, 23 Jun 2017 09:21:03 +0000 (18:21 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Fri, 4 Aug 2017 01:11:43 +0000 (01:11 +0000)
ElmSharp.Widget to ElmSharp.Window
To support xamarine common codes

Change-Id: I497f82395cc99d915913c6cb22900daf2b105249
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
src/Tizen.Applications.WidgetApplication/Interop/Interop.Libraries.cs
src/Tizen.Applications.WidgetApplication/Interop/Interop.Widget.cs
src/Tizen.Applications.WidgetApplication/Tizen.Applications/WidgetBase.cs
src/Tizen.Applications.WidgetApplication/Tizen.Applications/WidgetWindow.cs

index aa36259..7b43b38 100755 (executable)
@@ -21,7 +21,5 @@ internal static partial class Interop
         public const string AppCommon = "libcapi-appfw-app-common.so.0";
         public const string AppcoreWidget = "libcapi-appfw-widget-application.so.1";
         public const string WidgetService = "libwidget_service.so.1";
         public const string AppCommon = "libcapi-appfw-app-common.so.0";
         public const string AppcoreWidget = "libcapi-appfw-widget-application.so.1";
         public const string WidgetService = "libwidget_service.so.1";
-        public const string Elementary = "libelementary.so.1";
-        public const string Evas = "libevas.so.1";
     }
 }
     }
 }
index 6d1cde2..390227d 100755 (executable)
@@ -77,18 +77,6 @@ internal static partial class Interop
 
         internal delegate int WidgetInstanceUpdateCallback(IntPtr context, IntPtr content, int force, IntPtr userData);
 
 
         internal delegate int WidgetInstanceUpdateCallback(IntPtr context, IntPtr content, int force, IntPtr userData);
 
-        [DllImport(Libraries.Evas)]
-        internal static extern void evas_object_size_hint_weight_set(IntPtr obj, double x, double y);
-
-        [DllImport(Libraries.Elementary)]
-        internal static extern void elm_win_conformant_set(IntPtr obj, bool conformant);
-
-        [DllImport(Libraries.Elementary)]
-        internal static extern void elm_win_resize_object_add(IntPtr obj, IntPtr subobj);
-
-        [DllImport(Libraries.Elementary)]
-        internal static extern IntPtr elm_conformant_add(IntPtr obj);
-
         [DllImport(Libraries.AppcoreWidget, EntryPoint = "widget_app_main")]
         internal static extern ErrorCode Main(int argc, string[] argv, ref WidgetAppLifecycleCallbacks callback, IntPtr userData);
 
         [DllImport(Libraries.AppcoreWidget, EntryPoint = "widget_app_main")]
         internal static extern ErrorCode Main(int argc, string[] argv, ref WidgetAppLifecycleCallbacks callback, IntPtr userData);
 
index 7d79369..3573556 100755 (executable)
@@ -26,14 +26,13 @@ namespace Tizen.Applications
     {
         internal IntPtr Handle;
         internal string Id;
     {
         internal IntPtr Handle;
         internal string Id;
-        internal Widget BaseWindow;
         protected static readonly string LogTag = typeof(WidgetBase).Namespace;
 
         /// <summary>
         /// Window object for this widget instance.
         /// It will be created after OnCreate method is invoked.
         /// </summary>
         protected static readonly string LogTag = typeof(WidgetBase).Namespace;
 
         /// <summary>
         /// Window object for this widget instance.
         /// It will be created after OnCreate method is invoked.
         /// </summary>
-        protected Widget Window;
+        protected Window Window;
 
         /// <summary>
         /// Delete type.
 
         /// <summary>
         /// Delete type.
@@ -161,10 +160,8 @@ namespace Tizen.Applications
             IntPtr win;
 
             Interop.Widget.GetWin(Handle, out win);
             IntPtr win;
 
             Interop.Widget.GetWin(Handle, out win);
-            BaseWindow = new WidgetWindow(win);
-            BaseWindow.Resize(w, h);
-            BaseWindow.Show();
-            Window = new ConformantWindow(Window, win);
+            Window = new WidgetWindow(win);
+            Window.Resize(w, h);
             Window.Show();
         }
 
             Window.Show();
         }
 
index 69e187f..870e11d 100755 (executable)
@@ -20,7 +20,7 @@ using System.Collections.Generic;
 
 namespace Tizen.Applications
 {
 
 namespace Tizen.Applications
 {
-    internal class WidgetWindow : Widget
+    internal class WidgetWindow : Window
     {
         private IntPtr _handle;
 
     {
         private IntPtr _handle;
 
@@ -35,27 +35,5 @@ namespace Tizen.Applications
             return _handle;
         }
     }
             return _handle;
         }
     }
-
-    internal class ConformantWindow : Widget
-    {
-        private IntPtr _handle;
-        private IntPtr _conf;
-
-        internal ConformantWindow(EvasObject parent, IntPtr handle) : base()
-        {
-            _handle = handle;
-            Realize(parent);
-        }
-
-        protected override IntPtr CreateHandle(EvasObject parent)
-        {
-            _conf = Interop.Widget.elm_conformant_add(_handle);
-            Interop.Widget.evas_object_size_hint_weight_set(_conf, 1.0, 1.0);
-            Interop.Widget.elm_win_conformant_set(_handle, true);
-            Interop.Widget.elm_win_resize_object_add(_handle, _conf);
-            return _conf;
-        }
-
-    }
 }
 
 }