Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NUI] Add comments (3rd patch) #6386

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/Tizen.NUI/src/public/BaseComponents/VisualView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@ public class VisualView : CustomView

/// <summary>
/// Constructor.
/// This constructor initializes the VisualView with default behavior and support for touch events.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public VisualView() : this(CustomViewBehaviour.ViewBehaviourDefault | CustomViewBehaviour.RequiresTouchEventsSupport)
{
}

/// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
/// This will be public opened after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public VisualView(ViewStyle viewStyle) : this(CustomViewBehaviour.ViewBehaviourDefault | CustomViewBehaviour.RequiresTouchEventsSupport, viewStyle)
{
Expand Down Expand Up @@ -99,6 +100,7 @@ public int NumberOfVisuals

/// <summary>
/// Overrides the parent method.
/// This method is called by the framework when the instance is created.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public override void OnInitialize()
Expand Down Expand Up @@ -187,7 +189,7 @@ public void RemoveVisual(string visualName)
}

/// <summary>
/// Removes all visuals of the visual view.
/// This method removes all visuals associated with the VisualView instance.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public void RemoveAll()
Expand Down Expand Up @@ -410,7 +412,7 @@ public Animation AnimateVisualAddFinish()
}

/// <summary>
/// temporary fix to pass TCT.
/// Applies an animation to the specified visual map properties.
/// </summary>
/// <exception cref="ArgumentNullException"> Thrown when visualMap is null. </exception>
/// <since_tizen> 3 </since_tizen>
Expand Down
8 changes: 7 additions & 1 deletion src/Tizen.NUI/src/public/Clipboard/Clipboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
namespace Tizen.NUI
{
/// <summary>
/// Clipboard.
/// This class provides methods to interact with the system clipboard, allowing users to get and set clipboard content.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public partial class Clipboard : BaseHandle
Expand Down Expand Up @@ -195,7 +195,13 @@ private void OnClipboardDataReceived(object sender, ClipboardEventArgs e)

/// <summary>
/// Dispose.
/// Releases unmanaged and optionally managed resources.
/// </summary>
/// <remarks>
/// When overriding this method, you need to distinguish between explicit and implicit conditions. For explicit conditions, release both managed and unmanaged resources. For implicit conditions, only release unmanaged resources.
/// </remarks>
/// <param name="type">Explicit to release both managed and unmanaged resources. Implicit to release only unmanaged resources.</param>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void Dispose(DisposeTypes type)
{
if (disposed)
Expand Down
43 changes: 32 additions & 11 deletions src/Tizen.NUI/src/public/Common/BaseHandle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ internal BaseHandle(global::System.IntPtr cPtr)
}

/// <summary>
/// Dispose.
/// Finalizes the instance of the BaseHandle class.
/// This method implements the finalization pattern for proper disposal of resources.
/// </summary>
/// <since_tizen> 3 </since_tizen>
// following this guide: https://docs.microsoft.com/ko-kr/dotnet/fundamentals/code-analysis/quality-rules/ca1063?view=vs-2019 (CA1063)
Expand Down Expand Up @@ -225,6 +226,9 @@ public static explicit operator bool(BaseHandle handle)
/// <summary>
/// Equality operator
/// </summary>
/// <param name="x">The first BaseHandle instance to compare.</param>
/// <param name="y">The second BaseHandle instance to compare.</param>
/// <returns>true if both instances are equal; otherwise false.</returns>
/// <since_tizen> 3 </since_tizen>
public static bool operator ==(BaseHandle x, BaseHandle y)
{
Expand Down Expand Up @@ -254,18 +258,24 @@ public static explicit operator bool(BaseHandle handle)
}

/// <summary>
/// Inequality operator. Returns Null if either operand is Null
/// Inequality operator. Returns true if the operands are not equal, false otherwise. Returns true if either operand is null.
/// </summary>
/// <param name="x">The first BaseHandle instance to compare.</param>
/// <param name="y">The second BaseHandle instance to compare.</param>
/// <returns>True if the operands are not equal, false otherwise. Returns true if either operand is null.</returns>
/// <since_tizen> 3 </since_tizen>
public static bool operator !=(BaseHandle x, BaseHandle y)
{
return !(x == y);
}

/// <summary>
/// Logical AND operator.<br />
/// It's possible when doing a operator this function (opBitwiseAnd) is never called due to short circuiting.<br />
/// Logical AND operator.
/// It's possible when doing a logical AND operation, this function (opBitwiseAnd) might never be called due to short circuiting.
/// </summary>
/// <param name="x">The first BaseHandle instance.</param>
/// <param name="y">The second BaseHandle instance.</param>
/// <returns>Returns the first BaseHandle instance if both instances are equal; otherwise, returns null.</returns>
/// <since_tizen> 3 </since_tizen>
public static BaseHandle operator &(BaseHandle x, BaseHandle y)
{
Expand All @@ -277,9 +287,12 @@ public static explicit operator bool(BaseHandle handle)
}

/// <summary>
/// Logical OR operator for ||.<br />
/// It's possible when doing a || this function (opBitwiseOr) is never called due to short circuiting.<br />
/// Logical OR operator for ||.
/// It's possible when doing a || this function (opBitwiseOr) is never called due to short circuiting.
/// </summary>
/// <param name="x">The first BaseHandle to be compared.</param>
/// <param name="y">The second BaseHandle to be compared.</param>
/// <returns>A BaseHandle that contains either of the non-null bodies of the two operands.</returns>
/// <since_tizen> 3 </since_tizen>
public static BaseHandle operator |(BaseHandle x, BaseHandle y)
{
Expand All @@ -299,8 +312,10 @@ public static explicit operator bool(BaseHandle handle)
}

/// <summary>
/// Logical ! operator
/// Logical ! operator for BaseHandle class.
/// </summary>
/// <param name="x">The BaseHandle instance to check.</param>
/// <returns>True if the handle is null or has no body; otherwise, false.</returns>
/// <since_tizen> 3 </since_tizen>
public static bool operator !(BaseHandle x)
{
Expand All @@ -317,10 +332,10 @@ public static explicit operator bool(BaseHandle handle)
}

/// <summary>
/// Equals
/// Compares the current instance with another object of the same type and returns true if they represent the same handle.
/// </summary>
/// <param name="o">The object should be compared.</param>
/// <returns>True if equal.</returns>
/// <param name="o">The object to compare with the current instance.</param>
/// <returns>true if the specified object is equal to the current object; otherwise, false.</returns>
/// <since_tizen> 5 </since_tizen>
public override bool Equals(object o)
{
Expand Down Expand Up @@ -361,12 +376,13 @@ public void Dispose()
/// <summary>
/// Hidden API (Inhouse API).
/// Dispose.
/// Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.
/// </summary>
/// <remarks>
/// Following the guide of https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/implementing-dispose.
/// This will replace "protected virtual void Dispose(DisposeTypes type)" which is exactly same in functionality.
/// </remarks>
/// <param name="disposing">true in order to free managed objects</param>
/// <param name="disposing">If true, disposes any disposable objects. If false, does not dispose disposable objects.</param>
// Protected implementation of Dispose pattern.
[EditorBrowsable(EditorBrowsableState.Never)]
protected virtual void Dispose(bool disposing)
Expand Down Expand Up @@ -570,7 +586,12 @@ internal void UnregisterFromRegistry()

/// <summary>
/// Dispose.
/// Releases unmanaged and optionally managed resources.
/// </summary>
/// <remarks>
/// When overriding this method, you need to distinguish between explicit and implicit conditions. For explicit conditions, release both managed and unmanaged resources. For implicit conditions, only release unmanaged resources.
/// </remarks>
/// <param name="type">Explicit to release both managed and unmanaged resources. Implicit to release only unmanaged resources.</param>
/// <since_tizen> 3 </since_tizen>
protected virtual void Dispose(DisposeTypes type)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Tizen.NUI/src/public/Common/Color.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ namespace Tizen.NUI
{
/// <summary>
/// The Color class.
/// This class represents a color using red, green, blue, and alpha components.
/// It provides methods to create and manipulate colors.
/// </summary>
[Tizen.NUI.Binding.TypeConverter(typeof(ColorTypeConverter))]
public class Color : Disposable, ICloneable
Expand Down
2 changes: 1 addition & 1 deletion src/Tizen.NUI/src/public/Common/Container.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ internal MergedStyle MergedStyle
}

/// <summary>
/// List of children of Container.
/// Gets the list of children of Container.
/// </summary>
/// <since_tizen> 4 </since_tizen>
public List<View> Children
Expand Down
5 changes: 3 additions & 2 deletions src/Tizen.NUI/src/public/Common/Degree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class Degree : Disposable
{

/// <summary>
/// The constructor.
/// Default constructor of Degree class.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public Degree() : this(Interop.Degree.NewDegree(), true)
Expand Down Expand Up @@ -61,7 +61,8 @@ internal Degree(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemor
}

/// <summary>
/// The value of degree.
/// Gets or sets the value of the degree.
/// This property value is the angle in degrees.
/// </summary>
/// <since_tizen> 3 </since_tizen>
public float Value
Expand Down
26 changes: 13 additions & 13 deletions src/Tizen.NUI/src/public/Common/Extents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class Extents : Disposable, ICloneable


/// <summary>
/// Constructor.
/// Default constructor of Extents class.
/// </summary>
/// <since_tizen> 4 </since_tizen>
public Extents() : this(Interop.Extents.NewExtents(), true)
Expand Down Expand Up @@ -62,10 +62,10 @@ public static implicit operator Extents(ushort value)

/// <summary>
/// Constructor.
/// <param name="start">Start extent.</param>
/// <param name="end">End extent.</param>
/// <param name="top">Top extent.</param>
/// <param name="bottom">Bottom extent.</param>
/// <param name="start">The start extent value horizontally.</param>
/// <param name="end">The end extent value horizontally.</param>
/// <param name="top">The top extent value vertically.</param>
/// <param name="bottom">The bottom extent value vertically.</param>
/// </summary>
/// <since_tizen> 4 </since_tizen>
public Extents(ushort start, ushort end, ushort top, ushort bottom) : this(Interop.Extents.NewExtents(start, end, top, bottom), true)
Expand All @@ -81,10 +81,10 @@ internal Extents(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemo
/// Constructor
/// </summary>
/// <param name="cb"></param>
/// <param name="start"></param>
/// <param name="end"></param>
/// <param name="top"></param>
/// <param name="bottom"></param>
/// <param name="start">The start extent value horizontally.</param>
/// <param name="end">The end extent value horizontally.</param>
/// <param name="top">The top extent value vertically.</param>
/// <param name="bottom">The bottom extent value vertically.</param>
/// <since_tizen> Only used by Tizen.NUI.Components, will not be opened </since_tizen>
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public Extents(ExtentsChangedCallback cb, ushort start, ushort end, ushort top, ushort bottom) : this(Interop.Extents.NewExtents(start, end, top, bottom), true)
Expand Down Expand Up @@ -115,10 +115,10 @@ public void CopyFrom(Extents that)
/// <summary>
/// Constructor
/// </summary>
/// <param name="start"></param>
/// <param name="end"></param>
/// <param name="top"></param>
/// <param name="bottom"></param>
/// <param name="start">The start extent value horizontally.</param>
/// <param name="end">The end extent value horizontally.</param>
/// <param name="top">The top extent value vertically.</param>
/// <param name="bottom">The bottom extent value vertically.</param>
/// <since_tizen> Only used by Tizen.NUI.Components, will not be opened </since_tizen>
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public delegate void ExtentsChangedCallback(ushort start, ushort end, ushort top, ushort bottom);
Expand Down
Loading
Loading