Add comments, nui 0.2.31 upgrade
authordongsug.song <dongsug.song@samsung.com>
Mon, 20 Mar 2017 08:53:24 +0000 (17:53 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Mon, 20 Mar 2017 08:59:52 +0000 (17:59 +0900)
Change-Id: I6d09ea0e557193b31cbc3fc0e27fa21d0f421259
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
packaging/csapi-nui.spec
src/Tizen.NUI/src/public/Color.cs
src/Tizen.NUI/src/public/FocusManager.cs
src/Tizen.NUI/src/public/RelayoutContainer.cs

index 10ba4b5..c4c71d3 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       csapi-nui
 Summary:    dali-NUI
-Version:    0.2.30
+Version:    0.2.31
 Release:    1
 Group:      Development/Libraries
 License:    Apache-2.0
index e9fe9da..9b19875 100755 (executable)
@@ -1,25 +1,29 @@
-/*
- * 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.
- *
- */
+// 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
+// Some have been manually changed
 
 namespace Tizen.NUI
 {
 
     using System;
 
+    /// <summary>
+    /// Color class
+    /// </summary>
     public class Color : global::System.IDisposable
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
@@ -41,6 +45,9 @@ namespace Tizen.NUI
             DisposeQueue.Instance.Add(this);
         }
 
+        /// <summary>
+        /// To make Color instance be disposed.
+        /// </summary>
         public virtual void Dispose()
         {
             if (!Stage.IsInstalled())
@@ -64,43 +71,65 @@ namespace Tizen.NUI
             }
         }
 
-
+        /// <summary>
+        /// Addition operator.
+        /// </summary>
+        /// <param name="arg1">First value</param>
+        /// <param name="arg2">Second value</param>
+        /// <returns>A Color containing the result of the addition</returns>
         public static Color operator +(Color arg1, Color arg2)
         {
             return arg1.Add(arg2);
         }
 
+        /// <summary>
+        /// Subtraction operator.
+        /// </summary>
+        /// <param name="arg1">First value</param>
+        /// <param name="arg2">Second value</param>
+        /// <returns>A Color containing the result of the subtraction</returns>
         public static Color operator -(Color arg1, Color arg2)
         {
             return arg1.Subtract(arg2);
         }
 
+        /// <summary>
+        /// Unary negation operator.
+        /// </summary>
+        /// <param name="arg1">Target Value</param>
+        /// <returns>A Color containg the negation</returns>
         public static Color operator -(Color arg1)
         {
             return arg1.Subtract();
         }
 
+        /// <summary>
+        /// Multiplication operator.
+        /// </summary>
+        /// <param name="arg1">First Value</param>
+        /// <param name="arg2">Second Value</param>
+        /// <returns>A Color containing the result of the multiplication</returns>
         public static Color operator *(Color arg1, Color arg2)
         {
             return arg1.Multiply(arg2);
         }
 
-        public static Color operator *(Color arg1, float arg2)
-        {
-            return arg1.Multiply(arg2);
-        }
-
+        /// <summary>
+        /// Division operator.
+        /// </summary>
+        /// <param name="arg1">First Value</param>
+        /// <param name="arg2">Second Value</param>
+        /// <returns>A Color containing the result of the division</returns>
         public static Color operator /(Color arg1, Color arg2)
         {
             return arg1.Divide(arg2);
         }
 
-        public static Color operator /(Color arg1, float arg2)
-        {
-            return arg1.Divide(arg2);
-        }
-
-
+        /// <summary>
+        /// Array subscript operator overload.
+        /// </summary>
+        /// <param name="index">Subscript index</param>
+        /// <returns>The float at the given index</returns>
         public float this[uint index]
         {
             get
@@ -109,24 +138,38 @@ namespace Tizen.NUI
             }
         }
 
-        public static Color GetColorFromPtr(global::System.IntPtr cPtr)
+        internal static Color GetColorFromPtr(global::System.IntPtr cPtr)
         {
             Color ret = new Color(cPtr, false);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
             return ret;
         }
 
