From: Seoyeon Kim Date: Fri, 17 Mar 2017 07:04:09 +0000 (+0900) Subject: Add more comments for API reference of part 2 X-Git-Tag: accepted/tizen/common/20170320.174038~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F12%2F119512%2F1;p=platform%2Fcore%2Fcsapi%2Fnui.git Add more comments for API reference of part 2 Change-Id: I2d6580f115bb1794b072e4da97aa37b81dbbfd8a Signed-off-by: Seoyeon Kim --- diff --git a/Tizen.NUI/src/public/Color.cs b/Tizen.NUI/src/public/Color.cs index e9fe9da..4119b9e 100755 --- a/Tizen.NUI/src/public/Color.cs +++ b/Tizen.NUI/src/public/Color.cs @@ -20,6 +20,9 @@ namespace Tizen.NUI using System; + /// + /// Color Class + /// public class Color : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -65,42 +68,65 @@ namespace Tizen.NUI } + /// + /// Addition operator. + /// public static Color operator +(Color arg1, Color arg2) { return arg1.Add(arg2); } + /// + /// Subtraction operator. + /// public static Color operator -(Color arg1, Color arg2) { return arg1.Subtract(arg2); } + /// + /// Subtraction operator, void + /// public static Color operator -(Color arg1) { return arg1.Subtract(); } + /// + /// Multiplication operator. + /// public static Color operator *(Color arg1, Color arg2) { return arg1.Multiply(arg2); } + /// + /// Multiplication operator, using float. + /// public static Color operator *(Color arg1, float arg2) { return arg1.Multiply(arg2); } + /// + /// Division operator. + /// public static Color operator /(Color arg1, Color arg2) { return arg1.Divide(arg2); } + /// + /// Division operator, using float. + /// public static Color operator /(Color arg1, float arg2) { return arg1.Divide(arg2); } - + /// + /// Array subscript operator. + /// public float this[uint index] { get @@ -109,6 +135,9 @@ namespace Tizen.NUI } } + /// + /// GetColorFromPtr + /// public static Color GetColorFromPtr(global::System.IntPtr cPtr) { Color ret = new Color(cPtr, false); @@ -117,21 +146,40 @@ namespace Tizen.NUI } + /// + /// Constructor. + /// public Color() : this(NDalicPINVOKE.new_Vector4__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Constructor. + /// + /// The red component + /// The green component + /// The blue component + /// The alpha component 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(); } + /// + /// Constructor. + /// + /// The array public Color(float[] array) : this(NDalicPINVOKE.new_Vector4__SWIG_2(array), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Add Color. + /// + /// A reference to the copied handle + /// A reference to this private Color Add(Color rhs) { Color ret = new Color(NDalicPINVOKE.Vector4_Add(swigCPtr, Color.getCPtr(rhs)), true); @@ -139,6 +187,11 @@ namespace Tizen.NUI return ret; } + /// + /// Add assignment operator. + /// + /// A reference to the copied handle + /// A reference to this private Color AddAssign(Vector4 rhs) { Color ret = new Color(NDalicPINVOKE.Vector4_AddAssign(swigCPtr, Color.getCPtr(rhs)), false); @@ -223,6 +276,11 @@ namespace Tizen.NUI return ret; } + /// + /// Assignment operator. + /// + /// A reference to the copied handle + /// A reference to this public bool EqualTo(Color rhs) { bool ret = NDalicPINVOKE.Vector4_EqualTo(swigCPtr, Color.getCPtr(rhs)); @@ -233,6 +291,11 @@ namespace Tizen.NUI return ret; } + /// + /// Assignment operator. + /// + /// A reference to the copied handle + /// A reference to this public bool NotEqualTo(Color rhs) { bool ret = NDalicPINVOKE.Vector4_NotEqualTo(swigCPtr, Color.getCPtr(rhs)); @@ -248,6 +311,9 @@ namespace Tizen.NUI return ret; } + /// + /// The red component + /// public float R { set @@ -263,6 +329,9 @@ namespace Tizen.NUI } } + /// + /// The Green Component. + /// public float G { set @@ -278,6 +347,9 @@ namespace Tizen.NUI } } + /// + /// The Blue Component. + /// public float B { set @@ -293,6 +365,9 @@ namespace Tizen.NUI } } + /// + /// The Alpha Component. + /// public float A { set @@ -308,6 +383,9 @@ namespace Tizen.NUI } } + /// + /// The Black Color. + /// public static Color Black { get @@ -319,6 +397,9 @@ namespace Tizen.NUI } } + /// + /// The White Color. + /// public static Color White { get @@ -330,6 +411,9 @@ namespace Tizen.NUI } } + /// + /// The Red Color. + /// public static Color Red { get @@ -341,6 +425,9 @@ namespace Tizen.NUI } } + /// + /// The Green Color. + /// public static Color Green { get @@ -352,6 +439,9 @@ namespace Tizen.NUI } } + /// + /// The Blue Color. + /// public static Color Blue { get @@ -363,6 +453,9 @@ namespace Tizen.NUI } } + /// + /// The Yellow Color. + /// public static Color Yellow { get @@ -374,6 +467,9 @@ namespace Tizen.NUI } } + /// + /// The Magenta Color. + /// public static Color Magenta { get @@ -385,6 +481,9 @@ namespace Tizen.NUI } } + /// + /// The Cyan Color. + /// public static Color Cyan { get @@ -396,6 +495,9 @@ namespace Tizen.NUI } } + /// + /// The Transparent Color. + /// public static Color Transparent { get diff --git a/Tizen.NUI/src/public/CustomView.cs b/Tizen.NUI/src/public/CustomView.cs index 3a85b1f..393b5fb 100755 --- a/Tizen.NUI/src/public/CustomView.cs +++ b/Tizen.NUI/src/public/CustomView.cs @@ -842,6 +842,9 @@ namespace Tizen.NUI { } } + /// + /// Enumeration for CustomViewBehaviour + /// public enum CustomViewBehaviour { ViewBehaviourDefault = 0, diff --git a/Tizen.NUI/src/public/Path.cs b/Tizen.NUI/src/public/Path.cs index 302b2b4..04aa017 100755 --- a/Tizen.NUI/src/public/Path.cs +++ b/Tizen.NUI/src/public/Path.cs @@ -27,6 +27,10 @@ namespace Tizen.NUI { + /// + /// A 3D parametric curve. + /// Paths can be used to animate position and orientation of actors. + /// public class Path : Handle { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -119,11 +123,20 @@ namespace Tizen.NUI } + /// + /// Creates an initialized Path handle. + /// public Path() : this(NDalicPINVOKE.Path_New(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Downcasts a handle to Path handle. + /// If handle points to a Path object, the downcast produces valid handle. + /// If not, the returned handle is left uninitialized. + /// + /// Handle to an object public new static Path DownCast(BaseHandle handle) { Path ret = new Path(NDalicPINVOKE.Path_DownCast(BaseHandle.getCPtr(handle)), true); @@ -143,30 +156,57 @@ namespace Tizen.NUI return ret; } + /// + /// Adds an interpolation point. + /// + /// The new interpolation point to be added public void AddPoint(Position point) { NDalicPINVOKE.Path_AddPoint(swigCPtr, Position.getCPtr(point)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Adds a control point. + /// + /// The new control point to be added public void AddControlPoint(Vector3 point) { NDalicPINVOKE.Path_AddControlPoint(swigCPtr, Vector3.getCPtr(point)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Automatic generation of control points. Generated control points which result in a smooth join between the splines of each segment. + /// The generating algorithm is as follows: + /// For a given knot point K[N], find the vector that bisects K[N-1],[N] and [N],[N+1]. + /// Calculate the tangent vector by taking the normal of this bisector. + /// The in control point is the length of the preceding segment back along this bisector multiplied by the curvature. + /// The out control point is the length of the succeeding segment forward along this bisector multiplied by the curvature. + /// + /// The curvature of the spline. 0 gives straight lines between the knots, negative values means the spline contains loops, positive values up to 0.5 result in a smooth curve, positive values between 0.5 and 1 result in looped curves where the loops are not distinct (i.e. the curve appears to be non-continuous), positive values higher than 1 result in looped curves public void GenerateControlPoints(float curvature) { NDalicPINVOKE.Path_GenerateControlPoints(swigCPtr, curvature); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Sample path at a given progress. Calculates position and tangent at that point of the curve. + /// + /// A floating point value between 0.0 and 1.0 + /// The interpolated position at that progress + /// The interpolated tangent at that progress public void Sample(float progress, Vector3 position, Vector3 tangent) { NDalicPINVOKE.Path_Sample(swigCPtr, progress, Vector3.getCPtr(position), Vector3.getCPtr(tangent)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Accessor for the interpolation points. + /// + /// The index of the interpolation point public Vector3 GetPoint(uint index) { Vector3 ret = new Vector3(NDalicPINVOKE.Path_GetPoint(swigCPtr, index), false); @@ -174,6 +214,10 @@ namespace Tizen.NUI return ret; } + /// + /// Accessor for the control points. + /// + /// The index of the control point public Vector3 GetControlPoint(uint index) { Vector3 ret = new Vector3(NDalicPINVOKE.Path_GetControlPoint(swigCPtr, index), false); @@ -181,6 +225,10 @@ namespace Tizen.NUI return ret; } + /// + /// Gets the number of interpolation points in the path. + /// + /// The number of interpolation points in the path public uint GetPointCount() { uint ret = NDalicPINVOKE.Path_GetPointCount(swigCPtr); @@ -188,6 +236,9 @@ namespace Tizen.NUI return ret; } + /// + /// Enumeration for Points + /// public PropertyArray Points { get @@ -202,6 +253,9 @@ namespace Tizen.NUI } } + /// + /// Enumeration for ControlPoints + /// public PropertyArray ControlPoints { get diff --git a/Tizen.NUI/src/public/PinchGesture.cs b/Tizen.NUI/src/public/PinchGesture.cs index 2167685..eb5f26c 100755 --- a/Tizen.NUI/src/public/PinchGesture.cs +++ b/Tizen.NUI/src/public/PinchGesture.cs @@ -11,6 +11,10 @@ namespace Tizen.NUI { + /// + /// A PinchGesture is emitted when the user moves two fingers towards or away from each other. + /// A pinch gesture will continue to be sent to the actor under the center point of the pinch until the pinch ends. + /// public class PinchGesture : Gesture { private global::System.Runtime.InteropServices.HandleRef swigCPtr; @@ -62,6 +66,12 @@ namespace Tizen.NUI return ret; } + /// + /// The scale factor from the start of the pinch gesture till the latest pinch gesture. + /// If the user is moving their fingers away from each other, then + /// this value increases. Conversely, if the user is moving their + /// fingers towards each other, this value will decrease. + /// public float Scale { get @@ -70,6 +80,10 @@ namespace Tizen.NUI } } + /// + /// The speed at which the user is moving their fingers. + /// This is the pixel movement per second. + /// public float Speed { get @@ -78,6 +92,9 @@ namespace Tizen.NUI } } + /// + /// The center point of the two points that caused the pinch gesture in screen coordinates. + /// public Vector2 ScreenCenterPoint { get @@ -86,6 +103,9 @@ namespace Tizen.NUI } } + /// + /// The center point of the two points that caused the pinch gesture in local actor coordinates. + /// public Vector2 LocalCenterPoint { get @@ -94,16 +114,29 @@ namespace Tizen.NUI } } + /// + /// Default Constructor. + /// + /// The state of the gesture public PinchGesture(Gesture.StateType state) : this(NDalicPINVOKE.new_PinchGesture__SWIG_0((int)state), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Copy constructor. + /// + /// A reference to the copied handle public PinchGesture(PinchGesture rhs) : this(NDalicPINVOKE.new_PinchGesture__SWIG_1(PinchGesture.getCPtr(rhs)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Assignment operator. + /// + /// A reference to the copied handle + /// A reference to this public PinchGesture Assign(PinchGesture rhs) { PinchGesture ret = new PinchGesture(NDalicPINVOKE.PinchGesture_Assign(swigCPtr, PinchGesture.getCPtr(rhs)), false);