From d022eeae522caa5ac08b1b93ddaddcad081e3580 Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Wed, 5 Jul 2017 13:49:38 +0900 Subject: [PATCH] Revert "[Tizen] to match previous version" This reverts commit 0c1fc5eb30b890074252013bd1b5b5935168cb1a. Change-Id: I2dd5fa548525bfe285103006b3585e1c187b7165 --- src/Tizen.NUI/src/internal/Application.cs | 34 +- .../src/public/BaseComponents/ImageView.cs | 21 +- .../src/public/BaseComponents/TableView.cs | 8 +- .../src/public/BaseComponents/TextEditor.cs | 6 +- .../src/public/BaseComponents/TextField.cs | 6 +- .../src/public/BaseComponents/TextLabel.cs | 22 +- .../src/public/BaseComponents/VideoView.cs | 8 +- src/Tizen.NUI/src/public/BaseComponents/View.cs | 245 +------ src/Tizen.NUI/src/public/FocusManager.cs | 71 +- src/Tizen.NUI/src/public/KeyFrames.cs | 8 +- src/Tizen.NUI/src/public/Layer.cs | 734 +++++++++++---------- src/Tizen.NUI/src/public/Path.cs | 12 +- src/Tizen.NUI/src/public/Timer.cs | 6 +- .../src/public/UIComponents/PushButton.cs | 216 +++--- src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs | 8 +- src/Tizen.NUI/src/public/Window.cs | 28 +- 16 files changed, 597 insertions(+), 836 deletions(-) diff --git a/src/Tizen.NUI/src/internal/Application.cs b/src/Tizen.NUI/src/internal/Application.cs index aac9d6a..1509e70 100755 --- a/src/Tizen.NUI/src/internal/Application.cs +++ b/src/Tizen.NUI/src/internal/Application.cs @@ -55,7 +55,7 @@ namespace Tizen.NUI * @brief Event arguments that passed via NUIApplicationTerminate signal * */ - internal class NUIApplicationTerminateEventArgs : EventArgs + internal class NUIApplicationTerminatingEventArgs : EventArgs { private Application _application; /** @@ -79,7 +79,7 @@ namespace Tizen.NUI * @brief Event arguments that passed via NUIApplicationPause signal * */ - internal class NUIApplicationPauseEventArgs : EventArgs + internal class NUIApplicationPausedEventArgs : EventArgs { private Application _application; /** @@ -103,7 +103,7 @@ namespace Tizen.NUI * @brief Event arguments that passed via NUIApplicationResume signal * */ - internal class NUIApplicationResumeEventArgs : EventArgs + internal class NUIApplicationResumedEventArgs : EventArgs { private Application _application; /** @@ -151,7 +151,7 @@ namespace Tizen.NUI * @brief Event arguments that passed via NUIApplicationResize signal * */ - internal class NUIApplicationResizeEventArgs : EventArgs + internal class NUIApplicationResizedEventArgs : 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 terminated + * provided by the user. Terminated signal is emitted when application is terminating */ - public event DaliEventHandler Terminated + public event DaliEventHandler Terminating { add { @@ -510,7 +510,7 @@ namespace Tizen.NUI // Callback for Application TerminateSignal private void OnNUIApplicationTerminate(IntPtr data) { - NUIApplicationTerminateEventArgs e = new NUIApplicationTerminateEventArgs(); + NUIApplicationTerminatingEventArgs e = new NUIApplicationTerminatingEventArgs(); // 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) { - NUIApplicationPauseEventArgs e = new NUIApplicationPauseEventArgs(); + NUIApplicationPausedEventArgs e = new NUIApplicationPausedEventArgs(); // 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) { - NUIApplicationResumeEventArgs e = new NUIApplicationResumeEventArgs(); + NUIApplicationResumedEventArgs e = new NUIApplicationResumedEventArgs(); // 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) { - NUIApplicationResizeEventArgs e = new NUIApplicationResizeEventArgs(); + NUIApplicationResizedEventArgs e = new NUIApplicationResizedEventArgs(); // Populate all members of "e" (NUIApplicationResizeEventArgs) with real data e.Application = Application.GetApplicationFromPtr(data); diff --git a/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs b/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs index f398e7a..7152e60 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs +++ b/src/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,12 +188,16 @@ namespace Tizen.NUI.BaseComponents { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - + } + /// - /// this method will be changed as internal method on later release + /// 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.
///
- public new static ImageView DownCast(BaseHandle handle) + /// Handle to an object + /// Handle to a ImageView or an uninitialized handle + internal 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(); @@ -215,8 +219,7 @@ 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; @@ -380,7 +383,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/src/Tizen.NUI/src/public/BaseComponents/TableView.cs b/src/Tizen.NUI/src/public/BaseComponents/TableView.cs index 432cf86..7d8c0c7 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TableView.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TableView.cs @@ -328,9 +328,13 @@ namespace Tizen.NUI.BaseComponents } /// - /// this method will be changed as internal method on later release + /// 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.
///
- public new static TableView DownCast(BaseHandle handle) + /// Handle to an object + /// Handle to a TableView or an uninitialized handle + internal 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/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs index 3b40ef5..26fd4c2 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs @@ -331,9 +331,11 @@ namespace Tizen.NUI.BaseComponents } /// - /// this method will be changed as internal method on later release + /// Downcasts a handle to TextEditor. /// - public new static TextEditor DownCast(BaseHandle handle) + /// Handle to an object + /// Handle to a TextEditor or an empty handle + internal 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/src/Tizen.NUI/src/public/BaseComponents/TextField.cs b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs index fa90ade..db3c3e7 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs @@ -312,9 +312,11 @@ namespace Tizen.NUI.BaseComponents } /// - /// this method will be changed as internal method on later release + /// Downcasts a handle to TextField. /// - public new static TextField DownCast(BaseHandle handle) + /// Handle to an object + /// Handle to a TextField or an empty handle + internal 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/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs index 5b8b045..0ebbfe1 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs +++ b/src/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 LINE_COUNT = OUTLINE + 5; + internal static readonly int AUTO_SCROLL_LOOP_DELAY = NDalicManualPINVOKE.TextLabel_Property_AUTO_SCROLL_LOOP_DELAY_get(); + } /// @@ -139,9 +139,10 @@ namespace Tizen.NUI.BaseComponents /// - /// this method will be changed as internal method on later release + /// Downcasts a handle to TextLabel. /// - public new static TextLabel DownCast(BaseHandle handle) + /// Handle to an object + internal 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(); @@ -724,19 +725,6 @@ 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/src/Tizen.NUI/src/public/BaseComponents/VideoView.cs b/src/Tizen.NUI/src/public/BaseComponents/VideoView.cs index a73b79a..13e4b4b 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/VideoView.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/VideoView.cs @@ -192,9 +192,13 @@ namespace Tizen.NUI.BaseComponents } /// - /// this method will be changed as internal method on later release + /// 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.
///
- public new static VideoView DownCast(BaseHandle handle) + /// Handle to an object + /// Handle to a VideoView or an uninitialized handle + internal 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/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index aea436b..eeaec42 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -282,7 +282,7 @@ namespace Tizen.NUI.BaseComponents /// /// Event arguments that passed via Touch signal. /// - public class TouchEventArgs : EventArgs + public class TouchedEventArgs : 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 Touch + public event EventHandlerWithReturnType Touched { add { @@ -339,7 +339,7 @@ namespace Tizen.NUI.BaseComponents // Callback for View TouchSignal private bool OnTouch(IntPtr view, IntPtr touchData) { - TouchEventArgs e = new TouchEventArgs(); + TouchedEventArgs e = new TouchedEventArgs(); e.Touch = Tizen.NUI.Touch.GetTouchFromPtr(touchData); @@ -354,7 +354,7 @@ namespace Tizen.NUI.BaseComponents /// /// Event arguments that passed via Hover signal. /// - public class HoverEventArgs : EventArgs + public class HoveredEventArgs : 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 Hover + public event EventHandlerWithReturnType Hovered { add { @@ -411,7 +411,7 @@ namespace Tizen.NUI.BaseComponents // Callback for View Hover signal private bool OnHoverEvent(IntPtr view, IntPtr hoverEvent) { - HoverEventArgs e = new HoverEventArgs(); + HoveredEventArgs e = new HoveredEventArgs(); e.Hover = Tizen.NUI.Hover.GetHoverFromPtr(hoverEvent); @@ -426,7 +426,7 @@ namespace Tizen.NUI.BaseComponents /// /// Event arguments that passed via Wheel signal. /// - public class WheelEventArgs : EventArgs + public class WheelRolledEventArgs : 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 WheelRoll + public event EventHandlerWithReturnType WheelRolled { add { @@ -483,7 +483,7 @@ namespace Tizen.NUI.BaseComponents // Callback for View Wheel signal private bool OnWheelEvent(IntPtr view, IntPtr wheelEvent) { - WheelEventArgs e = new WheelEventArgs(); + WheelRolledEventArgs e = new WheelRolledEventArgs(); 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,16 +3656,6 @@ 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(); - } - } @@ -3674,9 +3664,6 @@ namespace Tizen.NUI.BaseComponents /*********************************************************************************/ /*** will be removed/deprecated ***/ /*********************************************************************************/ - /// - /// will be deprecated at nui_0.2.50 - /// public event EventHandlerWithReturnType Touched { add @@ -3701,9 +3688,6 @@ namespace Tizen.NUI.BaseComponents } } - /// - /// will be deprecated at nui_0.2.50 - /// public event EventHandlerWithReturnType Hovered { add @@ -3728,176 +3712,17 @@ 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); - } - - } - } /// - /// will be deprecated at nui_0.2.50 - /// - public Position AnchorPoint - { - get - { - 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 + /// Get the number of renderers held by the view. /// - public Size Size + public uint RendererCount { 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); - } + return GetRendererCount(); } } - - /*********************************************************************************/ - /*** will be removed/deprecated ***/ - /*********************************************************************************/ - - } } diff --git a/src/Tizen.NUI/src/public/FocusManager.cs b/src/Tizen.NUI/src/public/FocusManager.cs index 8419eba..4ebae95 100755 --- a/src/Tizen.NUI/src/public/FocusManager.cs +++ b/src/Tizen.NUI/src/public/FocusManager.cs @@ -682,75 +682,6 @@ 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/src/Tizen.NUI/src/public/KeyFrames.cs b/src/Tizen.NUI/src/public/KeyFrames.cs index 0043e3b..225157f 100755 --- a/src/Tizen.NUI/src/public/KeyFrames.cs +++ b/src/Tizen.NUI/src/public/KeyFrames.cs @@ -110,9 +110,13 @@ namespace Tizen.NUI } /// - /// this method will be changed as internal method on later release + /// 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.
///
- public static KeyFrames DownCast(BaseHandle handle) + /// Handle to an object + /// Handle to a KeyFrames object or an uninitialized handle + internal 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/src/Tizen.NUI/src/public/Layer.cs b/src/Tizen.NUI/src/public/Layer.cs index 4fbf526..52ad9d7 100755 --- a/src/Tizen.NUI/src/public/Layer.cs +++ b/src/Tizen.NUI/src/public/Layer.cs @@ -1,368 +1,372 @@ -/** 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(); - - } +/** 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(); + } + /// - /// this method will be changed as internal method on later release + /// Creates a Layer object. /// - 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; - } + 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)); + } + } + + /// + /// 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; + } } /// @@ -394,5 +398,5 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - } -} + } +} diff --git a/src/Tizen.NUI/src/public/Path.cs b/src/Tizen.NUI/src/public/Path.cs index f1a6b79..307d07f 100755 --- a/src/Tizen.NUI/src/public/Path.cs +++ b/src/Tizen.NUI/src/public/Path.cs @@ -90,17 +90,7 @@ 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/src/Tizen.NUI/src/public/Timer.cs b/src/Tizen.NUI/src/public/Timer.cs index bc143cd..44447cd 100755 --- a/src/Tizen.NUI/src/public/Timer.cs +++ b/src/Tizen.NUI/src/public/Timer.cs @@ -152,9 +152,11 @@ namespace Tizen.NUI } /// - /// this method will be changed as internal method on later release + /// Downcasts a handle to Timer handle. /// - public static Timer DownCast(BaseHandle handle) + /// handle to An object + /// handle to a Timer object or an uninitialized handle + internal 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/src/Tizen.NUI/src/public/UIComponents/PushButton.cs b/src/Tizen.NUI/src/public/UIComponents/PushButton.cs index 290e426..db79869 100755 --- a/src/Tizen.NUI/src/public/UIComponents/PushButton.cs +++ b/src/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,10 +111,14 @@ namespace Tizen.NUI.UIComponents return ret; } - /// - /// this method will be changed as internal method on later release - /// - public new static PushButton DownCast(BaseHandle handle) + /// + /// 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) { PushButton ret = new PushButton(NDalicPINVOKE.PushButton_DownCast(BaseHandle.getCPtr(handle)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -325,4 +329,4 @@ namespace Tizen.NUI.UIComponents } } -} +} diff --git a/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs b/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs index 0c1df3d..44a2fe0 100755 --- a/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs +++ b/src/Tizen.NUI/src/public/UIComponents/ScrollBar.cs @@ -235,9 +235,13 @@ namespace Tizen.NUI.UIComponents } /// - /// this method will be changed as internal method on later release + /// 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.
///
- public new static ScrollBar DownCast(BaseHandle handle) + /// Handle to an object + /// Handle to a ScrollBar or an uninitialized handle + internal 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/src/Tizen.NUI/src/public/Window.cs b/src/Tizen.NUI/src/public/Window.cs index 17213e4..2dfcba2 100755 --- a/src/Tizen.NUI/src/public/Window.cs +++ b/src/Tizen.NUI/src/public/Window.cs @@ -857,7 +857,7 @@ namespace Tizen.NUI /// /// Touch event argument. /// - public class TouchEventArgs : EventArgs + public class TouchedEventArgs : 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 Touch + public event EventHandler Touched { add { @@ -912,7 +912,7 @@ namespace Tizen.NUI private void OnStageTouch(IntPtr data) { - TouchEventArgs e = new TouchEventArgs(); + TouchedEventArgs e = new TouchedEventArgs(); if (data != null) { @@ -928,7 +928,7 @@ namespace Tizen.NUI /// /// Wheel event arguments. /// - public class WheelEventArgs : EventArgs + public class WheelRolledEventArgs : 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 WheelRoll + public event EventHandler WheelRolled { add { @@ -977,7 +977,7 @@ namespace Tizen.NUI private void OnStageWheel(IntPtr data) { - WheelEventArgs e = new WheelEventArgs(); + WheelRolledEventArgs e = new WheelRolledEventArgs(); if (data != null) { @@ -1019,7 +1019,7 @@ namespace Tizen.NUI /// /// Event emitted when key event is received. /// - public event EventHandler Key + public event EventHandler KeyPressed { add { @@ -1392,22 +1392,16 @@ 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