-
+        /// <summary>
+        /// Default constructor
+        /// </summary>
         public Color() : this(NDalicPINVOKE.new_Vector4__SWIG_0(), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+
+        /// <summary>
+        /// Constructor.
+        /// </summary>
+        /// <param name="r">red component</param>
+        /// <param name="g">green component</param>
+        /// <param name="b">blue component</param>
+        /// <param name="a">alpha component</param>
         public Color(float r, float g, float b, float a) : this(NDalicPINVOKE.new_Vector4__SWIG_1(r, g, b, a), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+        /// <summary>
+        /// Conversion constructor from an array of four floats.
+        /// </summary>
+        /// <param name="array">array Array of R,G,B,A</param>
         public Color(float[] array) : this(NDalicPINVOKE.new_Vector4__SWIG_2(array), true)
         {
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -167,13 +210,6 @@ namespace Tizen.NUI
             return ret;
         }
 
-        private Color Multiply(float rhs)
-        {
-            Color ret = new Color(NDalicPINVOKE.Vector4_Multiply__SWIG_1(swigCPtr, rhs), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
-
         private Color MultiplyAssign(Color rhs)
         {
             Color ret = new Color(NDalicPINVOKE.Vector4_MultiplyAssign__SWIG_0(swigCPtr, Color.getCPtr(rhs)), false);
@@ -195,12 +231,6 @@ namespace Tizen.NUI
             return ret;
         }
 
-        private Color Divide(float rhs)
-        {
-            Color ret = new Color(NDalicPINVOKE.Vector4_Divide__SWIG_1(swigCPtr, rhs), true);
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-            return ret;
-        }
 
         private Color DivideAssign(Color rhs)
         {
@@ -223,6 +253,11 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// Check if two Color classes are same.
+        /// </summary>
+        /// <param name="rhs">A Color to be compared</param>
+        /// <returns>If two Colors are are same, then true.</returns>
         public bool EqualTo(Color rhs)
         {
             bool ret = NDalicPINVOKE.Vector4_EqualTo(swigCPtr, Color.getCPtr(rhs));
@@ -233,6 +268,11 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// Check if two Color classes are different.
+        /// </summary>
+        /// <param name="rhs">A Color to be compared</param>
+        /// <returns>If two Colors are are different, then true.</returns>
         public bool NotEqualTo(Color rhs)
         {
             bool ret = NDalicPINVOKE.Vector4_NotEqualTo(swigCPtr, Color.getCPtr(rhs));
@@ -248,6 +288,9 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// red component
+        /// </summary>
         public float R
         {
             set
@@ -263,6 +306,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// green component
+        /// </summary>
         public float G
         {
             set
@@ -278,6 +324,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// blue component
+        /// </summary>
         public float B
         {
             set
@@ -293,6 +342,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// alpha component
+        /// </summary>
         public float A
         {
             set
@@ -308,6 +360,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get black colored Color class
+        /// </summary>
         public static Color Black
         {
             get
@@ -319,6 +374,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get white colored Color class
+        /// </summary>
         public static Color White
         {
             get
@@ -330,6 +388,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get red colored Color class
+        /// </summary>
         public static Color Red
         {
             get
@@ -341,6 +402,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get green colored Color class
+        /// </summary>
         public static Color Green
         {
             get
@@ -352,6 +416,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get blue colored Color class
+        /// </summary>
         public static Color Blue
         {
             get
@@ -363,6 +430,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get yellow colored Color class
+        /// </summary>
         public static Color Yellow
         {
             get
@@ -374,6 +444,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get magenta colored Color class
+        /// </summary>
         public static Color Magenta
         {
             get
@@ -385,6 +458,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get cyan colored Color class
+        /// </summary>
         public static Color Cyan
         {
             get
@@ -396,6 +472,9 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// Get transparent colored Color class
+        /// </summary>
         public static Color Transparent
         {
             get
@@ -407,11 +486,19 @@ namespace Tizen.NUI
             }
         }
 
+        /// <summary>
+        /// convert Color class to Vector4 class implicitly.
+        /// </summary>
+        /// <param name="color">A Color to be converted to Vector4</param>
         public static implicit operator Vector4(Color color)
         {
             return new Vector4(color.R, color.G, color.B, color.A);
         }
 
+        /// <summary>
+        /// convert Vector4 class to Color class implicitly.
+        /// </summary>
+        /// <param name="vec">A Vector4 to be converted to Color</param></param>
         public static implicit operator Color(Vector4 vec)
         {
             return new Color(vec.R, vec.G, vec.B, vec.A);
index be844dd..41eb40c 100755 (executable)
@@ -23,6 +23,11 @@ namespace Tizen.NUI
     using System;
     using System.Runtime.InteropServices;
 
+    /// <summary>
+    /// Provides the functionality of handling keyboard navigation and maintaining the two dimensional keyboard focus chain.
+    /// It provides functionality of setting the focus and moving the focus in four directions(i.e.Left, Right, Up and Down).
+    /// It also draws a highlight for the focused View and sends a event when the focus is changed.
+    /// </summary>
     public class FocusManager : BaseHandle
     {
         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
@@ -42,6 +47,9 @@ namespace Tizen.NUI
             DisposeQueue.Instance.Add(this);
         }
 
+        /// <summary>
+        /// To make FocusManager instance be disposed.
+        /// </summary>
         public override void Dispose()
         {
             if (!Stage.IsInstalled())
@@ -382,6 +390,13 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// Moves the keyboard focus to the given View.
+        /// Only one View can be focused at the same time.
+        /// The View must be in the stage already and keyboard focusable.
+        /// </summary>
+        /// <param name="view">The View to be focused</param>
+        /// <returns>Whether the focus is successful or not</returns>
         public bool SetCurrentFocusView(View view)
         {
             bool ret = NDalicManualPINVOKE.FocusManager_SetCurrentFocusActor(swigCPtr, Actor.getCPtr(view));
@@ -389,6 +404,10 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// Gets the current focused actor.
+        /// </summary>
+        /// <returns>A handle to the current focused View or an empty handle if no View is focused</returns>
         public View GetCurrentFocusView()
         {
             View ret = View.DownCast(new Actor(NDalicManualPINVOKE.FocusManager_GetCurrentFocusActor(swigCPtr), true));
@@ -396,6 +415,11 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// Moves the focus to the next focusable View in the focus chain in the given direction(according to the focus traversal order).
+        /// </summary>
+        /// <param name="direction">The direction of focus movement</param>
+        /// <returns>true if the movement was successful</returns>
         public bool MoveFocus(View.FocusDirection direction)
         {
             bool ret = NDalicManualPINVOKE.FocusManager_MoveFocus(swigCPtr, (int)direction);
@@ -403,12 +427,20 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// Clears the focus from the current focused actor if any, so that no actor is focused in the focus chain.
+        /// It will emit FocusChanged event without current focused View.
+        /// </summary>
         public void ClearFocus()
         {
             NDalicManualPINVOKE.FocusManager_ClearFocus(swigCPtr);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+        /// <summary>
+        /// Sets/Gets the status of whether the focus movement should be looped within the same focus group.
+        /// The focus movement is not looped by default.
+        /// </summary>
         public bool FocusGroupLoop
         {
             set
@@ -434,12 +466,23 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// Sets whether an View is a focus group that can limit the scope of focus movement to its child actors in the focus chain.
+        /// Layout controls set themselves as focus groups by default.
+        /// </summary>
+        /// <param name="view">The View to be set as a focus group</param>
+        /// <param name="isFocusGroup">Whether to set the View as a focus group or not</param>
         public void SetAsFocusGroup(View view, bool isFocusGroup)
         {
             NDalicManualPINVOKE.FocusManager_SetAsFocusGroup(swigCPtr, Actor.getCPtr(view), isFocusGroup);
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+        /// <summary>
+        /// Checks whether the actor is set as a focus group or not.
+        /// </summary>
+        /// <param name="view">The View to be checked</param>
+        /// <returns>Whether the View is set as a focus group</returns>
         public bool IsFocusGroup(View view)
         {
             bool ret = NDalicManualPINVOKE.FocusManager_IsFocusGroup(swigCPtr, Actor.getCPtr(view));
@@ -447,6 +490,11 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// Returns the closest ancestor of the given actor that is a focus group.
+        /// </summary>
+        /// <param name="view">The View to be checked for its focus group</param>
+        /// <returns>The focus group the given view belongs to or an empty handle if the given view</returns>
         public View GetFocusGroup(View view)
         {
             View ret = View.DownCast(new Actor(NDalicManualPINVOKE.FocusManager_GetFocusGroup(swigCPtr, Actor.getCPtr(view)), true));
@@ -454,6 +502,10 @@ namespace Tizen.NUI
             return ret;
         }
 
+        /// <summary>
+        /// Sets/Gets the focus indicator View.
+        /// This will replace the default focus indicator view in FocusManager and will be added to the focused view as a highlight.
+        /// </summary>
         public View FocusIndicator
         {
             set
@@ -509,6 +561,9 @@ namespace Tizen.NUI
 
         private static readonly FocusManager instance = FocusManager.Get();
 
+        /// <summary>
+        /// Gets the singleton of FocusManager object.
+        /// </summary>
         public static FocusManager Instance
         {
             get
index cf01adb..379a50e 100755 (executable)
@@ -1,12 +1,21 @@
-//------------------------------------------------------------------------------
-// <auto-generated />
+// Copyright (c) 2017 Samsung Electronics Co., Ltd.
 //
-// This file was automatically generated by SWIG (http://www.swig.org).
-// Version 3.0.9
+// 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
 //
-// Do not make changes to this file unless you know what you are doing--modify
-// the SWIG interface file instead.
-//------------------------------------------------------------------------------
+// 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
+// Some have been manually changed
+
 
 namespace Tizen.NUI
 {
@@ -35,6 +44,9 @@ namespace Tizen.NUI
             DisposeQueue.Instance.Add(this);
         }
 
+        /// <summary>
+        /// To make RelayoutContainer instance be disposed.
+        /// </summary>
         public virtual void Dispose()
         {
             if (!Stage.IsInstalled())
@@ -58,7 +70,11 @@ namespace Tizen.NUI
             }
         }
 
-
+        /// <summary>
+        /// Adds relayout information to the container if it doesn't already exist.
+        /// </summary>
+        /// <param name="actor">The actor to relayout</param>
+        /// <param name="size">The size to relayout</param>
         public virtual void Add(Actor actor, Size2D size)
         {
             NDalicPINVOKE.RelayoutContainer_Add(swigCPtr, Actor.getCPtr(actor), Size2D.getCPtr(size));