[Tizen] manual binding for TextEditor and ApplicationExtension
authorxb.teng <xb.teng@samsung.com>
Wed, 7 Jun 2017 09:39:26 +0000 (17:39 +0800)
committerXianbing Teng <xb.teng@samsung.com>
Wed, 7 Jun 2017 09:40:15 +0000 (09:40 +0000)
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: Ie04411fa6ddfd48315aeb0d96d0a277105402cfe

src/Tizen.NUI/src/internal/ApplicationExtensions.cs
src/Tizen.NUI/src/internal/ManualPINVOKE.cs
src/Tizen.NUI/src/internal/NDalicPINVOKE.cs
src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs
src/Tizen.NUI/src/public/BaseComponents/View.cs
src/Tizen.NUI/src/public/NUIApplication.cs

index 8dd3e3be85c24267f4414272103f47289d0d6347..12a8e2cc859a732f442a933acc4a4ea9dd7fa468 100755 (executable)
@@ -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);
index 86da201e45eab1394859a651ecdafda111f0e483..5669090c3ab199604c45d9e7f5cbc0c16c7cc067 100755 (executable)
@@ -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();
 
index 6268803557d213189465f4cbe51f61790caf278d..b761dd2b06742edda638d9de731850c4ffbf82be 100755 (executable)
@@ -6115,6 +6115,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);
 
index 0b0647547659288d5f29e879cce6063a89840216..c49d3df978af172fdb43f1246a8f73fb44fa81ff 100755 (executable)
@@ -291,6 +291,10 @@ 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();
+
 
         }
 
@@ -1270,6 +1274,53 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
+        /// <summary>
+        /// The line count of text.
+        /// </summary>
+        public int LineCount
+        {
+            get
+            {
+                int temp = 0;
+                GetProperty(TextEditor.Property.LINE_COUNT).Get(out temp);
+                return temp;
+            }
+        }
+
+        /// <summary>
+        /// The text to display when the TextEditor is empty and inactive.
+        /// </summary>
+        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));
+            }
+        }
+
+        /// <summary>
+        /// The placeholder-text color.
+        /// </summary>
+        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));
+            }
+        }
+
     }
 
 }
index 082a9f5d81d79ee46992461e610483636a7e27b4..9f4a057a84223beb6591a058d956c8ceec940227 100755 (executable)
@@ -3382,6 +3382,18 @@ namespace Tizen.NUI.BaseComponents
             }
         }
 
+        /// <summary>
+        /// Gets the View's ID.
+        /// Readonly
+        /// </summary>
+        public uint ID
+        {
+            get
+            {
+                return GetId();
+            }
+        }
+
         /// <summary>
         /// Gets/Sets the status of whether an view should emit touch or hover signals.
         /// </summary>
index 420c1cea7678809096bca183796bd6878f7cdcab..7411f0c2076c9e071fa2ce3d2739c8aeab675066 100755 (executable)
@@ -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();