From b99dcbf077510f16feb72b394b7d165da01110cb Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Tue, 25 Jul 2017 10:44:12 +0900 Subject: [PATCH] Revert "[Tizen] Manual binding for TextEditor,TextField,Application,Window" This reverts commit 82d656962d8db3878100d9534660ab440e6ad06d. Change-Id: Ic29b00301fec92ef3be8bf4511ba8c932adaf7d1 --- .../NUISamples.TizenTV/examples/text-test.cs | 16 +---- src/Tizen.NUI/src/internal/Application.cs | 7 -- src/Tizen.NUI/src/internal/ManualPINVOKE.cs | 26 +------ src/Tizen.NUI/src/internal/NDalicPINVOKE.cs | 4 -- src/Tizen.NUI/src/internal/ResizedSignal.cs | 4 +- src/Tizen.NUI/src/internal/Uint16Pair.cs | 2 +- .../src/public/BaseComponents/TextEditor.cs | 36 ---------- .../src/public/BaseComponents/TextField.cs | 36 ---------- src/Tizen.NUI/src/public/Window.cs | 82 ++++++---------------- 9 files changed, 27 insertions(+), 186 deletions(-) diff --git a/NUISamples/NUISamples/NUISamples.TizenTV/examples/text-test.cs b/NUISamples/NUISamples/NUISamples.TizenTV/examples/text-test.cs index aa8bd54..9327182 100755 --- a/NUISamples/NUISamples/NUISamples.TizenTV/examples/text-test.cs +++ b/NUISamples/NUISamples/NUISamples.TizenTV/examples/text-test.cs @@ -89,7 +89,6 @@ namespace TextTest hiddenMap.Add(HiddenInputProperty.SubstituteCount, new PropertyValue(4)); hiddenMap.Add(HiddenInputProperty.SubstituteCharacter, new PropertyValue(0x23)); field.HiddenInputSettings = hiddenMap; - field.EnableSelection = true; window.Add(field); InputMethod inputMethod = new InputMethod(); @@ -100,25 +99,14 @@ namespace TextTest field.InputMethodSettings = inputMethod.OutputMap; - PropertyMap propertyMap = new PropertyMap(); - propertyMap.Add("placeholderText", new PropertyValue("Setting Placeholder Text")); - propertyMap.Add("placeholderColor", new PropertyValue(Color.Red)); - propertyMap.Add("placeholderPointSize", new PropertyValue(12.0f)); - - PropertyMap fontStyleMap = new PropertyMap(); - fontStyleMap.Add("weight", new PropertyValue("bold")); - fontStyleMap.Add("width", new PropertyValue("condensed")); - fontStyleMap.Add("slant", new PropertyValue("italic")); - propertyMap.Add("placeholderFontStyle", new PropertyValue(fontStyleMap)); - TextEditor editor = new TextEditor(); editor.Size2D = new Size2D(400, 100); editor.Position2D = new Position2D(10, 550); editor.BackgroundColor = Color.Magenta; + editor.PlaceholderText = "input someth..."; + editor.PlaceholderTextColor = Color.Red; editor.EnableScrollBar = true; - editor.EnableSelection = true; editor.Focusable = true; - editor.Placeholder = propertyMap; FocusManager.Instance.SetCurrentFocusView(editor); window.Add(editor); editor.TextChanged += (obj, e) => { diff --git a/src/Tizen.NUI/src/internal/Application.cs b/src/Tizen.NUI/src/internal/Application.cs index 4e68bfe..6245971 100755 --- a/src/Tizen.NUI/src/internal/Application.cs +++ b/src/Tizen.NUI/src/internal/Application.cs @@ -1175,13 +1175,6 @@ namespace Tizen.NUI return ret; } - public static Application New(int argc, string stylesheet, Application.WindowMode windowMode, Rectangle positionSize) - { - Application ret = new Application(NDalicPINVOKE.Application_New__SWIG_4(argc, stylesheet, (int)windowMode, Rectangle.getCPtr(positionSize)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - public Application() : this(NDalicPINVOKE.new_Application__SWIG_0(), true) { NUILog.Debug("Application() is called!"); diff --git a/src/Tizen.NUI/src/internal/ManualPINVOKE.cs b/src/Tizen.NUI/src/internal/ManualPINVOKE.cs index ff5456b..d5e3da9 100755 --- a/src/Tizen.NUI/src/internal/ManualPINVOKE.cs +++ b/src/Tizen.NUI/src/internal/ManualPINVOKE.cs @@ -581,24 +581,12 @@ namespace Tizen.NUI [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_TextEditor_Property_ENABLE_SELECTION_get")] - public static extern int TextEditor_Property_ENABLE_SELECTION_get(); - - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextEditor_Property_PLACEHOLDER_get")] - public static extern int TextEditor_Property_PLACEHOLDER_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(); [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextField_Property_PIXEL_SIZE_get")] public static extern int TextField_Property_PIXEL_SIZE_get(); - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextField_Property_ENABLE_SELECTION_get")] - public static extern int TextField_Property_ENABLE_SELECTION_get(); - - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextField_Property_PLACEHOLDER_get")] - public static extern int TextField_Property_PLACEHOLDER_get(); - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_TextLabel_Property_PIXEL_SIZE_get")] public static extern int TextLabel_Property_PIXEL_SIZE_get(); @@ -724,7 +712,7 @@ namespace Tizen.NUI public static extern void ResizedSignal_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_ResizedSignal_Emit")] - public static extern void ResizedSignal_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + public static extern void ResizedSignal_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3); [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_new_ResizedSignal")] public static extern global::System.IntPtr new_ResizedSignal(); @@ -863,17 +851,5 @@ namespace Tizen.NUI [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_WidgetViewManager_SWIGUpcast")] public static extern global::System.IntPtr WidgetViewManager_SWIGUpcast(global::System.IntPtr jarg1); - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Window_SetSize")] - public static extern void SetSize(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Window_GetSize")] - public static extern global::System.IntPtr GetSize(global::System.Runtime.InteropServices.HandleRef jarg1); - - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Window_SetPosition")] - public static extern void SetPosition(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_Window_GetPosition")] - public static extern global::System.IntPtr GetPosition(global::System.Runtime.InteropServices.HandleRef jarg1); - } } diff --git a/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs b/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs index 5b57314..caee01f 100755 --- a/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs +++ b/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs @@ -6421,10 +6421,6 @@ class NDalicPINVOKE { [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_ApplicationControlSignal")] public static extern void delete_ApplicationControlSignal(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Dali_Application_New__SWIG_4")] - public static extern global::System.IntPtr Application_New__SWIG_4(int jarg1, string jarg3, int jarg4, global::System.Runtime.InteropServices.HandleRef jarg5); - - [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_TimerSignalType_Empty")] public static extern bool TimerSignalType_Empty(global::System.Runtime.InteropServices.HandleRef jarg1); diff --git a/src/Tizen.NUI/src/internal/ResizedSignal.cs b/src/Tizen.NUI/src/internal/ResizedSignal.cs index 04fb093..ba4c40e 100755 --- a/src/Tizen.NUI/src/internal/ResizedSignal.cs +++ b/src/Tizen.NUI/src/internal/ResizedSignal.cs @@ -130,9 +130,9 @@ namespace Tizen.NUI } } - public void Emit(Uint16Pair arg) + public void Emit(int arg1, int arg2) { - NDalicManualPINVOKE.ResizedSignal_Emit(swigCPtr, Uint16Pair.getCPtr(arg)); + NDalicManualPINVOKE.ResizedSignal_Emit(swigCPtr, arg1, arg2); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } diff --git a/src/Tizen.NUI/src/internal/Uint16Pair.cs b/src/Tizen.NUI/src/internal/Uint16Pair.cs index df8995d..bd5c273 100755 --- a/src/Tizen.NUI/src/internal/Uint16Pair.cs +++ b/src/Tizen.NUI/src/internal/Uint16Pair.cs @@ -17,7 +17,7 @@ namespace Tizen.NUI { - public class Uint16Pair : global::System.IDisposable + internal class Uint16Pair : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs index 6900bc4..9c74c31 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs @@ -277,8 +277,6 @@ namespace Tizen.NUI.BaseComponents 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(); - internal static readonly int ENABLE_SELECTION = NDalicManualPINVOKE.TextEditor_Property_ENABLE_SELECTION_get(); - internal static readonly int PLACEHOLDER = NDalicManualPINVOKE.TextEditor_Property_PLACEHOLDER_get(); } @@ -1191,40 +1189,6 @@ namespace Tizen.NUI.BaseComponents } } - /// - /// Enable selection property. - /// - public bool EnableSelection - { - get - { - bool temp = false; - GetProperty(TextEditor.Property.ENABLE_SELECTION).Get(out temp); - return temp; - } - set - { - SetProperty(TextEditor.Property.ENABLE_SELECTION, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Placeholder property. - /// - public Tizen.NUI.PropertyMap Placeholder - { - get - { - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - GetProperty(TextEditor.Property.PLACEHOLDER).Get(temp); - return temp; - } - set - { - SetProperty(TextEditor.Property.PLACEHOLDER, new Tizen.NUI.PropertyValue(value)); - } - } - } } diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs index 7bb8f3f..09ac6c1 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs @@ -258,8 +258,6 @@ namespace Tizen.NUI.BaseComponents internal static readonly int INPUT_OUTLINE = NDalicPINVOKE.TextField_Property_INPUT_OUTLINE_get(); internal static readonly int HIDDEN_INPUT_SETTINGS = NDalicManualPINVOKE.TextField_Property_HIDDEN_INPUT_SETTINGS_get(); internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextField_Property_PIXEL_SIZE_get(); - internal static readonly int ENABLE_SELECTION = NDalicManualPINVOKE.TextField_Property_ENABLE_SELECTION_get(); - internal static readonly int PLACEHOLDER = NDalicManualPINVOKE.TextField_Property_PLACEHOLDER_get(); } @@ -1220,40 +1218,6 @@ namespace Tizen.NUI.BaseComponents } } - /// - /// Enable selection property. - /// - public bool EnableSelection - { - get - { - bool temp = false; - GetProperty(TextField.Property.ENABLE_SELECTION).Get(out temp); - return temp; - } - set - { - SetProperty(TextField.Property.ENABLE_SELECTION, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Placeholder property. - /// - public Tizen.NUI.PropertyMap Placeholder - { - get - { - Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - GetProperty(TextField.Property.PLACEHOLDER).Get(temp); - return temp; - } - set - { - SetProperty(TextField.Property.PLACEHOLDER, new Tizen.NUI.PropertyValue(value)); - } - } - } } diff --git a/src/Tizen.NUI/src/public/Window.cs b/src/Tizen.NUI/src/public/Window.cs index 7a610fd..24c5fbe 100755 --- a/src/Tizen.NUI/src/public/Window.cs +++ b/src/Tizen.NUI/src/public/Window.cs @@ -1158,24 +1158,37 @@ namespace Tizen.NUI public class ResizedEventArgs : EventArgs { - Uint16Pair _windowSize; + int _width; + int _height; - public Uint16Pair WindowSize + public int Width { get { - return _windowSize; + return _width; } set { - _windowSize = value; + _width = value; + } + } + + public int Height + { + get + { + return _height; + } + set + { + _height = value; } } } private WindowResizedEventCallbackType _windowResizedEventCallback; [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void WindowResizedEventCallbackType(Uint16Pair windowSize); + private delegate void WindowResizedEventCallbackType(int width, int height); private event EventHandler _windowResizedEventHandler; public event EventHandler Resized @@ -1201,10 +1214,11 @@ namespace Tizen.NUI } } - private void OnResized(Uint16Pair windowSize) + private void OnResized(int width, int height) { ResizedEventArgs e = new ResizedEventArgs(); - e.WindowSize = windowSize; + e.Width = width; + e.Height = height; if (_windowResizedEventHandler != null) { @@ -1212,32 +1226,6 @@ namespace Tizen.NUI } } - internal void SetWindowSize(Uint16Pair size) - { - NDalicManualPINVOKE.SetSize(swigCPtr, Uint16Pair.getCPtr(size)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal Uint16Pair GetWindowSize() - { - Uint16Pair ret = new Uint16Pair(NDalicManualPINVOKE.GetSize(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal void SetPosition(Uint16Pair position) - { - NDalicManualPINVOKE.SetPosition(swigCPtr, Uint16Pair.getCPtr(position)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal Uint16Pair GetPosition() - { - Uint16Pair ret = new Uint16Pair(NDalicManualPINVOKE.GetPosition(swigCPtr), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - /// /// Window size property (read-only). /// @@ -1362,35 +1350,7 @@ namespace Tizen.NUI } } - /// - /// Gets/Sets a size of the window. - /// - public Uint16Pair WindowSize - { - get - { - return GetWindowSize(); - } - set - { - SetWindowSize(value); - } - } - /// - /// Gets/Sets a position of the window. - /// - public Uint16Pair WindowPosition - { - get - { - return GetPosition(); - } - set - { - SetPosition(value); - } - } } -- 2.7.4