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";
}
}
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);
{
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 Widget Window;
+ protected Window Window;
/// <summary>
/// Delete type.
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();
}
namespace Tizen.Applications
{
- internal class WidgetWindow : Widget
+ internal class WidgetWindow : Window
{
private IntPtr _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;
- }
-
- }
}