From 0c1fc5eb30b890074252013bd1b5b5935168cb1a Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Wed, 21 Jun 2017 16:32:35 +0900 Subject: [PATCH] [Tizen] to match previous version Change-Id: If3d66620d73db7b61cfc4ee94487561120ac2c3f Signed-off-by: dongsug.song --- Tizen.NUI/src/internal/Application.cs | 34 +- Tizen.NUI/src/public/BaseComponents/ImageView.cs | 21 +- Tizen.NUI/src/public/BaseComponents/TableView.cs | 8 +- Tizen.NUI/src/public/BaseComponents/TextEditor.cs | 6 +- Tizen.NUI/src/public/BaseComponents/TextField.cs | 6 +- Tizen.NUI/src/public/BaseComponents/TextLabel.cs | 22 +- Tizen.NUI/src/public/BaseComponents/VideoView.cs | 8 +- Tizen.NUI/src/public/BaseComponents/View.cs | 245 ++++++-- Tizen.NUI/src/public/FocusManager.cs | 71 ++- Tizen.NUI/src/public/KeyFrames.cs | 8 +- Tizen.NUI/src/public/Layer.cs | 734 +++++++++++----------- Tizen.NUI/src/public/Path.cs | 12 +- Tizen.NUI/src/public/Timer.cs | 6 +- Tizen.NUI/src/public/UIComponents/PushButton.cs | 216 ++++--- Tizen.NUI/src/public/UIComponents/ScrollBar.cs | 8 +- Tizen.NUI/src/public/Window.cs | 28 +- 16 files changed, 836 insertions(+), 597 deletions(-) diff --git a/Tizen.NUI/src/internal/Application.cs b/Tizen.NUI/src/internal/Application.cs index 1509e70..aac9d6a 100755 --- a/Tizen.NUI/src/internal/Application.cs +++ b/Tizen.NUI/src/internal/Application.cs @@ -55,7 +55,7 @@ namespace Tizen.NUI * @brief Event arguments that passed via NUIApplicationTerminate signal * */ - internal class NUIApplicationTerminatingEventArgs : EventArgs + internal class NUIApplicationTerminateEventArgs : EventArgs { private Application _application; /** @@ -79,7 +79,7 @@ namespace Tizen.NUI * @brief Event arguments that passed via NUIApplicationPause signal * */ - internal class NUIApplicationPausedEventArgs : EventArgs + internal class NUIApplicationPauseEventArgs : EventArgs { private Application _application; /** @@ -103,7 +103,7 @@ namespace Tizen.NUI * @brief Event arguments that passed via NUIApplicationResume signal * */ - internal class NUIApplicationResumedEventArgs : EventArgs + internal class NUIApplicationResumeEventArgs : EventArgs { private Application _application; /** @@ -151,7 +151,7 @@ namespace Tizen.NUI * @brief Event arguments that passed via NUIApplicationResize signal * */ - internal class NUIApplicationResizedEventArgs : EventArgs + internal class NUIApplicationResizeEventArgs : EventArgs { private Application _application; /** @@ -368,18 +368,18 @@ namespace Tizen.NUI [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void NUIApplicationTerminateEventCallbackDelegate(IntPtr application); - private DaliEventHandler _applicationTerminateEventHandler; + private DaliEventHandler _applicationTerminateEventHandler; private NUIApplicationTerminateEventCallbackDelegate _applicationTerminateEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void NUIApplicationPauseEventCallbackDelegate(IntPtr application); - private DaliEventHandler _applicationPauseEventHandler; + private DaliEventHandler _applicationPauseEventHandler; private NUIApplicationPauseEventCallbackDelegate _applicationPauseEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void NUIApplicationResumeEventCallbackDelegate(IntPtr application); - private DaliEventHandler _applicationResumeEventHandler; + private DaliEventHandler _applicationResumeEventHandler; private NUIApplicationResumeEventCallbackDelegate _applicationResumeEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] @@ -389,7 +389,7 @@ namespace Tizen.NUI [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void NUIApplicationResizeEventCallbackDelegate(IntPtr application); - private DaliEventHandler _applicationResizeEventHandler; + private DaliEventHandler _applicationResizeEventHandler; private NUIApplicationResizeEventCallbackDelegate _applicationResizeEventCallbackDelegate; [UnmanagedFunctionPointer(CallingConvention.StdCall)] @@ -474,9 +474,9 @@ namespace Tizen.NUI /** * @brief Event for Terminated signal which can be used to subscribe/unsubscribe the event handler * (in the type of NUIApplicationTerminateEventHandler-DaliEventHandler) - * provided by the user. Terminated signal is emitted when application is terminating + * provided by the user. Terminated signal is emitted when application is terminated */ - public event DaliEventHandler Terminating + public event DaliEventHandler Terminated { add { @@ -510,7 +510,7 @@ namespace Tizen.NUI // Callback for Application TerminateSignal private void OnNUIApplicationTerminate(IntPtr data) { - NUIApplicationTerminatingEventArgs e = new NUIApplicationTerminatingEventArgs(); + NUIApplicationTerminateEventArgs e = new NUIApplicationTerminateEventArgs(); // Populate all members of "e" (NUIApplicationTerminateEventArgs) with real data e.Application = Application.GetApplicationFromPtr(data); @@ -527,7 +527,7 @@ namespace Tizen.NUI * (in the type of NUIApplicationPauseEventHandler-DaliEventHandler) * provided by the user. Paused signal is emitted when application is paused */ - public event DaliEventHandler Paused + public event DaliEventHandler Paused { add { @@ -561,7 +561,7 @@ namespace Tizen.NUI // Callback for Application PauseSignal private void OnNUIApplicationPause(IntPtr data) { - NUIApplicationPausedEventArgs e = new NUIApplicationPausedEventArgs(); + NUIApplicationPauseEventArgs e = new NUIApplicationPauseEventArgs(); // Populate all members of "e" (NUIApplicationPauseEventArgs) with real data e.Application = Application.GetApplicationFromPtr(data); @@ -578,7 +578,7 @@ namespace Tizen.NUI * (in the type of NUIApplicationResumeEventHandler-DaliEventHandler) * provided by the user. Resumed signal is emitted when application is resumed */ - public event DaliEventHandler Resumed + public event DaliEventHandler Resumed { add { @@ -612,7 +612,7 @@ namespace Tizen.NUI // Callback for Application ResumeSignal private void OnNUIApplicationResume(IntPtr data) { - NUIApplicationResumedEventArgs e = new NUIApplicationResumedEventArgs(); + NUIApplicationResumeEventArgs e = new NUIApplicationResumeEventArgs(); // Populate all members of "e" (NUIApplicationResumeEventArgs) with real data e.Application = Application.GetApplicationFromPtr(data); @@ -680,7 +680,7 @@ namespace Tizen.NUI * (in the type of NUIApplicationResizeEventHandler-DaliEventHandler) * provided by the user. Resized signal is emitted when application is resized */ - public event DaliEventHandler Resized + public event DaliEventHandler Resized { add { @@ -714,7 +714,7 @@ namespace Tizen.NUI // Callback for Application ResizeSignal private void OnNUIApplicationResize(IntPtr data) { - NUIApplicationResizedEventArgs e = new NUIApplicationResizedEventArgs(); + NUIApplicationResizeEventArgs e = new NUIApplicationResizeEventArgs(); // Populate all members of "e" (NUIApplicationResizeEventArgs) with real data e.Application = Application.GetApplicationFromPtr(data); diff --git a/Tizen.NUI/src/public/BaseComponents/ImageView.cs b/Tizen.NUI/src/public/BaseComponents/ImageView.cs index 7152e60..f398e7a 100755 --- a/Tizen.NUI/src/public/BaseComponents/ImageView.cs +++ b/Tizen.NUI/src/public/BaseComponents/ImageView.cs @@ -111,7 +111,7 @@ namespace Tizen.NUI.BaseComponents private void OnResourceReady(IntPtr data) { ResourceReadyEventArgs e = new ResourceReadyEventArgs(); - if(data != null) + if (data != null) { e.View = View.GetViewFromPtr(data); } @@ -130,7 +130,7 @@ namespace Tizen.NUI.BaseComponents return; } - if(type == DisposeTypes.Explicit) + if (type == DisposeTypes.Explicit) { //Called by User //Release your own managed resources here. @@ -188,16 +188,12 @@ namespace Tizen.NUI.BaseComponents { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - + } + /// - /// Downcasts a handle to ImageView handle.
- /// If handle points to a ImageView, the downcast produces valid handle.
- /// If not, the returned handle is left uninitialized.
+ /// this method will be changed as internal method on later release ///
- /// Handle to an object - /// Handle to a ImageView or an uninitialized handle - internal new static ImageView DownCast(BaseHandle handle) + public new static ImageView DownCast(BaseHandle handle) { ImageView ret = new ImageView(NDalicPINVOKE.ImageView_DownCast(BaseHandle.getCPtr(handle)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -219,7 +215,8 @@ namespace Tizen.NUI.BaseComponents if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - internal ViewResourceReadySignal ResourceReadySignal(View view) { + internal ViewResourceReadySignal ResourceReadySignal(View view) + { ViewResourceReadySignal ret = new ViewResourceReadySignal(NDalicPINVOKE.ResourceReadySignal(View.getCPtr(view)), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; @@ -383,7 +380,7 @@ namespace Tizen.NUI.BaseComponents if (_synchronousLoading != null) _nPatchMap.Add(NpatchImageVisualProperty.SynchronousLoading, new PropertyValue((bool)_synchronousLoading)); SetProperty(ImageView.Property.IMAGE, new PropertyValue(_nPatchMap)); } - else if(_synchronousLoading != null) + else if (_synchronousLoading != null) { // for normal image, with synchronous loading property PropertyMap imageMap = new PropertyMap(); imageMap.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image)); diff --git a/Tizen.NUI/src/public/BaseComponents/TableView.cs b/Tizen.NUI/src/public/BaseComponents/TableView.cs index 7d8c0c7..432cf86 100755 --- a/Tizen.NUI/src/public/BaseComponents/TableView.cs +++ b/Tizen.NUI/src/public/BaseComponents/TableView.cs @@ -328,13 +328,9 @@ namespace Tizen.NUI.BaseComponents } /// - /// Downcasts a handle to TableView handle.
- /// If handle points to a TableView, the downcast produces valid handle.
- /// If not, the returned handle is left uninitialized.
+ /// this method will be changed as internal method on later release ///
- /// Handle to an object - /// Handle to a TableView or an uninitialized handle - internal new static TableView DownCast(BaseHandle handle) + public new static TableView DownCast(BaseHandle handle) { TableView ret = new TableView(NDalicPINVOKE.TableView_DownCast(BaseHandle.getCPtr(handle)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); diff --git a/Tizen.NUI/src/public/BaseComponents/TextEditor.cs b/Tizen.NUI/src/public/BaseComponents/TextEditor.cs index 26fd4c2..3b40ef5 100755 --- a/Tizen.NUI/src/public/BaseComponents/TextEditor.cs +++ b/Tizen.NUI/src/public/BaseComponents/TextEditor.cs @@ -331,11 +331,9 @@ namespace Tizen.NUI.BaseComponents } /// - /// Downcasts a handle to TextEditor. + /// this method will be changed as internal method on later release /// - /// Handle to an object - /// Handle to a TextEditor or an empty handle - internal new static TextEditor DownCast(BaseHandle handle) + public new static TextEditor DownCast(BaseHandle handle) { TextEditor ret = new TextEditor(NDalicPINVOKE.TextEditor_DownCast(BaseHandle.getCPtr(handle)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); diff --git a/Tizen.NUI/src/public/BaseComponents/TextField.cs b/Tizen.NUI/src/public/BaseComponents/TextField.cs index db3c3e7..fa90ade 100755 --- a/Tizen.NUI/src/public/BaseComponents/TextField.cs +++ b/Tizen.NUI/src/public/BaseComponents/TextField.cs @@ -312,11 +312,9 @@ namespace Tizen.NUI.BaseComponents } /// - /// Downcasts a handle to TextField. + /// this method will be changed as internal method on later release /// - /// Handle to an object - /// Handle to a TextField or an empty handle - internal new static TextField DownCast(BaseHandle handle) + public new static TextField DownCast(BaseHandle handle) { TextField ret = new TextField(NDalicPINVOKE.TextField_DownCast(BaseHandle.getCPtr(handle)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); diff --git a/Tizen.NUI/src/public/BaseComponents/TextLabel.cs b/Tizen.NUI/src/public/BaseComponents/TextLabel.cs index 0ebbfe1..5b8b045 100755 --- a/Tizen.NUI/src/public/BaseComponents/TextLabel.cs +++ b/Tizen.NUI/src/public/BaseComponents/TextLabel.cs @@ -110,8 +110,8 @@ namespace Tizen.NUI.BaseComponents internal static readonly int PIXEL_SIZE = NDalicManualPINVOKE.TextLabel_Property_PIXEL_SIZE_get(); internal static readonly int ELLIPSIS = NDalicManualPINVOKE.TextLabel_Property_ELLIPSIS_get(); internal static readonly int AUTO_SCROLL_STOP_MODE = NDalicManualPINVOKE.TextLabel_Property_AUTO_SCROLL_STOP_MODE_get(); - internal static readonly int AUTO_SCROLL_LOOP_DELAY = NDalicManualPINVOKE.TextLabel_Property_AUTO_SCROLL_LOOP_DELAY_get(); - + internal static readonly int AUTO_SCROLL_LOOP_DELAY = NDalicManualPINVOKE.TextLabel_Property_AUTO_SCROLL_LOOP_DELAY_get(); + internal static readonly int LINE_COUNT = OUTLINE + 5; } /// @@ -139,10 +139,9 @@ namespace Tizen.NUI.BaseComponents /// - /// Downcasts a handle to TextLabel. + /// this method will be changed as internal method on later release /// - /// Handle to an object - internal new static TextLabel DownCast(BaseHandle handle) + public new static TextLabel DownCast(BaseHandle handle) { TextLabel ret = new TextLabel(NDalicPINVOKE.TextLabel_DownCast(BaseHandle.getCPtr(handle)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -725,6 +724,19 @@ namespace Tizen.NUI.BaseComponents { SetProperty(TextLabel.Property.AUTO_SCROLL_STOP_MODE, new Tizen.NUI.PropertyValue((int)value)); } + } + + /// + /// The line count of text. + /// + public int LineCount + { + get + { + int temp = 0; + GetProperty(TextLabel.Property.LINE_COUNT).Get(out temp); + return temp; + } } } diff --git a/Tizen.NUI/src/public/BaseComponents/VideoView.cs b/Tizen.NUI/src/public/BaseComponents/VideoView.cs index 13e4b4b..a73b79a 100755 --- a/Tizen.NUI/src/public/BaseComponents/VideoView.cs +++ b/Tizen.NUI/src/public/BaseComponents/VideoView.cs @@ -192,13 +192,9 @@ namespace Tizen.NUI.BaseComponents } /// - /// Downcasts a handle to VideoView handle.
- /// If handle points to a VideoView, the downcast produces valid handle.
- /// If not, the returned handle is left uninitialized.
+ /// this method will be changed as internal method on later release ///
- /// Handle to an object - /// Handle to a VideoView or an uninitialized handle - internal new static VideoView DownCast(BaseHandle handle) + public new static VideoView DownCast(BaseHandle handle) { VideoView ret = new VideoView(NDalicPINVOKE.VideoView_DownCast(BaseHandle.getCPtr(handle)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); diff --git a/Tizen.NUI/src/public/BaseComponents/View.cs b/Tizen.NUI/src/public/BaseComponents/View.cs index eeaec42..aea436b 100755 --- a/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/Tizen.NUI/src/public/BaseComponents/View.cs @@ -282,7 +282,7 @@ namespace Tizen.NUI.BaseComponents /// /// Event arguments that passed via Touch signal. /// - public class TouchedEventArgs : EventArgs + public class TouchEventArgs : EventArgs { private Touch _touch; @@ -302,7 +302,7 @@ namespace Tizen.NUI.BaseComponents } } - private EventHandlerWithReturnType _touchDataEventHandler; + private EventHandlerWithReturnType _touchDataEventHandler; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool TouchDataCallbackType(IntPtr view, IntPtr touchData); private TouchDataCallbackType _touchDataCallback; @@ -311,7 +311,7 @@ namespace Tizen.NUI.BaseComponents /// Event for Touched signal which can be used to subscribe/unsubscribe the event handler provided by the user.
/// Touched signal is emitted when touch input is received.
///
- public event EventHandlerWithReturnType Touched + public event EventHandlerWithReturnType Touch { add { @@ -339,7 +339,7 @@ namespace Tizen.NUI.BaseComponents // Callback for View TouchSignal private bool OnTouch(IntPtr view, IntPtr touchData) { - TouchedEventArgs e = new TouchedEventArgs(); + TouchEventArgs e = new TouchEventArgs(); e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData); @@ -354,7 +354,7 @@ namespace Tizen.NUI.BaseComponents /// /// Event arguments that passed via Hover signal. /// - public class HoveredEventArgs : EventArgs + public class HoverEventArgs : EventArgs { private Hover _hover; @@ -374,7 +374,7 @@ namespace Tizen.NUI.BaseComponents } } - private EventHandlerWithReturnType _hoverEventHandler; + private EventHandlerWithReturnType _hoverEventHandler; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool HoverEventCallbackType(IntPtr view, IntPtr hoverEvent); private HoverEventCallbackType _hoverEventCallback; @@ -383,7 +383,7 @@ namespace Tizen.NUI.BaseComponents /// Event for Hovered signal which can be used to subscribe/unsubscribe the event handler provided by the user.
/// Hovered signal is emitted when hover input is received.
/// - public event EventHandlerWithReturnType Hovered + public event EventHandlerWithReturnType Hover { add { @@ -411,7 +411,7 @@ namespace Tizen.NUI.BaseComponents // Callback for View Hover signal private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent) { - HoveredEventArgs e = new HoveredEventArgs(); + HoverEventArgs e = new HoverEventArgs(); e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent); @@ -426,7 +426,7 @@ namespace Tizen.NUI.BaseComponents /// /// Event arguments that passed via Wheel signal. /// - public class WheelRolledEventArgs : EventArgs + public class WheelEventArgs : EventArgs { private Wheel _wheel; @@ -446,7 +446,7 @@ namespace Tizen.NUI.BaseComponents } } - private EventHandlerWithReturnType _wheelEventHandler; + private EventHandlerWithReturnType _wheelEventHandler; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate bool WheelEventCallbackType(IntPtr view, IntPtr wheelEvent); private WheelEventCallbackType _wheelEventCallback; @@ -455,7 +455,7 @@ namespace Tizen.NUI.BaseComponents /// Event for WheelMoved signal which can be used to subscribe/unsubscribe the event handler provided by the user.
/// WheelMoved signal is emitted when wheel event is received.
/// - public event EventHandlerWithReturnType WheelRolled + public event EventHandlerWithReturnType WheelRoll { add { @@ -483,7 +483,7 @@ namespace Tizen.NUI.BaseComponents // Callback for View Wheel signal private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent) { - WheelRolledEventArgs e = new WheelRolledEventArgs(); + WheelEventArgs e = new WheelEventArgs(); e.Wheel = Tizen.NUI.Wheel.GetWheelFromPtr(wheelEvent); @@ -1058,7 +1058,7 @@ namespace Tizen.NUI.BaseComponents /// Create an Animation to animate the background color visual. If there is no /// background visual, creates one with transparent black as it's mixColor. /// - public Animation AnimateBackgroundColor( object destinationValue, + public Animation AnimateBackgroundColor(object destinationValue, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, @@ -1066,50 +1066,50 @@ namespace Tizen.NUI.BaseComponents { Tizen.NUI.PropertyMap background = Background; - if( background.Empty() ) + if (background.Empty()) { // If there is no background yet, ensure there is a transparent // color visual BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f); background = Background; } - return AnimateColor( "background", destinationValue, startTime, endTime, alphaFunction, initialValue ); + return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue); } /// /// Create an Animation to animate the mixColor of the named visual. /// - public Animation AnimateColor( string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null ) + public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null) { Animation animation = null; { PropertyMap _animator = new PropertyMap(); - if( alphaFunction != null ) + if (alphaFunction != null) { - _animator.Add("alphaFunction", new PropertyValue( AlphaFunction.BuiltinToPropertyKey(alphaFunction) ) ); + _animator.Add("alphaFunction", new PropertyValue(AlphaFunction.BuiltinToPropertyKey(alphaFunction))); } PropertyMap _timePeriod = new PropertyMap(); - _timePeriod.Add( "duration", new PropertyValue((endTime-startTime)/1000.0f) ); - _timePeriod.Add( "delay", new PropertyValue( startTime/1000.0f ) ); - _animator.Add( "timePeriod", new PropertyValue( _timePeriod ) ); + _timePeriod.Add("duration", new PropertyValue((endTime - startTime) / 1000.0f)); + _timePeriod.Add("delay", new PropertyValue(startTime / 1000.0f)); + _animator.Add("timePeriod", new PropertyValue(_timePeriod)); PropertyMap _transition = new PropertyMap(); - _transition.Add( "animator", new PropertyValue( _animator ) ); - _transition.Add( "target", new PropertyValue( targetVisual ) ); - _transition.Add( "property", new PropertyValue( "mixColor" ) ); + _transition.Add("animator", new PropertyValue(_animator)); + _transition.Add("target", new PropertyValue(targetVisual)); + _transition.Add("property", new PropertyValue("mixColor")); - if( initialColor != null ) + if (initialColor != null) { - PropertyValue initValue = PropertyValue.CreateFromObject( initialColor ); - _transition.Add( "initialValue", initValue ); + PropertyValue initValue = PropertyValue.CreateFromObject(initialColor); + _transition.Add("initialValue", initValue); } - PropertyValue destValue = PropertyValue.CreateFromObject( destinationColor ); - _transition.Add( "targetValue", destValue ); - TransitionData _transitionData = new TransitionData( _transition ); + PropertyValue destValue = PropertyValue.CreateFromObject(destinationColor); + _transition.Add("targetValue", destValue); + TransitionData _transitionData = new TransitionData(_transition); - animation = new Animation( NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true ); + animation = new Animation(NDalicManualPINVOKE.View_CreateTransition(swigCPtr, TransitionData.getCPtr(_transitionData)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } @@ -1146,7 +1146,7 @@ namespace Tizen.NUI.BaseComponents get { Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap(); - GetProperty( View.Property.BACKGROUND ).Get(temp); + GetProperty(View.Property.BACKGROUND).Get(temp); return temp; } set @@ -3656,6 +3656,16 @@ namespace Tizen.NUI.BaseComponents SetProperty(View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)value)); } } + /// + /// Get the number of renderers held by the view. + /// + public uint RendererCount + { + get + { + return GetRendererCount(); + } + } @@ -3664,6 +3674,9 @@ namespace Tizen.NUI.BaseComponents /*********************************************************************************/ /*** will be removed/deprecated ***/ /*********************************************************************************/ + /// + /// will be deprecated at nui_0.2.50 + /// public event EventHandlerWithReturnType Touched { add @@ -3688,6 +3701,9 @@ namespace Tizen.NUI.BaseComponents } } + /// + /// will be deprecated at nui_0.2.50 + /// public event EventHandlerWithReturnType Hovered { add @@ -3712,17 +3728,176 @@ namespace Tizen.NUI.BaseComponents } } + /// + /// will be deprecated at nui_0.2.50 + /// + public event EventHandlerWithReturnType WheelMoved + { + add + { + if (_wheelEventHandler == null) + { + _wheelEventCallback = OnWheelEvent; + this.WheelEventSignal().Connect(_wheelEventCallback); + } + + _wheelEventHandler += value; + } + + remove + { + _wheelEventHandler -= value; + if (_wheelEventHandler == null && WheelEventSignal().Empty() == false) + { + this.WheelEventSignal().Disconnect(_wheelEventCallback); + } + + } + } /// - /// Get the number of renderers held by the view. + /// will be deprecated at nui_0.2.50 /// - public uint RendererCount + public Position AnchorPoint { get { - return GetRendererCount(); + Position temp = new Position(0.0f, 0.0f, 0.0f); + GetProperty(View.Property.ANCHOR_POINT).Get(temp); + return temp; + } + set + { + SetProperty(View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// will be deprecated at nui_0.2.50 + /// + public Size Size + { + get + { + Size temp = new Size(0.0f, 0.0f, 0.0f); + GetProperty(View.Property.SIZE).Get(temp); + return temp; + } + set + { + SetProperty(View.Property.SIZE, new Tizen.NUI.PropertyValue(value)); + } + } + /// + /// will be deprecated at nui_0.2.50 + /// + public event EventHandler OnWindowEvent + { + add + { + if (_onWindowEventHandler == null) + { + _onWindowEventCallback = OnWindow; + this.OnWindowSignal().Connect(_onWindowEventCallback); + } + + _onWindowEventHandler += value; + } + + remove + { + _onWindowEventHandler -= value; + + if (_onWindowEventHandler == null && OnWindowSignal().Empty() == false) + { + this.OnWindowSignal().Disconnect(_onWindowEventCallback); + } } } + /// + /// will be deprecated at nui_0.2.50 + /// + public event EventHandler OffWindowEvent + { + add + { + if (_offWindowEventHandler == null) + { + _offWindowEventCallback = OffWindow; + this.OffWindowSignal().Connect(_offWindowEventCallback); + } + + _offWindowEventHandler += value; + } + + remove + { + _offWindowEventHandler -= value; + + if (_offWindowEventHandler == null && OffWindowSignal().Empty() == false) + { + this.OffWindowSignal().Disconnect(_offWindowEventCallback); + } + } + } + /// + /// will be deprecated at nui_0.2.50 + /// + public event EventHandler OnRelayoutEvent + { + add + { + if (_onRelayoutEventHandler == null) + { + _onRelayoutEventCallback = OnRelayout; + this.OnRelayoutSignal().Connect(_onRelayoutEventCallback); + } + + _onRelayoutEventHandler += value; + } + + remove + { + _onRelayoutEventHandler -= value; + + if (_onRelayoutEventHandler == null && OnRelayoutSignal().Empty() == false) + { + this.OnRelayoutSignal().Disconnect(_onRelayoutEventCallback); + } + + } + } + /// + /// will be deprecated at nui_0.2.50 + /// + public event EventHandlerWithReturnType KeyEvent + { + add + { + if (_keyEventHandler == null) + { + _keyCallback = OnKeyEvent; + this.KeyEventSignal().Connect(_keyCallback); + } + + _keyEventHandler += value; + } + + remove + { + _keyEventHandler -= value; + + if (_keyEventHandler == null && KeyEventSignal().Empty() == false) + { + this.KeyEventSignal().Disconnect(_keyCallback); + } + } + } + + + /*********************************************************************************/ + /*** will be removed/deprecated ***/ + /*********************************************************************************/ + } } diff --git a/Tizen.NUI/src/public/FocusManager.cs b/Tizen.NUI/src/public/FocusManager.cs index 4ebae95..8419eba 100755 --- a/Tizen.NUI/src/public/FocusManager.cs +++ b/Tizen.NUI/src/public/FocusManager.cs @@ -682,6 +682,75 @@ namespace Tizen.NUI View proposedView = View.DownCast(proposed); return _customFocusAlgorithm.GetNextFocusableView(currentView, proposedView, direction); } - } + } + + + /*********************************************************************************/ + /*** will be removed/deprecated ***/ + /*********************************************************************************/ + + /// + ///Event arguments that passed via FocusedViewEnterKey signal + /// + public class FocusedViewEnterKeyEventArgs : EventArgs + { + private View _view; + + public View View + { + get + { + return _view; + } + set + { + _view = value; + } + } + } + + private EventHandler _focusedViewEnterKeyEventHandler2; + [UnmanagedFunctionPointer(CallingConvention.StdCall)] + private delegate void FocusedViewEnterKeyEventCallback2(IntPtr view); + private FocusedViewEnterKeyEventCallback2 _focusedViewEnterKeyEventCallback2; + + /// + /// FocusedViewActivated will be triggered when the current focused view has the enter key pressed on it. + /// + public event EventHandler FocusedViewEnterKeyPressed + { + add + { + if (_focusedViewEnterKeyEventCallback2 == null) + { + _focusedViewEnterKeyEventCallback2 = OnFocusedViewEnterKey2; + FocusedViewEnterKeySignal().Connect(_focusedViewEnterKeyEventCallback2); + } + _focusedViewEnterKeyEventHandler2 += value; + } + remove + { + _focusedViewEnterKeyEventHandler2 -= value; + + if (_focusedViewEnterKeyEventCallback2 == null && FocusedViewEnterKeySignal().Empty() == false) + { + FocusedViewEnterKeySignal().Disconnect(_focusedViewEnterKeyEventCallback2); + } + } + } + + private void OnFocusedViewEnterKey2(IntPtr view) + { + FocusedViewEnterKeyEventArgs e = new FocusedViewEnterKeyEventArgs(); + + e.View = View.GetViewFromPtr(view); + + if (_focusedViewEnterKeyEventHandler2 != null) + { + _focusedViewEnterKeyEventHandler2(this, e); + } + } + + } } diff --git a/Tizen.NUI/src/public/KeyFrames.cs b/Tizen.NUI/src/public/KeyFrames.cs index 225157f..0043e3b 100755 --- a/Tizen.NUI/src/public/KeyFrames.cs +++ b/Tizen.NUI/src/public/KeyFrames.cs @@ -110,13 +110,9 @@ namespace Tizen.NUI } /// - /// Downcasts a handle to KeyFrames handle.
- /// If handle points to a KeyFrames object, the downcast produces valid handle.
- /// If not, the returned handle is left uninitialized.
+ /// this method will be changed as internal method on later release ///
- /// Handle to an object - /// Handle to a KeyFrames object or an uninitialized handle - internal static KeyFrames DownCast(BaseHandle handle) + public static KeyFrames DownCast(BaseHandle handle) { KeyFrames ret = new KeyFrames(NDalicPINVOKE.KeyFrames_DownCast(BaseHandle.getCPtr(handle)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); diff --git a/Tizen.NUI/src/public/Layer.cs b/Tizen.NUI/src/public/Layer.cs index 52ad9d7..4fbf526 100755 --- a/Tizen.NUI/src/public/Layer.cs +++ b/Tizen.NUI/src/public/Layer.cs @@ -1,372 +1,368 @@ -/** Copyright (c) 2017 Samsung Electronics Co., Ltd. -* -* 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. -* -*/ - -namespace Tizen.NUI -{ - using Tizen.NUI.BaseComponents; - - /// - /// Layers provide a mechanism for overlaying groups of actors on top of each other. - /// - public class Layer : Animatable - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal Layer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Layer_SWIGUpcast(cPtr), cMemoryOwn) - { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Layer obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - protected override void Dispose(DisposeTypes type) - { - if (disposed) - { - return; - } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_Layer(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - - internal class Property - { - internal static readonly int BEHAVIOR = NDalicPINVOKE.Layer_Property_BEHAVIOR_get(); - } - - /// - /// Creates a Layer object. - /// - public Layer() : this(NDalicPINVOKE.Layer_New(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - /// - /// Downcasts a handle to Layer handle.
- /// If handle points to a Layer, the downcast produces valid handle.
- /// If not, the returned handle is left uninitialized.
- ///
- /// Handle to an object - /// Handle to a Layer or an uninitialized handle - internal new static Layer DownCast(BaseHandle handle) - { - Layer ret = new Layer(NDalicPINVOKE.Layer_DownCast(BaseHandle.getCPtr(handle)), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Search through this layer's hierarchy for an view with the given unique ID. - /// - ///
This layer(the parent) has been initialized.
- /// The actor itself is also considered in the search. - /// The id of the child to find - /// A handle to the view if found, or an empty handle if not. - public View FindChildById(uint id) - { - View ret = new View(NDalicPINVOKE.Actor_FindChildById(swigCPtr, id), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Adds a child view to this layer. - /// - ///
This layer(the parent) has been initialized. The child view has been initialized. The child view is not the same as the parent layer.
- /// The child will be referenced by its parent. This means that the child will be kept alive, even if the handle passed into this method is reset or destroyed. - /// If the child already has a parent, it will be removed from old parent and reparented to this layer. This may change child's position, color, scale etc as it now inherits them from this layer. - /// The child - public void Add(View child) - { - NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child)); - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Removes a child View from this layer. If the view was not a child of this layer, this is a no-op. - /// - ///
This layer(the parent) has been initialized. The child view is not the same as the parent view.
- /// The child - public void Remove(View child) - { - NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child)); - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Queries the depth of the layer.
- /// 0 is the bottom most layer, higher number is on top.
- ///
- public uint Depth - { - get - { - return GetDepth(); - } - } - - internal uint GetDepth() - { - uint ret = NDalicPINVOKE.Layer_GetDepth(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Increments the depth of the layer. - /// - public void Raise() - { - NDalicPINVOKE.Layer_Raise(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Decrements the depth of the layer. - /// - public void Lower() - { - NDalicPINVOKE.Layer_Lower(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal void RaiseAbove(Layer target) - { - NDalicPINVOKE.Layer_RaiseAbove(swigCPtr, Layer.getCPtr(target)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal void LowerBelow(Layer target) - { - NDalicPINVOKE.Layer_LowerBelow(swigCPtr, Layer.getCPtr(target)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Raises the layer to the top. - /// - public void RaiseToTop() - { - NDalicPINVOKE.Layer_RaiseToTop(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Lowers the layer to the bottom. - /// - public void LowerToBottom() - { - NDalicPINVOKE.Layer_LowerToBottom(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Moves the layer directly above the given layer.
- /// After the call, this layers depth will be immediately above target.
- ///
- /// Layer to get on top of - public void MoveAbove(Layer target) - { - NDalicPINVOKE.Layer_MoveAbove(swigCPtr, Layer.getCPtr(target)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - /// - /// Moves the layer directly below the given layer.
- /// After the call, this layers depth will be immediately below target.
- ///
- /// Layer to get below of - public void MoveBelow(Layer target) - { - NDalicPINVOKE.Layer_MoveBelow(swigCPtr, Layer.getCPtr(target)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private void SetBehavior(LayerBehavior behavior) - { - NDalicPINVOKE.Layer_SetBehavior(swigCPtr, (int)behavior); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - private LayerBehavior GetBehavior() - { - Layer.LayerBehavior ret = (Layer.LayerBehavior)NDalicPINVOKE.Layer_GetBehavior(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal void SetSortFunction(SWIGTYPE_p_f_r_q_const__Dali__Vector3__float function) - { - NDalicPINVOKE.Layer_SetSortFunction(swigCPtr, SWIGTYPE_p_f_r_q_const__Dali__Vector3__float.getCPtr(function)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal void SetTouchConsumed(bool consume) - { - NDalicPINVOKE.Layer_SetTouchConsumed(swigCPtr, consume); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal bool IsTouchConsumed() - { - bool ret = NDalicPINVOKE.Layer_IsTouchConsumed(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - internal void SetHoverConsumed(bool consume) - { - NDalicPINVOKE.Layer_SetHoverConsumed(swigCPtr, consume); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - - internal bool IsHoverConsumed() - { - bool ret = NDalicPINVOKE.Layer_IsHoverConsumed(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } - - /// - /// Retrieves child view by index. - /// - ///
The View has been initialized.
- /// The index of the child to retrieve - /// The view for the given index or empty handle if children not initialized - public View GetChildAt(uint index) - { - System.IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index); - cPtr = NDalicPINVOKE.View_SWIGUpcast(cPtr); - cPtr = NDalicPINVOKE.Handle_SWIGUpcast(cPtr); - - BaseHandle ret = new BaseHandle(cPtr, false); - - View temp = ViewRegistry.GetViewFromBaseHandle(ret); - - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - return temp ?? null; - } - - /// - /// Enumeration for the behavior of the layer. - /// - public enum LayerBehavior - { - Layer2D, - LayerUI = Layer2D, - Layer3D - } - - internal enum TreeDepthMultiplier - { - TREE_DEPTH_MULTIPLIER = 10000 - } - - /// - /// Layer Behavior, type String(Layer.LayerBehavior) - /// - public Layer.LayerBehavior Behavior - { - get - { - return GetBehavior(); - } - set - { - SetBehavior(value); - } - } - - /// - /// Retrieves and sets the Layer's opacity.
- ///
- public float Opacity - { - get - { - float temp = 0.0f; - GetProperty(View.Property.OPACITY).Get(out temp); - return temp; - } - set - { - SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value)); - } - } - - /// - /// Retrieves and sets the Layer's visibility. - /// - public bool Visibility - { - get - { - bool temp = false; - GetProperty(View.Property.VISIBLE).Get(out temp); - return temp; - } - set - { - SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value)); - } - } - +/** Copyright (c) 2017 Samsung Electronics Co., Ltd. +* +* 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. +* +*/ + +namespace Tizen.NUI +{ + using Tizen.NUI.BaseComponents; + + /// + /// Layers provide a mechanism for overlaying groups of actors on top of each other. + /// + public class Layer : Animatable + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal Layer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Layer_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Layer obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_Layer(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + + internal class Property + { + internal static readonly int BEHAVIOR = NDalicPINVOKE.Layer_Property_BEHAVIOR_get(); + } + + /// + /// Creates a Layer object. + /// + public Layer() : this(NDalicPINVOKE.Layer_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } /// - /// Get the number of children held by the layer. + /// this method will be changed as internal method on later release /// - public uint ChildCount - { - get - { - uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) - throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; - } + public new static Layer DownCast(BaseHandle handle) + { + Layer ret = new Layer(NDalicPINVOKE.Layer_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Search through this layer's hierarchy for an view with the given unique ID. + /// + ///
This layer(the parent) has been initialized.
+ /// The actor itself is also considered in the search. + /// The id of the child to find + /// A handle to the view if found, or an empty handle if not. + public View FindChildById(uint id) + { + View ret = new View(NDalicPINVOKE.Actor_FindChildById(swigCPtr, id), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Adds a child view to this layer. + /// + ///
This layer(the parent) has been initialized. The child view has been initialized. The child view is not the same as the parent layer.
+ /// The child will be referenced by its parent. This means that the child will be kept alive, even if the handle passed into this method is reset or destroyed. + /// If the child already has a parent, it will be removed from old parent and reparented to this layer. This may change child's position, color, scale etc as it now inherits them from this layer. + /// The child + public void Add(View child) + { + NDalicPINVOKE.Actor_Add(swigCPtr, View.getCPtr(child)); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Removes a child View from this layer. If the view was not a child of this layer, this is a no-op. + /// + ///
This layer(the parent) has been initialized. The child view is not the same as the parent view.
+ /// The child + public void Remove(View child) + { + NDalicPINVOKE.Actor_Remove(swigCPtr, View.getCPtr(child)); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Queries the depth of the layer.
+ /// 0 is the bottom most layer, higher number is on top.
+ ///
+ public uint Depth + { + get + { + return GetDepth(); + } + } + + internal uint GetDepth() + { + uint ret = NDalicPINVOKE.Layer_GetDepth(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Increments the depth of the layer. + /// + public void Raise() + { + NDalicPINVOKE.Layer_Raise(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Decrements the depth of the layer. + /// + public void Lower() + { + NDalicPINVOKE.Layer_Lower(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal void RaiseAbove(Layer target) + { + NDalicPINVOKE.Layer_RaiseAbove(swigCPtr, Layer.getCPtr(target)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal void LowerBelow(Layer target) + { + NDalicPINVOKE.Layer_LowerBelow(swigCPtr, Layer.getCPtr(target)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Raises the layer to the top. + /// + public void RaiseToTop() + { + NDalicPINVOKE.Layer_RaiseToTop(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Lowers the layer to the bottom. + /// + public void LowerToBottom() + { + NDalicPINVOKE.Layer_LowerToBottom(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Moves the layer directly above the given layer.
+ /// After the call, this layers depth will be immediately above target.
+ ///
+ /// Layer to get on top of + public void MoveAbove(Layer target) + { + NDalicPINVOKE.Layer_MoveAbove(swigCPtr, Layer.getCPtr(target)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Moves the layer directly below the given layer.
+ /// After the call, this layers depth will be immediately below target.
+ ///
+ /// Layer to get below of + public void MoveBelow(Layer target) + { + NDalicPINVOKE.Layer_MoveBelow(swigCPtr, Layer.getCPtr(target)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + private void SetBehavior(LayerBehavior behavior) + { + NDalicPINVOKE.Layer_SetBehavior(swigCPtr, (int)behavior); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + private LayerBehavior GetBehavior() + { + Layer.LayerBehavior ret = (Layer.LayerBehavior)NDalicPINVOKE.Layer_GetBehavior(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal void SetSortFunction(SWIGTYPE_p_f_r_q_const__Dali__Vector3__float function) + { + NDalicPINVOKE.Layer_SetSortFunction(swigCPtr, SWIGTYPE_p_f_r_q_const__Dali__Vector3__float.getCPtr(function)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal void SetTouchConsumed(bool consume) + { + NDalicPINVOKE.Layer_SetTouchConsumed(swigCPtr, consume); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal bool IsTouchConsumed() + { + bool ret = NDalicPINVOKE.Layer_IsTouchConsumed(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + internal void SetHoverConsumed(bool consume) + { + NDalicPINVOKE.Layer_SetHoverConsumed(swigCPtr, consume); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + internal bool IsHoverConsumed() + { + bool ret = NDalicPINVOKE.Layer_IsHoverConsumed(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + + /// + /// Retrieves child view by index. + /// + ///
The View has been initialized.
+ /// The index of the child to retrieve + /// The view for the given index or empty handle if children not initialized + public View GetChildAt(uint index) + { + System.IntPtr cPtr = NDalicPINVOKE.Actor_GetChildAt(swigCPtr, index); + cPtr = NDalicPINVOKE.View_SWIGUpcast(cPtr); + cPtr = NDalicPINVOKE.Handle_SWIGUpcast(cPtr); + + BaseHandle ret = new BaseHandle(cPtr, false); + + View temp = ViewRegistry.GetViewFromBaseHandle(ret); + + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + return temp ?? null; + } + + /// + /// Enumeration for the behavior of the layer. + /// + public enum LayerBehavior + { + Layer2D, + LayerUI = Layer2D, + Layer3D + } + + internal enum TreeDepthMultiplier + { + TREE_DEPTH_MULTIPLIER = 10000 + } + + /// + /// Layer Behavior, type String(Layer.LayerBehavior) + /// + public Layer.LayerBehavior Behavior + { + get + { + return GetBehavior(); + } + set + { + SetBehavior(value); + } + } + + /// + /// Retrieves and sets the Layer's opacity.
+ ///
+ public float Opacity + { + get + { + float temp = 0.0f; + GetProperty(View.Property.OPACITY).Get(out temp); + return temp; + } + set + { + SetProperty(View.Property.OPACITY, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Retrieves and sets the Layer's visibility. + /// + public bool Visibility + { + get + { + bool temp = false; + GetProperty(View.Property.VISIBLE).Get(out temp); + return temp; + } + set + { + SetProperty(View.Property.VISIBLE, new Tizen.NUI.PropertyValue(value)); + } + } + + /// + /// Get the number of children held by the layer. + /// + public uint ChildCount + { + get + { + uint ret = NDalicPINVOKE.Actor_GetChildCount(swigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } } /// @@ -398,5 +394,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } -} + } +} diff --git a/Tizen.NUI/src/public/Path.cs b/Tizen.NUI/src/public/Path.cs index 307d07f..f1a6b79 100755 --- a/Tizen.NUI/src/public/Path.cs +++ b/Tizen.NUI/src/public/Path.cs @@ -90,7 +90,17 @@ namespace Tizen.NUI { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } + } + + /// + /// this method will be changed as internal method on later release + /// + public new static Path DownCast(BaseHandle handle) + { + Path ret = new Path(NDalicPINVOKE.Path_DownCast(BaseHandle.getCPtr(handle)), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } /// /// Adds an interpolation point. diff --git a/Tizen.NUI/src/public/Timer.cs b/Tizen.NUI/src/public/Timer.cs index 44447cd..bc143cd 100755 --- a/Tizen.NUI/src/public/Timer.cs +++ b/Tizen.NUI/src/public/Timer.cs @@ -152,11 +152,9 @@ namespace Tizen.NUI } /// - /// Downcasts a handle to Timer handle. + /// this method will be changed as internal method on later release /// - /// handle to An object - /// handle to a Timer object or an uninitialized handle - internal static Timer DownCast(BaseHandle handle) + public static Timer DownCast(BaseHandle handle) { Timer ret = new Timer(NDalicPINVOKE.Timer_DownCast(BaseHandle.getCPtr(handle)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); diff --git a/Tizen.NUI/src/public/UIComponents/PushButton.cs b/Tizen.NUI/src/public/UIComponents/PushButton.cs index db79869..290e426 100755 --- a/Tizen.NUI/src/public/UIComponents/PushButton.cs +++ b/Tizen.NUI/src/public/UIComponents/PushButton.cs @@ -1,104 +1,104 @@ -/** Copyright (c) 2017 Samsung Electronics Co., Ltd. -* -* 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. -* -*/ -// This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts -//------------------------------------------------------------------------------ -// -// -// This file was automatically generated by SWIG (http://www.swig.org). -// Version 3.0.9 -// -// Do not make changes to this file unless you know what you are doing--modify -// the SWIG interface file instead. -//------------------------------------------------------------------------------ - -using Tizen.NUI.BaseComponents; - -namespace Tizen.NUI.UIComponents -{ - - /// - /// A PushButton changes its appearance when is pressed and returns to its original when is released. - /// - public class PushButton : Button - { - private global::System.Runtime.InteropServices.HandleRef swigCPtr; - - internal PushButton(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PushButton_SWIGUpcast(cPtr), cMemoryOwn) - { - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - } - - internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PushButton obj) - { - return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; - } - - /// - /// To make PushButton instance be disposed. - /// - protected override void Dispose(DisposeTypes type) - { - if (disposed) - { - return; - } - - if (type == DisposeTypes.Explicit) - { - //Called by User - //Release your own managed resources here. - //You should release all of your own disposable objects here. - } - - //Release your own unmanaged resources here. - //You should not access any managed member here except static instance. - //because the execution order of Finalizes is non-deterministic. - - if (swigCPtr.Handle != global::System.IntPtr.Zero) - { - if (swigCMemOwn) - { - swigCMemOwn = false; - NDalicPINVOKE.delete_PushButton(swigCPtr); - } - swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - base.Dispose(type); - } - - - internal class Property - { - internal static readonly int UNSELECTED_ICON = NDalicPINVOKE.PushButton_Property_UNSELECTED_ICON_get(); - internal static readonly int SELECTED_ICON = NDalicPINVOKE.PushButton_Property_SELECTED_ICON_get(); - internal static readonly int ICON_ALIGNMENT = NDalicPINVOKE.PushButton_Property_ICON_ALIGNMENT_get(); - internal static readonly int LABEL_PADDING = NDalicPINVOKE.PushButton_Property_LABEL_PADDING_get(); - internal static readonly int ICON_PADDING = NDalicPINVOKE.PushButton_Property_ICON_PADDING_get(); - } - - /// - /// Creates the PushButton. - /// - public PushButton() : this(NDalicPINVOKE.PushButton_New(), true) - { - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - } - +/** Copyright (c) 2017 Samsung Electronics Co., Ltd. +* +* 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. +* +*/ +// This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts +//------------------------------------------------------------------------------ +// +// +// This file was automatically generated by SWIG (http://www.swig.org). +// Version 3.0.9 +// +// Do not make changes to this file unless you know what you are doing--modify +// the SWIG interface file instead. +//------------------------------------------------------------------------------ + +using Tizen.NUI.BaseComponents; + +namespace Tizen.NUI.UIComponents +{ + + /// + /// A PushButton changes its appearance when is pressed and returns to its original when is released. + /// + public class PushButton : Button + { + private global::System.Runtime.InteropServices.HandleRef swigCPtr; + + internal PushButton(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.PushButton_SWIGUpcast(cPtr), cMemoryOwn) + { + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); + } + + internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PushButton obj) + { + return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; + } + + /// + /// To make PushButton instance be disposed. + /// + protected override void Dispose(DisposeTypes type) + { + if (disposed) + { + return; + } + + if (type == DisposeTypes.Explicit) + { + //Called by User + //Release your own managed resources here. + //You should release all of your own disposable objects here. + } + + //Release your own unmanaged resources here. + //You should not access any managed member here except static instance. + //because the execution order of Finalizes is non-deterministic. + + if (swigCPtr.Handle != global::System.IntPtr.Zero) + { + if (swigCMemOwn) + { + swigCMemOwn = false; + NDalicPINVOKE.delete_PushButton(swigCPtr); + } + swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); + } + + base.Dispose(type); + } + + + internal class Property + { + internal static readonly int UNSELECTED_ICON = NDalicPINVOKE.PushButton_Property_UNSELECTED_ICON_get(); + internal static readonly int SELECTED_ICON = NDalicPINVOKE.PushButton_Property_SELECTED_ICON_get(); + internal static readonly int ICON_ALIGNMENT = NDalicPINVOKE.PushButton_Property_ICON_ALIGNMENT_get(); + internal static readonly int LABEL_PADDING = NDalicPINVOKE.PushButton_Property_LABEL_PADDING_get(); + internal static readonly int ICON_PADDING = NDalicPINVOKE.PushButton_Property_ICON_PADDING_get(); + } + + /// + /// Creates the PushButton. + /// + public PushButton() : this(NDalicPINVOKE.PushButton_New(), true) + { + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + + } + internal PushButton(PushButton pushButton) : this(NDalicPINVOKE.new_PushButton__SWIG_1(PushButton.getCPtr(pushButton)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -111,14 +111,10 @@ namespace Tizen.NUI.UIComponents return ret; } - /// - /// Downcasts a handle to PushButton handle.
- /// If handle points to a PushButton, the downcast produces valid handle.
- /// If not the returned handle is left uninitialized.
- ///
- /// Handle to an object - /// handle to a PushButton or an uninitialized handle - internal new static PushButton DownCast(BaseHandle handle) + /// + /// this method will be changed as internal method on later release + /// + public new static PushButton DownCast(BaseHandle handle) { PushButton ret = new PushButton(NDalicPINVOKE.PushButton_DownCast(BaseHandle.getCPtr(handle)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -329,4 +325,4 @@ namespace Tizen.NUI.UIComponents } } -} +} diff --git a/Tizen.NUI/src/public/UIComponents/ScrollBar.cs b/Tizen.NUI/src/public/UIComponents/ScrollBar.cs index 44a2fe0..0c1df3d 100755 --- a/Tizen.NUI/src/public/UIComponents/ScrollBar.cs +++ b/Tizen.NUI/src/public/UIComponents/ScrollBar.cs @@ -235,13 +235,9 @@ namespace Tizen.NUI.UIComponents } /// - /// Downcasts a handle to ScrollBar handle.
- /// If handle points to a ScrollBar, the downcast produces valid handle.
- /// If not, the returned handle is left uninitialized.
+ /// this method will be changed as internal method on later release ///
- /// Handle to an object - /// Handle to a ScrollBar or an uninitialized handle - internal new static ScrollBar DownCast(BaseHandle handle) + public new static ScrollBar DownCast(BaseHandle handle) { ScrollBar ret = new ScrollBar(NDalicPINVOKE.ScrollBar_DownCast(BaseHandle.getCPtr(handle)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); diff --git a/Tizen.NUI/src/public/Window.cs b/Tizen.NUI/src/public/Window.cs index 2dfcba2..17213e4 100755 --- a/Tizen.NUI/src/public/Window.cs +++ b/Tizen.NUI/src/public/Window.cs @@ -857,7 +857,7 @@ namespace Tizen.NUI /// /// Touch event argument. /// - public class TouchedEventArgs : EventArgs + public class TouchEventArgs : EventArgs { private Touch _touch; @@ -877,7 +877,7 @@ namespace Tizen.NUI } } - private event EventHandler _stageTouchHandler; + private event EventHandler _stageTouchHandler; private EventCallbackDelegateType1 _stageTouchCallbackDelegate; /// @@ -886,7 +886,7 @@ namespace Tizen.NUI /// then when the last finger is lifted.
/// An interrupted event will also be emitted (if it occurs).
///
- public event EventHandler Touched + public event EventHandler Touch { add { @@ -912,7 +912,7 @@ namespace Tizen.NUI private void OnStageTouch(IntPtr data) { - TouchedEventArgs e = new TouchedEventArgs(); + TouchEventArgs e = new TouchEventArgs(); if (data != null) { @@ -928,7 +928,7 @@ namespace Tizen.NUI /// /// Wheel event arguments. /// - public class WheelRolledEventArgs : EventArgs + public class WheelEventArgs : EventArgs { private Wheel _wheel; @@ -948,13 +948,13 @@ namespace Tizen.NUI } } - private event EventHandler _stageWheelHandler; + private event EventHandler _stageWheelHandler; private EventCallbackDelegateType1 _stageWheelCallbackDelegate; /// /// Event emitted when wheel event is received. /// - public event EventHandler WheelRolled + public event EventHandler WheelRoll { add { @@ -977,7 +977,7 @@ namespace Tizen.NUI private void OnStageWheel(IntPtr data) { - WheelRolledEventArgs e = new WheelRolledEventArgs(); + WheelEventArgs e = new WheelEventArgs(); if (data != null) { @@ -1019,7 +1019,7 @@ namespace Tizen.NUI /// /// Event emitted when key event is received. /// - public event EventHandler KeyPressed + public event EventHandler Key { add { @@ -1392,16 +1392,22 @@ namespace Tizen.NUI } } } - /// /// will be deprecated at nui_0.2.50 /// - /// public void AddLayer(Layer layer) { NDalicPINVOKE.Stage_Add(stageCPtr, Layer.getCPtr(layer)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// will be deprecated at nui_0.2.50 + /// + public void RemoveLayer(Layer layer) + { + NDalicPINVOKE.Stage_Remove(stageCPtr, Layer.getCPtr(layer)); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } /*********************************************************************************/ /*** will be removed/deprecated ***/ -- 2.7.4