From baffd273236557a61060f09e132f0c54ab024229 Mon Sep 17 00:00:00 2001 From: dongsug-song <35130733+dongsug-song@users.noreply.github.com> Date: Thu, 2 Jul 2020 18:37:52 +0900 Subject: [PATCH] [NUI] Move to dali2 (#1787) - Revert "Revert "[NUI] Move to dali2 (#1745)" (#1768)" This reverts commit f6135c911e9797db229e49581d644b342f73b0b6. --- packaging/csapi-tizenfx.spec | 2 +- packaging/version.txt | 2 +- .../src/internal/Interop/Interop.TextField.cs | 6 +++++ .../src/internal/Interop/Interop.TextLabel.cs | 5 +++- .../src/internal/Interop/NDalicPINVOKE.cs | 4 +-- .../src/public/BaseComponents/TextField.cs | 29 ++++++++++++++++++++++ .../src/public/BaseComponents/TextLabel.cs | 19 ++++++++++++++ .../BaseComponents/TextLabelBindableProperty.cs | 19 ++++++++++++++ 8 files changed, 81 insertions(+), 5 deletions(-) diff --git a/packaging/csapi-tizenfx.spec b/packaging/csapi-tizenfx.spec index 785edf9..9474fca 100644 --- a/packaging/csapi-tizenfx.spec +++ b/packaging/csapi-tizenfx.spec @@ -1,7 +1,7 @@ # Auto-generated from csapi-tizenfx.spec.in by makespec.sh %define TIZEN_NET_API_VERSION 8 -%define TIZEN_NET_RPM_VERSION 8.0.0.999+nui550 +%define TIZEN_NET_RPM_VERSION 8.0.0.999+nui21916 %define TIZEN_NET_NUGET_VERSION 8.0.0.99999 %define DOTNET_ASSEMBLY_PATH /usr/share/dotnet.tizen/framework diff --git a/packaging/version.txt b/packaging/version.txt index 32ed833..865d13e 100755 --- a/packaging/version.txt +++ b/packaging/version.txt @@ -6,4 +6,4 @@ RPM_VERSION=8.0.0.999 NUGET_VERSION=8.0.0.99999 # RPM Version Suffix -RPM_VERSION_SUFFIX=nui550 +RPM_VERSION_SUFFIX=nui21916 diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.TextField.cs b/src/Tizen.NUI/src/internal/Interop/Interop.TextField.cs index cbadbb4..fd6b8a0 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.TextField.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.TextField.cs @@ -238,6 +238,12 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_TextField_Property_ENABLE_GRAB_HANDLE_POPUP_get")] public static extern int TextField_Property_ENABLE_GRAB_HANDLE_POPUP_get(); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_Property_SELECTED_TEXT_get")] + public static extern int TextField_Property_SELECTED_TEXT_get(); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_TextField_SelectNone")] + public static extern int TextField_SelectNone(global::System.Runtime.InteropServices.HandleRef jarg1); } } } \ No newline at end of file diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.TextLabel.cs b/src/Tizen.NUI/src/internal/Interop/Interop.TextLabel.cs index 2222426..eed22cc 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.TextLabel.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.TextLabel.cs @@ -97,7 +97,7 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_TextLabel_Property_ELLIPSIS_get")] public static extern int TextLabel_Property_ELLIPSIS_get(); - + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_TextLabel_Property_LINE_COUNT_get")] public static extern int TextLabel_Property_LINE_COUNT_get(); @@ -124,6 +124,9 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_TextLabel_Property_TEXT_FIT_get")] public static extern int TextLabel_Property_TEXT_FIT_get(); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_TextLabel_Property_MIN_LINE_SIZE_get")] + public static extern int TextLabel_Property_MIN_LINE_SIZE_get(); } } } \ No newline at end of file diff --git a/src/Tizen.NUI/src/internal/Interop/NDalicPINVOKE.cs b/src/Tizen.NUI/src/internal/Interop/NDalicPINVOKE.cs index b718808..1866739 100755 --- a/src/Tizen.NUI/src/internal/Interop/NDalicPINVOKE.cs +++ b/src/Tizen.NUI/src/internal/Interop/NDalicPINVOKE.cs @@ -20,7 +20,7 @@ namespace Tizen.NUI class NDalicPINVOKE { - public const string Lib = "libdali-csharp-binder.so"; + public const string Lib = "libdali2-csharp-binder.so"; protected class SWIGExceptionHelper { /// 3 @@ -271,4 +271,4 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_LowMemorySignal")] public static extern global::System.IntPtr Application_LowMemorySignal(global::System.Runtime.InteropServices.HandleRef jarg1); } -} \ No newline at end of file +} diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs index 8dbd269..af29c21 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs @@ -1102,6 +1102,22 @@ namespace Tizen.NUI.BaseComponents } /// + /// The Selected Text property. + /// + /// 8 + /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public string SelectedText + { + get + { + string temp; + GetProperty(TextField.Property.SELECTED_TEXT).Get(out temp); + return (string)temp; + } + } + + /// /// The Placeholder property. /// Gets or sets the placeholder: text, color, font family, font style, point size, and pixel size. /// @@ -1244,6 +1260,18 @@ namespace Tizen.NUI.BaseComponents if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Clear selection of the text. + /// + /// 8 + /// This will be public opened in tizen_6.0 after ACR done, Before ACR, need to be hidden as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public void TextField_SelectNone() + { + Interop.TextField.TextField_SelectNone(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TextField obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; @@ -1384,6 +1412,7 @@ namespace Tizen.NUI.BaseComponents internal static readonly int MATCH_SYSTEM_LANGUAGE_DIRECTION = Interop.TextField.TextField_Property_MATCH_SYSTEM_LANGUAGE_DIRECTION_get(); internal static readonly int ENABLE_GRAB_HANDLE = Interop.TextField.TextField_Property_ENABLE_GRAB_HANDLE_get(); internal static readonly int ENABLE_GRAB_HANDLE_POPUP = Interop.TextField.TextField_Property_ENABLE_GRAB_HANDLE_POPUP_get(); + internal static readonly int SELECTED_TEXT = Interop.TextField.TextField_Property_SELECTED_TEXT_get(); } internal class InputStyle diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs index d8915d2..22ea579 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs @@ -855,6 +855,24 @@ namespace Tizen.NUI.BaseComponents } /// + /// The MinLineSize property.
+ ///
+ /// 8 + [EditorBrowsable(EditorBrowsableState.Never)] + public float MinLineSize + { + get + { + return (float)GetValue(MinLineSizeProperty); + } + set + { + SetValue(MinLineSizeProperty, value); + NotifyPropertyChangedAndRequestLayout(); + } + } + + /// /// Downcasts a handle to textLabel handle /// /// @@ -1064,6 +1082,7 @@ namespace Tizen.NUI.BaseComponents internal static readonly int VERTICAL_LINE_ALIGNMENT = Interop.TextLabel.TextLabel_Property_VERTICAL_LINE_ALIGNMENT_get(); internal static readonly int MATCH_SYSTEM_LANGUAGE_DIRECTION = Interop.TextLabel.TextLabel_Property_MATCH_SYSTEM_LANGUAGE_DIRECTION_get(); internal static readonly int TEXT_FIT = Interop.TextLabel.TextLabel_Property_TEXT_FIT_get(); + internal static readonly int MIN_LINE_SIZE = Interop.TextLabel.TextLabel_Property_MIN_LINE_SIZE_get(); } private void OnShadowColorChanged(float x, float y, float z, float w) diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextLabelBindableProperty.cs b/src/Tizen.NUI/src/public/BaseComponents/TextLabelBindableProperty.cs index 14b98a4..7f419cd 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextLabelBindableProperty.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextLabelBindableProperty.cs @@ -523,5 +523,24 @@ namespace Tizen.NUI.BaseComponents Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.TEXT_FIT).Get(temp); return temp; }); + + /// Only for XAML. No need of public API. Make hidden as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] + public static readonly BindableProperty MinLineSizeProperty = BindableProperty.Create(nameof(MinLineSize), typeof(float), typeof(TextLabel), default(float), propertyChanged: (bindable, oldValue, newValue) => + { + var textLabel = (TextLabel)bindable; + if (newValue != null) + { + Tizen.NUI.Object.SetProperty(textLabel.swigCPtr, TextLabel.Property.MIN_LINE_SIZE, new Tizen.NUI.PropertyValue((float)newValue)); + } + }, + defaultValueCreator: (bindable) => + { + var textLabel = (TextLabel)bindable; + float temp = 0.0f; + Tizen.NUI.Object.GetProperty(textLabel.swigCPtr, TextLabel.Property.MIN_LINE_SIZE).Get(out temp); + return temp; + }); + } } -- 2.7.4