Tizen.Network.WiFiDirect.dll #common #mobile #tv #ivi
Tizen.Nlp.dll #mobile #mobile-emul
Tizen.NUI.dll #common #mobile #mobile-emul #tv #wearable
-Tizen.NUI.Components.dll #common #mobile #mobile-emul #tv #wearable
+Tizen.NUI.Components.dll #common #mobile #mobile-emul #tv #wearable
Tizen.NUI.Wearable.dll #wearable
Tizen.PhonenumberUtils.dll #mobile #mobile-emul #wearable
Tizen.Pims.Calendar.dll #common #mobile #mobile-emul #tv #wearable
Tizen.Uix.VoiceControl.dll #common #mobile #mobile-emul #tv #wearable
Tizen.Uix.VoiceControlWidget.dll #common #mobile #mobile-emul #tv #wearable
Tizen.WebView.dll #common #mobile #mobile-emul #tv #wearable
+ElmSharp.preload #common #mobile #mobile-emul #tv #wearable
+ElmSharp.Wearable.preload #wearable
+Tizen.Applications.Common.preload #common #mobile #mobile-emul #tv #wearable
+Tizen.Applications.UI.preload #common #mobile #mobile-emul #tv #wearable
+Tizen.Log.preload #common #mobile #mobile-emul #tv #wearable
+Tizen.preload #common #mobile #mobile-emul #tv #wearable
+Tizen.System.Information.preload #common #mobile #mobile-emul #tv #wearable
%define DOTNET_ASSEMBLY_DUMMY_PATH %{DOTNET_ASSEMBLY_PATH}/ref
%define DOTNET_ASSEMBLY_RES_PATH %{DOTNET_ASSEMBLY_PATH}/res
%define DOTNET_TOOLS_PATH /usr/share/dotnet.tizen/tools
+%define DOTNET_PRELOAD_PATH /usr/share/dotnet.tizen/preload
%define DOTNET_NUGET_SOURCE /nuget
+%define TIZEN_NET_RUNTIME_IDENTIFIERS 4.0.0:5.0.0:5.5.0
+
Name: csapi-tizenfx
Summary: Assemblies of Tizen .NET
Version: %{TIZEN_NET_RPM_VERSION}
GetFileList() {
PROFILE=$1
- cat packaging/PlatformFileList.txt | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#"
- for f in $(cat packaging/PlatformFileList.txt | grep -v -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1); do
+ cat packaging/PlatformFileList.txt | grep -v "\.preload" | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#"
+ for f in $(cat packaging/PlatformFileList.txt | grep -v -E "#$PROFILE[[:space:]]|#$PROFILE$|\.preload" | cut -d# -f1); do
if [ -f %{_tizenfx_bin_path}/bin/dummy/$f ]; then
echo "%{DOTNET_ASSEMBLY_PATH}/ref/$f"
fi
done
+ for f in $(cat packaging/PlatformFileList.txt | grep "\.preload" | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1); do
+ if [ -f packaging/preload/$f ]; then
+ echo "%{DOTNET_PRELOAD_PATH}/$f"
+ fi
+ done
}
GetFileList common > common.filelist
mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
mkdir -p %{buildroot}%{DOTNET_NUGET_SOURCE}
mkdir -p %{buildroot}%{DOTNET_TOOLS_PATH}
+mkdir -p %{buildroot}%{DOTNET_PRELOAD_PATH}
# Install Runtime Assemblies
install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
# Install Tools
install -p -m 644 tools/bin/* %{buildroot}%{DOTNET_TOOLS_PATH}
+# Install Preload
+install -p -m 644 packaging/preload/*.preload %{buildroot}%{DOTNET_PRELOAD_PATH}
+
%post
/usr/bin/vconftool set -t int db/dotnet/tizen_api_version %{TIZEN_NET_API_VERSION} -f
/usr/bin/vconftool set -t string db/dotnet/tizen_api_path %{DOTNET_ASSEMBLY_PATH} -f
+/usr/bin/vconftool set -t string db/dotnet/tizen_rid_version %{TIZEN_NET_RUNTIME_IDENTIFIERS} -f
%files
%license LICENSE
%define DOTNET_ASSEMBLY_DUMMY_PATH %{DOTNET_ASSEMBLY_PATH}/ref
%define DOTNET_ASSEMBLY_RES_PATH %{DOTNET_ASSEMBLY_PATH}/res
%define DOTNET_TOOLS_PATH /usr/share/dotnet.tizen/tools
+%define DOTNET_PRELOAD_PATH /usr/share/dotnet.tizen/preload
%define DOTNET_NUGET_SOURCE /nuget
+%define TIZEN_NET_RUNTIME_IDENTIFIERS @rid_version@
+
Name: csapi-tizenfx
Summary: Assemblies of Tizen .NET
Version: %{TIZEN_NET_RPM_VERSION}
GetFileList() {
PROFILE=$1
- cat packaging/PlatformFileList.txt | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#"
- for f in $(cat packaging/PlatformFileList.txt | grep -v -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1); do
+ cat packaging/PlatformFileList.txt | grep -v "\.preload" | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#"
+ for f in $(cat packaging/PlatformFileList.txt | grep -v -E "#$PROFILE[[:space:]]|#$PROFILE$|\.preload" | cut -d# -f1); do
if [ -f %{_tizenfx_bin_path}/bin/dummy/$f ]; then
echo "%{DOTNET_ASSEMBLY_PATH}/ref/$f"
fi
done
+ for f in $(cat packaging/PlatformFileList.txt | grep "\.preload" | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1); do
+ if [ -f packaging/preload/$f ]; then
+ echo "%{DOTNET_PRELOAD_PATH}/$f"
+ fi
+ done
}
GetFileList common > common.filelist
mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
mkdir -p %{buildroot}%{DOTNET_NUGET_SOURCE}
mkdir -p %{buildroot}%{DOTNET_TOOLS_PATH}
+mkdir -p %{buildroot}%{DOTNET_PRELOAD_PATH}
# Install Runtime Assemblies
install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
# Install Tools
install -p -m 644 tools/bin/* %{buildroot}%{DOTNET_TOOLS_PATH}
+# Install Preload
+install -p -m 644 packaging/preload/*.preload %{buildroot}%{DOTNET_PRELOAD_PATH}
+
%post
/usr/bin/vconftool set -t int db/dotnet/tizen_api_version %{TIZEN_NET_API_VERSION} -f
/usr/bin/vconftool set -t string db/dotnet/tizen_api_path %{DOTNET_ASSEMBLY_PATH} -f
+/usr/bin/vconftool set -t string db/dotnet/tizen_rid_version %{TIZEN_NET_RUNTIME_IDENTIFIERS} -f
%files
%license LICENSE
%attr(644,root,root) %{DOTNET_ASSEMBLY_RES_PATH}/*
%files debug
+%manifest %{name}.manifest
%attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.pdb
%files common -f common.filelist
--- /dev/null
+#!/usr/bin/python3
+
+import json
+import os
+
+scrpit_dir = os.path.dirname(os.path.abspath(__file__))
+runtime_dir = os.path.join(scrpit_dir, "../pkg/Tizen.NET/runtime.json")
+spec_dir = os.path.join(scrpit_dir, "csapi-tizenfx.spec")
+
+with open(runtime_dir) as json_file:
+ json_data = json.load(json_file)
+ json_string = json_data["runtimes"]
+
+ key_list = json_string.keys()
+ rid_list = []
+
+ for key in key_list:
+ key = key.replace("-armel", "")
+ key = key.replace("-x86", "")
+ key = key.replace("tizen.", "")
+ key = key.replace("tizen", "")
+ if key.strip():
+ rid_list.append(key)
+
+ rid_list = list(set(rid_list))
+ rid_list.sort()
+
+ f = open(spec_dir,'r')
+ origin_data = f.read()
+ f.close()
+
+ new_data = origin_data.replace("@rid_version@", ':'.join(rid_list))
+
+ f = open(spec_dir, 'w')
+ f.write(new_data)
+ f.close()
sed -i -e "s/@api_version@/$API_VERSION/g" $RPMSPEC
sed -i -e "s/@rpm_version@/$RPM_VERSION/g" $RPMSPEC
sed -i -e "s/@nuget_version@/$NUGET_VERSION/g" $RPMSPEC
+
+# Update RID
+$SCRIPT_DIR/makerid.py
--- /dev/null
+###########################################
+## AssemblyName.dll TypeName ##
+## AssemblyName.dll TypeName.Preload() ##
+## The methods must not have parameters. ##
+###########################################
+ElmSharp.Wearable.dll ElmSharp.Wearable.CircleDateTimeSelector
+ElmSharp.Wearable.dll ElmSharp.Wearable.CircleGenList
+ElmSharp.Wearable.dll ElmSharp.Wearable.CircleScroller
+ElmSharp.Wearable.dll ElmSharp.Wearable.CircleSpinner
+ElmSharp.Wearable.dll ElmSharp.Wearable.ICircleWidget
+ElmSharp.Wearable.dll ElmSharp.Wearable.IRotaryActionWidget
+ElmSharp.Wearable.dll Interop
--- /dev/null
+###########################################
+## AssemblyName.dll TypeName ##
+## AssemblyName.dll TypeName.Preload() ##
+## The methods must not have parameters. ##
+###########################################
+ElmSharp.dll ElmSharp.Box
+ElmSharp.dll ElmSharp.Button
+ElmSharp.dll ElmSharp.Check
+ElmSharp.dll ElmSharp.Color
+ElmSharp.dll ElmSharp.Conformant
+ElmSharp.dll ElmSharp.DateTimeSelector
+ElmSharp.dll ElmSharp.DisplayRotation
+ElmSharp.dll ElmSharp.EdjeObject
+ElmSharp.dll ElmSharp.EdjeObject+SignalData
+ElmSharp.dll ElmSharp.EdjeTextPartObject
+ElmSharp.dll ElmSharp.Elementary
+ElmSharp.dll ElmSharp.Entry
+ElmSharp.dll ElmSharp.EvasKeyEventArgs
+ElmSharp.dll ElmSharp.EvasMap
+ElmSharp.dll ElmSharp.EvasObject
+ElmSharp.dll ElmSharp.FocusDirection
+ElmSharp.dll ElmSharp.GenList
+ElmSharp.dll ElmSharp.GestureLayer+GestureType
+ElmSharp.dll ElmSharp.IInvalidatable
+ElmSharp.dll ElmSharp.Image
+ElmSharp.dll ElmSharp.ItemObject+SignalData
+ElmSharp.dll ElmSharp.Label
+ElmSharp.dll ElmSharp.Layout
+ElmSharp.dll ElmSharp.Naviframe
+ElmSharp.dll ElmSharp.NaviItem
+ElmSharp.dll ElmSharp.Point3D
+ElmSharp.dll ElmSharp.ProgressBar
+ElmSharp.dll ElmSharp.Radio
+ElmSharp.dll ElmSharp.Rect
+ElmSharp.dll ElmSharp.Rectangle
+ElmSharp.dll ElmSharp.Scroller
+ElmSharp.dll ElmSharp.Size
+ElmSharp.dll ElmSharp.Slider
+ElmSharp.dll ElmSharp.Spinner
+ElmSharp.dll ElmSharp.Widget
+ElmSharp.dll ElmSharp.Window
+ElmSharp.dll ElmSharp.WrapType
+ElmSharp.dll Interop
+ElmSharp.dll ElmSharp.Window.Preload()
--- /dev/null
+###########################################
+## AssemblyName.dll TypeName ##
+## AssemblyName.dll TypeName.Preload() ##
+## The methods must not have parameters. ##
+###########################################
+Tizen.Applications.Common.dll Interop
+Tizen.Applications.Common.dll Tizen.Applications.Application
+Tizen.Applications.Common.dll Tizen.Applications.CoreApplication
+Tizen.Applications.Common.dll Tizen.Applications.CoreBackend.EventType
+Tizen.Applications.Common.dll Tizen.Applications.TizenSynchronizationContext
--- /dev/null
+###########################################
+## AssemblyName.dll TypeName ##
+## AssemblyName.dll TypeName.Preload() ##
+## The methods must not have parameters. ##
+###########################################
+Tizen.Applications.UI.dll Interop
+Tizen.Applications.UI.dll Tizen.Applications.CoreUIApplication
--- /dev/null
+###########################################
+## AssemblyName.dll TypeName ##
+## AssemblyName.dll TypeName.Preload() ##
+## The methods must not have parameters. ##
+###########################################
+Tizen.Log.dll Interop
+Tizen.Log.dll Tizen.Log
--- /dev/null
+###########################################
+## AssemblyName.dll TypeName ##
+## AssemblyName.dll TypeName.Preload() ##
+## The methods must not have parameters. ##
+###########################################
+Tizen.System.Information.dll Tizen.System.Information
+Tizen.System.Information.dll Tizen.System.Information.Preload()
--- /dev/null
+###########################################
+## AssemblyName.dll TypeName ##
+## AssemblyName.dll TypeName.Preload() ##
+## The methods must not have parameters. ##
+###########################################
+Tizen.dll Interop
"tizen.5.5.0",
"tizen.5.0.0-x86"
]
- },
+ }
}
}
--- /dev/null
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System;
+
+namespace ElmSharp.Wearable
+{
+ static class Preload
+ {
+ static public void WarmupWidgets(PreloadedWindow win)
+ {
+ var surface = new CircleSurface(win.BaseConformant);
+ win.BaseCircleSurface = surface;
+ new CircleDateTimeSelector(win, surface).Unrealize();
+ new CircleProgressBar(win, surface).Unrealize();
+ new CircleScroller(win, surface).Unrealize();
+ new CircleSlider(win, surface).Unrealize();
+ new CircleSpinner(win, surface).Unrealize();
+ new MoreOption(win).Unrealize();
+ }
+ }
+}
* limitations under the License.
*/
+using System;
+using System.ComponentModel;
+using System.Reflection;
+
namespace ElmSharp
{
- internal class PreloadedWindow : Window
+ /// <summary>
+ /// Pre-created window which prepares features that takes time in advance.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public class PreloadedWindow : Window
{
static PreloadedWindow s_precreated;
- public PreloadedWindow(bool useBaseLayout=true) : base("PreloadWindow")
+ internal PreloadedWindow(bool useBaseLayout=true) : base("PreloadWindow")
{
s_precreated = this;
if (useBaseLayout)
BackButtonPressed += DummyHandler;
BackButtonPressed -= DummyHandler;
void DummyHandler(object sender, System.EventArgs e) { }
+
+ if (Elementary.GetProfile() == "wearable")
+ {
+ WarmupWearableWidgets();
+ }
}
public Layout BaseLayout
protected set;
}
+ public Conformant BaseConformant
+ {
+ get;
+ protected set;
+ }
+
+ public object BaseCircleSurface
+ {
+ get;
+ set;
+ }
+
+
public void InitializeBaseLayout()
{
var conformant = new Conformant(this);
+ BaseConformant = conformant;
conformant.Show();
var layout = new Layout(conformant);
new Index(this).Unrealize();
}
+ public void WarmupWearableWidgets()
+ {
+ try
+ {
+ Assembly assem = Assembly.Load("ElmSharp.Wearable");
+ var type = assem.GetType("ElmSharp.Wearable.Preload");
+ type.GetMethod("WarmupWidgets", BindingFlags.Public | BindingFlags.Static).Invoke(null, new object[] { this });
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e.ToString());
+ Console.WriteLine("Fail to preload ElmSharp.Wearable");
+ }
+ }
+
public static PreloadedWindow GetInstance()
{
var instance = s_precreated;
}
/// <summary>
+ /// Creates an auxiliary hint of the window.
+ /// </summary>
+ /// <remarks>
+ /// Support for this depends on the underlying windowing system.
+ /// </remarks>
+ /// <param name="hint">The auxiliary hint string</param>
+ /// <param name="value">The value string</param>
+ /// <returns>The ID of the created auxiliary hint, otherwise -1 on failure</returns>
+ /// <since_tizen> preview </since_tizen>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public int AddAuxiliaryHint(string hint, string value)
+ {
+ return Interop.Elementary.elm_win_aux_hint_add(RealHandle, hint, value);
+ }
+
+ /// <summary>
+ /// Deletes an auxiliary hint of the window.
+ /// </summary>
+ /// <remarks>
+ /// Support for this depends on the underlying windowing system.
+ /// </remarks>
+ /// <param name="id">The ID of the auxiliary hint</param>
+ /// <returns>If true deletes successful, otherwise false.</returns>
+ /// <since_tizen> preview </since_tizen>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool DeleteAuxiliaryHint(int id)
+ {
+ return Interop.Elementary.elm_win_aux_hint_del(RealHandle, id);
+ }
+
+ /// <summary>
+ /// Changes a value of the auxiliary hint.
+ /// </summary>
+ /// <remarks>
+ /// Support for this depends on the underlying windowing system.
+ /// </remarks>
+ /// <param name="id">The auxiliary hint ID</param>
+ /// <param name="value">The value string to be set</param>
+ /// <returns>If true changes successful, otherwise false.</returns>
+ /// <since_tizen> preview </since_tizen>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool SetAuxiliaryHintValue(int id, string value)
+ {
+ return Interop.Elementary.elm_win_aux_hint_val_set(RealHandle, id, value);
+ }
+
+ /// <summary>
+ /// Gets a value of the auxiliary hint.
+ /// </summary>
+ /// <remarks>
+ /// Support for this depends on the underlying windowing system.
+ /// </remarks>
+ /// <param name="id">The auxiliary hint ID</param>
+ /// <returns>The string value of the auxiliary hint ID</returns>
+ /// <since_tizen> preview </since_tizen>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string GetAuxiliaryHintValue(int id)
+ {
+ return Interop.Elementary.elm_win_aux_hint_val_get(RealHandle, id);
+ }
+
+ /// <summary>
+ /// Gets an ID of the auxiliary hint string.
+ /// </summary>
+ /// <remarks>
+ /// Support for this depends on the underlying windowing system.
+ /// </remarks>
+ /// <param name="hint">The auxiliary hint string</param>
+ /// <returns>The ID of the auxiliary hint, otherwise -1 on failure</returns>
+ /// <since_tizen> preview </since_tizen>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public int GetAuxiliaryHintId(string hint)
+ {
+ return Interop.Elementary.elm_win_aux_hint_id_get(RealHandle, hint);
+ }
+
+ /// <summary>
/// Creates a widget handle.
/// </summary>
/// <param name="parent">Parent EvasObject.</param>
[DllImport(Libraries.Elementary)]
internal static extern void elm_win_illume_command_send(IntPtr obj, IntPtr param);
+
+ [DllImport(Libraries.Elementary)]
+ internal static extern int elm_win_aux_hint_add(IntPtr obj, string hint, string val);
+
+ [DllImport(Libraries.Elementary)]
+ internal static extern bool elm_win_aux_hint_del(IntPtr obj, int id);
+
+ [DllImport(Libraries.Elementary)]
+ internal static extern bool elm_win_aux_hint_val_set(IntPtr obj, int id, string val);
+
+ [DllImport(Libraries.Elementary, EntryPoint = "elm_win_aux_hint_val_get")]
+ internal static extern IntPtr _elm_win_aux_hint_val_get(IntPtr obj, int id);
+
+ internal static string elm_win_aux_hint_val_get(IntPtr obj, int id)
+ {
+ return Marshal.PtrToStringAnsi(_elm_win_aux_hint_val_get(obj, id));
+ }
+
+ [DllImport(Libraries.Elementary)]
+ internal static extern int elm_win_aux_hint_id_get(IntPtr obj, string hint);
}
}
\ No newline at end of file
currentCultureInfo = GetFallbackCultureInfo(pLocale);
}
- CultureInfo.CurrentCulture = currentCultureInfo;
+ CultureInfo.CurrentUICulture = CultureInfo.CurrentCulture = currentCultureInfo;
}
private CultureInfo GetCultureInfo(string locale)
using System;
using System.Collections.Generic;
+using System.ComponentModel;
namespace Tizen.System
{
RuntimeInfo.UnsetCallback(runtimeFeature, callback);
}
+
+ // for internal use only
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ static void Preload()
+ {
+ TryGetValue("http://tizen.org/feature/screen.width", out int width);
+ TryGetValue("http://tizen.org/feature/screen.height", out int height);
+ }
}
}