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] Rebase DevelNUI #6326

Merged
merged 5 commits into from
Sep 11, 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
2 changes: 1 addition & 1 deletion packaging/csapi-tizenfx.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Auto-generated from csapi-tizenfx.spec.in by makespec.sh

%define TIZEN_NET_API_VERSION 12
%define TIZEN_NET_RPM_VERSION 12.0.0.999+nui22339
%define TIZEN_NET_RPM_VERSION 12.0.0.999+nui22340
%define TIZEN_NET_NUGET_VERSION 12.0.0.99999

%define DOTNET_ASSEMBLY_PATH /usr/share/dotnet.tizen/framework
Expand Down
2 changes: 1 addition & 1 deletion packaging/version.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ RPM_VERSION=12.0.0.999
NUGET_VERSION=12.0.0.99999

# RPM Version Suffix
RPM_VERSION_SUFFIX=nui22339
RPM_VERSION_SUFFIX=nui22340
10 changes: 5 additions & 5 deletions src/Tizen.NUI/src/internal/Interop/Interop.DragAndDrop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ internal enum DragType
public static extern global::System.IntPtr New();

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_DragAndDrop_StartDragAndDrop")]
public static extern bool StartDragAndDrop(global::System.Runtime.InteropServices.HandleRef dragAndDrop, global::System.Runtime.InteropServices.HandleRef sourceView, global::System.Runtime.InteropServices.HandleRef shadow, string mimeType, string data, global::System.Runtime.InteropServices.HandleRef callback);
public static extern bool StartDragAndDrop(global::System.Runtime.InteropServices.HandleRef dragAndDrop, global::System.Runtime.InteropServices.HandleRef sourceView, global::System.Runtime.InteropServices.HandleRef shadow, string [] mimeTypes, int mimeTypsSize, string [] dataSet, int dataSetSize, global::System.Runtime.InteropServices.HandleRef callback);

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_DragAndDrop_AddListener")]
[return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
public static extern bool AddListener(global::System.Runtime.InteropServices.HandleRef dragAndDrop, global::System.Runtime.InteropServices.HandleRef targetView, global::System.Runtime.InteropServices.HandleRef callback);
public static extern bool AddListener(global::System.Runtime.InteropServices.HandleRef dragAndDrop, global::System.Runtime.InteropServices.HandleRef targetView, string mimeType, global::System.Runtime.InteropServices.HandleRef callback);

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_DragAndDrop_RemoveListener")]
[return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
public static extern bool RemoveListener(global::System.Runtime.InteropServices.HandleRef dragAndDrop, global::System.Runtime.InteropServices.HandleRef targetView, global::System.Runtime.InteropServices.HandleRef callback);

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_DragAndDrop_Window_AddListener")]
[return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
public static extern bool WindowAddListener(global::System.Runtime.InteropServices.HandleRef dragAndDrop, global::System.Runtime.InteropServices.HandleRef targetWindow, global::System.Runtime.InteropServices.HandleRef callback);
public static extern bool WindowAddListener(global::System.Runtime.InteropServices.HandleRef dragAndDrop, global::System.Runtime.InteropServices.HandleRef targetWindow, string mimeType, global::System.Runtime.InteropServices.HandleRef callback);

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_DragAndDrop_Window_RemoveListener")]
[return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
Expand All @@ -57,8 +57,8 @@ internal enum DragType
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_DragEvent_GetPosition")]
public static extern global::System.IntPtr GetPosition(global::System.IntPtr dragAndDrop);

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_DragEvent_GetMimeType")]
public static extern string GetMimeType(global::System.IntPtr dragAndDrop);
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_DragEvent_GetMimeTypes")]
public static extern bool GetMimeTypes(global::System.IntPtr dragAndDrop, out global::System.IntPtr mimeTypes, out int count);

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_DragEvent_GetData")]
public static extern string GetData(global::System.IntPtr dragAndDrop);
Expand Down
12 changes: 0 additions & 12 deletions src/Tizen.NUI/src/internal/Interop/Interop.Property.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,9 @@ internal static partial class Property
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Property__SWIG_0")]
public static extern global::System.IntPtr NewProperty(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Property__SWIG_1")]
public static extern global::System.IntPtr NewProperty(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3);

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Property__SWIG_2")]
public static extern global::System.IntPtr NewProperty(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2);

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Property__SWIG_3")]
public static extern global::System.IntPtr NewProperty(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2, int jarg3);

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_Property")]
public static extern void DeleteProperty(global::System.Runtime.InteropServices.HandleRef jarg1);

Expand All @@ -57,12 +51,6 @@ internal static partial class Property
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Property_propertyIndex_get")]
public static extern int PropertyIndexGet(global::System.Runtime.InteropServices.HandleRef jarg1);

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Property_componentIndex_set")]
public static extern void ComponentIndexSet(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2);

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Property_componentIndex_get")]
public static extern int ComponentIndexGet(global::System.Runtime.InteropServices.HandleRef jarg1);

[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Property_Array__SWIG_0")]
public static extern global::System.IntPtr NewPropertyArray();

Expand Down
33 changes: 20 additions & 13 deletions src/Tizen.NUI/src/public/Accessibility/Accessibility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
namespace Tizen.NUI.Accessibility
{
/// <summary>
/// Accessibility provides Dali-ATSPI interface which has functionality of Screen-Reader and general accessibility
/// Accessibility provides Dali-ATSPI interface which has functionality of Screen-Reader and general accessibility.
/// </summary>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[SuppressMessage("Microsoft.Design", "CA1724: Type names should not match namespaces")]
[SuppressMessage("Microsoft.Design", "CA1001:Types that own disposable fields should be disposable", Justification = "This is a singleton class and is not disposed")]
[SuppressMessage("Microsoft.Design", "CA1001: Types that own disposable fields should be disposable", Justification = "This is a singleton class and is not disposed")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static class Accessibility
{
Expand Down Expand Up @@ -99,10 +99,10 @@ public static bool IsScreenReaderEnabled

#region Method
/// <summary>
/// Start to speak
/// Start to speak.
/// </summary>
/// <param name="sentence">Content to be spoken</param>
/// <param name="discardable">true to be stopped and discarded when other Say is triggered</param>
/// <param name="sentence">Content to be spoken.</param>
/// <param name="discardable">true to be stopped and discarded when other Say is triggered.</param>
/// <returns></returns>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
Expand All @@ -113,9 +113,9 @@ public static void Say(string sentence, bool discardable)
}

/// <summary>
/// To make Say be paused or resumed
/// To make Say be paused or resumed.
/// </summary>
/// <param name="pause">true to be paused, false to be resumed</param>
/// <param name="pause">true to be paused, false to be resumed.</param>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
public static void PauseResume(bool pause)
Expand All @@ -125,9 +125,9 @@ public static void PauseResume(bool pause)
}

/// <summary>
/// Cancels anything screen-reader is reading / has queued to read
/// Cancels anything screen-reader is reading / has queued to read.
/// </summary>
/// <param name="alsoNonDiscardable">whether to cancel non-discardable readings as well</param>
/// <param name="alsoNonDiscardable">whether to cancel non-discardable readings as well.</param>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
public static void StopReading(bool alsoNonDiscardable)
Expand All @@ -137,9 +137,9 @@ public static void StopReading(bool alsoNonDiscardable)
}

/// <summary>
/// Suppress reading of screen-reader
/// Suppress reading of screen-reader.
/// </summary>
/// <param name="suppress">whether to suppress reading of screen-reader</param>
/// <param name="suppress">whether to suppress reading of screen-reader.</param>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
public static bool SuppressScreenReader(bool suppress)
Expand All @@ -150,7 +150,7 @@ public static bool SuppressScreenReader(bool suppress)
}

/// <summary>
/// Re-enables auto-initialization of AT-SPI bridge
/// Re-enables auto-initialization of AT-SPI bridge.
/// </summary>
/// <remarks>
/// Normal applications do not have to call this function. The AT-SPI bridge is initialized on demand.
Expand All @@ -163,7 +163,7 @@ public static void BridgeEnableAutoInit()
}

/// <summary>
/// Blocks auto-initialization of AT-SPI bridge
/// Blocks auto-initialization of AT-SPI bridge.
/// </summary>
/// <remarks>
/// Use this only if your application starts before DBus does, and call it early in Main().
Expand Down Expand Up @@ -204,6 +204,7 @@ public static void SetHighlightFrameView(View view)
/// <summary>
/// Get highligted View.
/// </summary>
/// <returns>The currently highlighted view.</returns>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
public static View GetCurrentlyHighlightedView()
Expand All @@ -218,6 +219,7 @@ public static View GetCurrentlyHighlightedView()
/// <summary>
/// Clear highlight.
/// </summary>
/// <returns>true if the highlight was cleared successfully, otherwise false.</returns>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
public static bool ClearCurrentlyHighlightedView()
Expand All @@ -243,30 +245,35 @@ public enum SayFinishedState
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
Invalid = -1,

/// <summary>
/// Cancelled
/// </summary>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
Cancelled = 1,

/// <summary>
/// Stopped
/// </summary>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
Stopped = 2,

/// <summary>
/// Skipped
/// </summary>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
Skipped = 3,

/// <summary>
/// Paused
/// </summary>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
Paused = 4,

/// <summary>
/// Resumed
/// </summary>
Expand Down
23 changes: 19 additions & 4 deletions src/Tizen.NUI/src/public/Animation/AlphaFunction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ namespace Tizen.NUI
/// Understanding an animation as a parametric function over time, the alpha function is applied to the parameter of
/// the animation before computing the final animation value.
/// </summary>
/// <example><code>
/// View view = new View()
/// {
/// Size2D = new Size2D(100, 100),
/// Position2D = new Position2D(100, 100),
/// BackgroundColor = Color.Red,
/// };
/// Window.Default.Add(view);
/// Animation animation = new Animation();
/// const float destinationValue = 300.0f;
/// const int startTime = 0; // animation starts at 0 second point. no delay.
/// const int endTime = 5000; // animation ends at 5 second point.
/// animation.AnimateTo(view, "PositionX", destinationValue, startTime, endTime, new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseIn));
/// animation.Play();
/// </code></example>
/// <since_tizen> 3 </since_tizen>
public class AlphaFunction : Disposable
{
Expand Down Expand Up @@ -85,24 +100,24 @@ internal AlphaFunction(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr,
// }

/// <summary>
/// This specifies the various types of BuiltinFunctions.
/// This specifies the various types of built-in alpha functions available for animations.
/// </summary>
/// <since_tizen> 3 </since_tizen>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1717:Only FlagsAttribute enums should have plural names")]
public enum BuiltinFunctions
{
/// <summary>
/// Linear.
/// Default alpha function. Linear alpha function.
/// </summary>
[Description("DEFAULT")]
Default,
/// <summary>
/// No transformation.
/// Linear alpha function. (No transformation)
/// </summary>
[Description("LINEAR")]
Linear,
/// <summary>
/// Reverse linear.
/// Reverse linear alpha function.
/// </summary>
[Description("REVERSE")]
Reverse,
Expand Down
40 changes: 39 additions & 1 deletion src/Tizen.NUI/src/public/Animation/Animatable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,46 @@ namespace Tizen.NUI
{

/// <summary>
/// Animatable.
/// The class that represents an object capable of animation is the parent class of the minimum unit of visual, View.
/// When a property is an animatable property, it means that its value can change continuously as the target of an animation.
/// In this case, if a property notification callback is set, you can receive the callback according to the changing values.
/// Additionally, users can also add their own properties.
/// </summary>
/// <example><code>
/// View view = new View()
/// {
/// Size2D = new Size2D(100, 100),
/// Position2D = new Position2D(100, 100),
/// BackgroundColor = Color.Red,
/// };
///
/// Window.Default.Add(view);
/// Animation animation = new Animation();
/// const float destinationValue = 300.0f;
/// const int startTime = 0; // animation starts at 0 second point. no delay.
/// const int endTime = 5000; // animation ends at 5 second point.
/// animation.AnimateTo(view, "PositionX", destinationValue, startTime, endTime, new AlphaFunction(AlphaFunction.BuiltinFunctions.EaseInSine));
/// animation.Play();
///
/// PropertyNotification propertyNotification = view.AddPropertyNotification("position", PropertyCondition.Step(10.0f));
/// propertyNotification.Notified += (object source, PropertyNotification.NotifyEventArgs args) =>
/// {
/// Animatable target = args.PropertyNotification.GetTarget();
/// if (target is View viewTarget)
/// {
/// Tizen.Log.Debug("NUI", $"postion changed! ({viewTarget.CurrentPosition.X},{viewTarget.CurrentPosition.Y})");
/// }
/// };
///
/// Animatable animatable = new Animatable();
/// int myPropertyIndex = animatable.RegisterProperty("myProperty", new PropertyValue(100), PropertyAccessMode.ReadWrite);
/// animatable.GetProperty(myPropertyIndex).Get(out int aValue);
/// Tizen.Log.Debug("NUI", $"myProperty value : {aValue} (should be 100)");
///
/// animatable.SetProperty(myPropertyIndex, new PropertyValue(200));
/// animatable.GetProperty(myPropertyIndex).Get(out aValue);
/// Tizen.Log.Debug("NUI", $"myProperty value : {aValue} (should be 200)");
/// </code></example>
/// <since_tizen> 3 </since_tizen>
public class Animatable : BaseHandle
{
Expand Down
Loading
Loading