From: xb.teng Date: Tue, 13 Jun 2017 02:43:37 +0000 (+0800) Subject: manual binding for TextEditor and ApplicationExtension X-Git-Tag: submit/trunk/20170823.075128~91^2~35^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8030f281025fe9764ec3672e69e4acff4d633c98;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git manual binding for TextEditor and ApplicationExtension There are changes: 1. Add properties LineCount/PlaceholderText/PlaceholderTextColor for TextEditor 2. Add property ID for View 3. Add api Start for ApplicationExtensions 4. Update text sample to test new features. Change-Id: Ie2138c383c1965b421255422a435fd7f16b231c3 --- diff --git a/src/Tizen.NUI/src/internal/ApplicationExtensions.cs b/src/Tizen.NUI/src/internal/ApplicationExtensions.cs index 8dd3e3b..12a8e2c 100755 --- a/src/Tizen.NUI/src/internal/ApplicationExtensions.cs +++ b/src/Tizen.NUI/src/internal/ApplicationExtensions.cs @@ -109,6 +109,12 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + public void Start() + { + NDalicPINVOKE.ApplicationExtensions_Start(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + public void Terminate() { NDalicPINVOKE.ApplicationExtensions_Terminate(swigCPtr); diff --git a/src/Tizen.NUI/src/internal/ManualPINVOKE.cs b/src/Tizen.NUI/src/internal/ManualPINVOKE.cs index 86da201..5669090 100755 --- a/src/Tizen.NUI/src/internal/ManualPINVOKE.cs +++ b/src/Tizen.NUI/src/internal/ManualPINVOKE.cs @@ -566,6 +566,15 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextEditor_Property_PIXEL_SIZE_get")] public static extern int TextEditor_Property_PIXEL_SIZE_get(); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextEditor_Property_LINE_COUNT_get")] + public static extern int TextEditor_Property_LINE_COUNT_get(); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextEditor_Property_PLACEHOLDER_TEXT_get")] + public static extern int TextEditor_Property_PLACEHOLDER_TEXT_get(); + + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextEditor_Property_PLACEHOLDER_TEXT_COLOR_get")] + public static extern int TextEditor_Property_PLACEHOLDER_TEXT_COLOR_get(); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextField_Property_HIDDEN_INPUT_SETTINGS_get")] public static extern int TextField_Property_HIDDEN_INPUT_SETTINGS_get(); diff --git a/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs b/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs index e3377d7..7cff7dd 100755 --- a/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs +++ b/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs @@ -6124,6 +6124,9 @@ class NDalicPINVOKE { [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_ApplicationExtensions_Init")] public static extern void ApplicationExtensions_Init(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_ApplicationExtensions_Start")] + public static extern void ApplicationExtensions_Start(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_ApplicationExtensions_Terminate")] public static extern void ApplicationExtensions_Terminate(global::System.Runtime.InteropServices.HandleRef jarg1); diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs index f8d209e..2b7b678 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs @@ -207,6 +207,9 @@ namespace Tizen.NUI.BaseComponents internal static readonly int SCROLL_BAR_SHOW_DURATION = NDalicManualPINVOKE.TextEditor_Property_SCROLL_BAR_SHOW_DURATION_get(); internal static readonly int SCROLL_BAR_FADE_DURATION = NDalicManualPINVOKE.TextEditor_Property_SCROLL_BAR_FADE_DURATION_get(); internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextEditor_Property_PIXEL_SIZE_get(); + internal static readonly int LINE_COUNT = NDalicManualPINVOKE.TextEditor_Property_LINE_COUNT_get(); + internal static readonly int PLACEHOLDER_TEXT = NDalicManualPINVOKE.TextEditor_Property_PLACEHOLDER_TEXT_get(); + internal static readonly int PLACEHOLDER_TEXT_COLOR = NDalicManualPINVOKE.TextEditor_Property_PLACEHOLDER_TEXT_COLOR_get(); } @@ -1071,6 +1074,53 @@ namespace Tizen.NUI.BaseComponents } } + /// + /// The line count of text. + /// + public int LineCount + { + get + { + int temp = 0; + GetProperty(TextEditor.Property.LINE_COUNT).Get(out temp); + return temp; + } + } + + /// + /// The text to display when the TextEditor is empty and inactive. + /// + public string PlaceholderText + { + get + { + string temp; + GetProperty(TextEditor.Property.PLACEHOLDER_TEXT).Get(out temp); + return temp; + } + set + { + SetProperty(TextEditor.Property.PLACEHOLDER_TEXT, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// The placeholder-text color. + /// + public Color PlaceholderTextColor + { + get + { + Color temp = new Color(0.0f, 0.0f, 0.0f, 0.0f); + GetProperty(TextEditor.Property.PLACEHOLDER_TEXT_COLOR).Get(temp); + return temp; + } + set + { + SetProperty(TextEditor.Property.PLACEHOLDER_TEXT_COLOR, new Tizen.NUI.PropertyValue(value)); + } + } + } } diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index 5ecda10..9499b4a 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -3116,6 +3116,18 @@ namespace Tizen.NUI.BaseComponents } /// + /// Gets the View's ID. + /// Readonly + /// + public uint ID + { + get + { + return GetId(); + } + } + + /// /// Gets/Sets the status of whether an view should emit touch or hover signals. /// public bool Sensitive diff --git a/src/Tizen.NUI/src/public/NUIApplication.cs b/src/Tizen.NUI/src/public/NUIApplication.cs index 420c1ce..7411f0c 100755 --- a/src/Tizen.NUI/src/public/NUIApplication.cs +++ b/src/Tizen.NUI/src/public/NUIApplication.cs @@ -133,6 +133,7 @@ namespace Tizen.NUI } _applicationExt = new ApplicationExtensions(_application); _applicationExt.Init(); + _applicationExt.Start(); // This is also required to create DisposeQueue on main thread. disposeQ.Initialize();