Skip to content

Commit

Permalink
[NUI] Remove build warnings at DragAndDrop + TextConstants
Browse files Browse the repository at this point in the history
1. Fix typo error (navtive -> native>
2. Vector2 is already nullabe class. We don't need to make it as Vector2?

Signed-off-by: Eunki Hong <[email protected]>
  • Loading branch information
Eunki Hong authored and hinohie committed Nov 6, 2024
1 parent d3a1af2 commit 61406ba
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/Tizen.NUI/src/public/BaseComponents/TextConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ public struct Outline : IEquatable<Outline>
/// If not provided then the offset is not enabled. <br />
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Vector2? Offset { get; set; }
public Vector2 Offset { get; set; }

/// <summary>
/// The radius of blurring effect applied to the outline of the text. A higher value results in a more blurred outline. <br />
Expand Down
30 changes: 15 additions & 15 deletions src/Tizen.NUI/src/public/DragAndDrop/DragAndDrop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ public class DragAndDrop : BaseHandle
/// </summary>
/// <param name="targetView">The view where the drag event occurred.</param>
/// <param name="nativeDragEvent">The native drag event containing details about the drag operation.</param>
public delegate void DragAndDropEventHandler(View targetView, DragEvent navtiveDragEvent);
public delegate void DragAndDropEventHandler(View targetView, DragEvent nativeDragEvent);
[EditorBrowsable(EditorBrowsableState.Never)]
public delegate void DragAndDropWindowEventHandler(Window targetWindow, DragEvent navtiveDragEvent);
private delegate void InternalDragAndDropEventHandler(global::System.IntPtr navtiveDragEvent);
public delegate void DragAndDropWindowEventHandler(Window targetWindow, DragEvent nativeDragEvent);
private delegate void InternalDragAndDropEventHandler(global::System.IntPtr nativeDragEvent);
private InternalSourceEventHandler sourceEventCb;
private Dictionary<View, InternalDragAndDropEventHandler> targetEventDictionary = new Dictionary<View, InternalDragAndDropEventHandler>();
private Dictionary<Window, InternalDragAndDropEventHandler> targetWindowEventDictionary = new Dictionary<Window, InternalDragAndDropEventHandler>();
Expand All @@ -61,16 +61,16 @@ public class DragAndDrop : BaseHandle
private const int MinDragWindowWidth = 100;
private const int MinDragWindowHeight = 100;

private void ProcessDragEventTargetCallback(IntPtr navtiveDragEvent, View targetView, DragAndDropEventHandler callback)
private void ProcessDragEventTargetCallback(IntPtr nativeDragEvent, View targetView, DragAndDropEventHandler callback)
{
DragType type = (DragType)Interop.DragAndDrop.GetAction(navtiveDragEvent);
DragType type = (DragType)Interop.DragAndDrop.GetAction(nativeDragEvent);
DragEvent dragEvent = new DragEvent();
global::System.IntPtr cPtr = Interop.DragAndDrop.GetPosition(navtiveDragEvent);
global::System.IntPtr cPtr = Interop.DragAndDrop.GetPosition(nativeDragEvent);
dragEvent.Position = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, true);

IntPtr nativeMimeTypes;
int count;
Interop.DragAndDrop.GetMimeTypes(navtiveDragEvent, out nativeMimeTypes, out count);
Interop.DragAndDrop.GetMimeTypes(nativeDragEvent, out nativeMimeTypes, out count);
if (count > 0)
{
IntPtr [] nativeMimeTypesArrary = new IntPtr[count];
Expand Down Expand Up @@ -105,21 +105,21 @@ private void ProcessDragEventTargetCallback(IntPtr navtiveDragEvent, View target
else if (type == DragType.Drop)
{
dragEvent.DragType = type;
dragEvent.Data = Interop.DragAndDrop.GetData(navtiveDragEvent);
dragEvent.Data = Interop.DragAndDrop.GetData(nativeDragEvent);
callback(targetView, dragEvent);
}
}

private void ProcessDragEventWindowCallback(IntPtr navtiveDragEvent, Window targetWindow, DragAndDropWindowEventHandler callback)
private void ProcessDragEventWindowCallback(IntPtr nativeDragEvent, Window targetWindow, DragAndDropWindowEventHandler callback)
{
DragType type = (DragType)Interop.DragAndDrop.GetAction(navtiveDragEvent);
DragType type = (DragType)Interop.DragAndDrop.GetAction(nativeDragEvent);
DragEvent dragEvent = new DragEvent();
global::System.IntPtr cPtr = Interop.DragAndDrop.GetPosition(navtiveDragEvent);
global::System.IntPtr cPtr = Interop.DragAndDrop.GetPosition(nativeDragEvent);
dragEvent.Position = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);

IntPtr nativeMimeTypes;
int count;
Interop.DragAndDrop.GetMimeTypes(navtiveDragEvent, out nativeMimeTypes, out count);
Interop.DragAndDrop.GetMimeTypes(nativeDragEvent, out nativeMimeTypes, out count);
if (count > 0)
{
IntPtr [] nativeMimeTypesArrary = new IntPtr[count];
Expand Down Expand Up @@ -154,7 +154,7 @@ private void ProcessDragEventWindowCallback(IntPtr navtiveDragEvent, Window targ
else if (type == DragType.Drop)
{
dragEvent.DragType = type;
dragEvent.Data = Interop.DragAndDrop.GetData(navtiveDragEvent);
dragEvent.Data = Interop.DragAndDrop.GetData(nativeDragEvent);
callback(targetWindow, dragEvent);
}
}
Expand Down Expand Up @@ -311,7 +311,7 @@ public void AddListener(View targetView, DragAndDropEventHandler callback)
[EditorBrowsable(EditorBrowsableState.Never)]
public void AddListener(View targetView, string mimeType, DragAndDropEventHandler callback)
{
InternalDragAndDropEventHandler cb = (navtiveDragEvent) => ProcessDragEventTargetCallback(navtiveDragEvent, targetView, callback);
InternalDragAndDropEventHandler cb = (nativeDragEvent) => ProcessDragEventTargetCallback(nativeDragEvent, targetView, callback);

targetEventDictionary.Add(targetView, cb);

Expand Down Expand Up @@ -364,7 +364,7 @@ public void AddListener(Window targetWindow, DragAndDropWindowEventHandler callb
[EditorBrowsable(EditorBrowsableState.Never)]
public void AddListener(Window targetWindow, string mimeType, DragAndDropWindowEventHandler callback)
{
InternalDragAndDropEventHandler cb = (navtiveDragEvent) => ProcessDragEventWindowCallback(navtiveDragEvent, targetWindow, callback);
InternalDragAndDropEventHandler cb = (nativeDragEvent) => ProcessDragEventWindowCallback(nativeDragEvent, targetWindow, callback);

targetWindowEventDictionary.Add(targetWindow, cb);

Expand Down

0 comments on commit 61406ba

Please sign in to comment.