diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml
index 05edec98fa0..1f71c11b340 100644
--- a/.github/workflows/build-pull-request.yml
+++ b/.github/workflows/build-pull-request.yml
@@ -55,7 +55,7 @@ jobs:
-- print --format=json --include-hidden \
-o Artifacts/api.json Artifacts/bin/public/
- - uses: actions/upload-artifact@v2
+ - uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: reports
@@ -72,7 +72,7 @@ jobs:
dotnet-version: 3.1.x
- name: Download Artifacts
- uses: actions/download-artifact@v2
+ uses: actions/download-artifact@v3
with:
name: reports
path: Artifacts
@@ -120,7 +120,7 @@ jobs:
base-file: Artifacts/base-api.json
output: Artifacts/api-comp.json
- - uses: actions/upload-artifact@v2
+ - uses: actions/upload-artifact@v3
with:
name: reports
path: Artifacts/api-comp.json
diff --git a/.github/workflows/deploy-documents-for-tizen-docs.yml b/.github/workflows/deploy-documents-for-tizen-docs.yml
index e2eb44f4dd8..67fe65a9cba 100644
--- a/.github/workflows/deploy-documents-for-tizen-docs.yml
+++ b/.github/workflows/deploy-documents-for-tizen-docs.yml
@@ -44,7 +44,7 @@ jobs:
cp .gitattributes _site/
tar cfz site.tar.gz _site/
- - uses: actions/upload-artifact@v2
+ - uses: actions/upload-artifact@v3
with:
name: documents
path: site.tar.gz
@@ -54,7 +54,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- - uses: actions/download-artifact@v2
+ - uses: actions/download-artifact@v3
with:
name: documents
diff --git a/.github/workflows/deploy-documents.yml b/.github/workflows/deploy-documents.yml
index 28bc31b06a5..017f9e0f6d2 100644
--- a/.github/workflows/deploy-documents.yml
+++ b/.github/workflows/deploy-documents.yml
@@ -37,7 +37,7 @@ jobs:
- name: Archive Artifacts
run: |
tar cfz site.tar.gz _site/
- - uses: actions/upload-artifact@v2
+ - uses: actions/upload-artifact@v3
with:
name: documents
path: site.tar.gz
@@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- - uses: actions/download-artifact@v2
+ - uses: actions/download-artifact@v3
with:
name: documents
diff --git a/packaging/csapi-tizenfx.spec b/packaging/csapi-tizenfx.spec
index 50501757209..903a755efdd 100644
--- a/packaging/csapi-tizenfx.spec
+++ b/packaging/csapi-tizenfx.spec
@@ -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
diff --git a/packaging/version.txt b/packaging/version.txt
index 5edbefa92a4..818836a7c24 100755
--- a/packaging/version.txt
+++ b/packaging/version.txt
@@ -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
diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.DragAndDrop.cs b/src/Tizen.NUI/src/internal/Interop/Interop.DragAndDrop.cs
index 1acf55699be..278ea1b2fed 100755
--- a/src/Tizen.NUI/src/internal/Interop/Interop.DragAndDrop.cs
+++ b/src/Tizen.NUI/src/internal/Interop/Interop.DragAndDrop.cs
@@ -33,11 +33,11 @@ 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)]
@@ -45,7 +45,7 @@ internal enum DragType
[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)]
@@ -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);
diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.Property.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Property.cs
index 697a0696ce6..9b7b4535594 100755
--- a/src/Tizen.NUI/src/internal/Interop/Interop.Property.cs
+++ b/src/Tizen.NUI/src/internal/Interop/Interop.Property.cs
@@ -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);
@@ -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();
diff --git a/src/Tizen.NUI/src/public/Accessibility/Accessibility.cs b/src/Tizen.NUI/src/public/Accessibility/Accessibility.cs
index d86a9d27262..2fe5a1e341b 100755
--- a/src/Tizen.NUI/src/public/Accessibility/Accessibility.cs
+++ b/src/Tizen.NUI/src/public/Accessibility/Accessibility.cs
@@ -25,11 +25,11 @@
namespace Tizen.NUI.Accessibility
{
///
- /// 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.
///
// 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
{
@@ -99,10 +99,10 @@ public static bool IsScreenReaderEnabled
#region Method
///
- /// Start to speak
+ /// Start to speak.
///
- /// Content to be spoken
- /// true to be stopped and discarded when other Say is triggered
+ /// Content to be spoken.
+ /// true to be stopped and discarded when other Say is triggered.
///
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
@@ -113,9 +113,9 @@ public static void Say(string sentence, bool discardable)
}
///
- /// To make Say be paused or resumed
+ /// To make Say be paused or resumed.
///
- /// true to be paused, false to be resumed
+ /// true to be paused, false to be resumed.
// 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)
@@ -125,9 +125,9 @@ public static void PauseResume(bool pause)
}
///
- /// Cancels anything screen-reader is reading / has queued to read
+ /// Cancels anything screen-reader is reading / has queued to read.
///
- /// whether to cancel non-discardable readings as well
+ /// whether to cancel non-discardable readings as well.
// 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)
@@ -137,9 +137,9 @@ public static void StopReading(bool alsoNonDiscardable)
}
///
- /// Suppress reading of screen-reader
+ /// Suppress reading of screen-reader.
///
- /// whether to suppress reading of screen-reader
+ /// whether to suppress reading of screen-reader.
// 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)
@@ -150,7 +150,7 @@ public static bool SuppressScreenReader(bool suppress)
}
///
- /// Re-enables auto-initialization of AT-SPI bridge
+ /// Re-enables auto-initialization of AT-SPI bridge.
///
///
/// Normal applications do not have to call this function. The AT-SPI bridge is initialized on demand.
@@ -163,7 +163,7 @@ public static void BridgeEnableAutoInit()
}
///
- /// Blocks auto-initialization of AT-SPI bridge
+ /// Blocks auto-initialization of AT-SPI bridge.
///
///
/// Use this only if your application starts before DBus does, and call it early in Main().
@@ -204,6 +204,7 @@ public static void SetHighlightFrameView(View view)
///
/// Get highligted View.
///
+ /// The currently highlighted view.
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
public static View GetCurrentlyHighlightedView()
@@ -218,6 +219,7 @@ public static View GetCurrentlyHighlightedView()
///
/// Clear highlight.
///
+ /// true if the highlight was cleared successfully, otherwise false.
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
public static bool ClearCurrentlyHighlightedView()
@@ -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,
+
///
/// Cancelled
///
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
Cancelled = 1,
+
///
/// Stopped
///
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
Stopped = 2,
+
///
/// Skipped
///
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
Skipped = 3,
+
///
/// Paused
///
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
Paused = 4,
+
///
/// Resumed
///
diff --git a/src/Tizen.NUI/src/public/Animation/AlphaFunction.cs b/src/Tizen.NUI/src/public/Animation/AlphaFunction.cs
index a37e21692f7..227f105d7c1 100755
--- a/src/Tizen.NUI/src/public/Animation/AlphaFunction.cs
+++ b/src/Tizen.NUI/src/public/Animation/AlphaFunction.cs
@@ -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.
///
+ ///
+ /// 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();
+ ///
/// 3
public class AlphaFunction : Disposable
{
@@ -85,24 +100,24 @@ internal AlphaFunction(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr,
// }
///
- /// This specifies the various types of BuiltinFunctions.
+ /// This specifies the various types of built-in alpha functions available for animations.
///
/// 3
[System.Diagnostics.CodeAnalysis.SuppressMessage("Naming", "CA1717:Only FlagsAttribute enums should have plural names")]
public enum BuiltinFunctions
{
///
- /// Linear.
+ /// Default alpha function. Linear alpha function.
///
[Description("DEFAULT")]
Default,
///
- /// No transformation.
+ /// Linear alpha function. (No transformation)
///
[Description("LINEAR")]
Linear,
///
- /// Reverse linear.
+ /// Reverse linear alpha function.
///
[Description("REVERSE")]
Reverse,
diff --git a/src/Tizen.NUI/src/public/Animation/Animatable.cs b/src/Tizen.NUI/src/public/Animation/Animatable.cs
index 31441e057e0..fc2a77cce48 100755
--- a/src/Tizen.NUI/src/public/Animation/Animatable.cs
+++ b/src/Tizen.NUI/src/public/Animation/Animatable.cs
@@ -21,8 +21,46 @@ namespace Tizen.NUI
{
///
- /// 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.
///
+ ///
+ /// 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)");
+ ///
/// 3
public class Animatable : BaseHandle
{
diff --git a/src/Tizen.NUI/src/public/Animation/Animation.cs b/src/Tizen.NUI/src/public/Animation/Animation.cs
index b8e4d321c9d..308560b121e 100755
--- a/src/Tizen.NUI/src/public/Animation/Animation.cs
+++ b/src/Tizen.NUI/src/public/Animation/Animation.cs
@@ -35,6 +35,23 @@ namespace Tizen.NUI
/// The overall animation time is superseded by the values given in the animation time used when calling the AnimateTo(), AnimateBy(), AnimateBetween() and AnimatePath() methods.
/// If any of the individual calls to those functions exceeds the overall animation time (Duration), then the overall animation time is automatically extended.
///
+ ///
+ /// 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); // position x animation.
+ /// animation.AnimateTo(view, "SizeHeight", destinationValue + 100, startTime + 1000, endTime + 2000); // size height animation.
+ /// animation.Play();
+ ///
/// 3
public class Animation : BaseHandle
{
@@ -1252,6 +1269,10 @@ public Animation() : this(Interop.Animation.New(0.0f), true)
///
/// Plays the animation.
///
+ ///
+ /// var animation = new Animation();
+ /// animation.Play();
+ ///
/// 3
public void Play()
{
@@ -1291,6 +1312,11 @@ public void PlayAfter(int delayMilliseconds)
///
/// Pauses the animation.
///
+ ///
+ /// var animation = new Animation();
+ /// animation.Play();
+ /// animation.Pause();
+ ///
/// 3
public void Pause()
{
@@ -1301,6 +1327,11 @@ public void Pause()
///
/// Stops the animation.
///
+ ///
+ /// var animation = new Animation();
+ /// animation.Play();
+ /// animation.Stop();
+ ///
/// 3
public void Stop()
{
diff --git a/src/Tizen.NUI/src/public/Animation/KeyFrames.cs b/src/Tizen.NUI/src/public/Animation/KeyFrames.cs
index 818e1913ca4..1fd29ec8003 100755
--- a/src/Tizen.NUI/src/public/Animation/KeyFrames.cs
+++ b/src/Tizen.NUI/src/public/Animation/KeyFrames.cs
@@ -23,6 +23,24 @@ namespace Tizen.NUI
/// A set of key frames for a property that can be animated using DALi animation.
/// This allows the generation of key frame objects from individual Property::Values.
///
+ ///
+ /// 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(5000); // 5s duration.
+ /// KeyFrames keyFrames = new KeyFrames();
+ /// keyFrames.Add(0.0f, new Rotation(new Radian(new Degree(-32.0f)), Vector3.ZAxis));
+ /// keyFrames.Add(0.3f, new Rotation(new Radian(new Degree(133.0f)), Vector3.ZAxis));
+ /// keyFrames.Add(0.75f, new Rotation(new Radian(new Degree(-12.0f)), Vector3.ZAxis));
+ /// keyFrames.Add(1.0f, new Rotation(new Radian(new Degree(135.0f)), Vector3.ZAxis));
+ /// animation.AnimateBetween(view, "Orientation", keyFrames);
+ /// animation.Play();
+ ///
/// 3
public class KeyFrames : BaseHandle
{
@@ -108,6 +126,7 @@ public void Add(float progress, PropertyValue value, AlphaFunction alpha)
///
/// Get the number of added key frame.
///
+ /// The number of key frames currently added to the KeyFrames object.
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
public uint GetKeyFrameCount()
diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs
index 702230eec7c..b54f67d9668 100755
--- a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs
+++ b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs
@@ -570,7 +570,14 @@ public void SetFontStyle(FontStyle fontStyle)
{
using (var fontStyleMap = TextMapHelper.GetFontStyleMap(fontStyle))
{
- SetValue(FontStyleProperty, fontStyleMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(FontStyleProperty, fontStyleMap);
+ }
+ else
+ {
+ SetInternalFontStyleProperty(this, null, fontStyleMap);
+ }
}
}
@@ -585,7 +592,7 @@ public void SetFontStyle(FontStyle fontStyle)
public FontStyle GetFontStyle()
{
FontStyle fontStyle;
- using (var fontStyleMap = (PropertyMap)GetValue(FontStyleProperty))
+ using (var fontStyleMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(FontStyleProperty) : (PropertyMap)GetInternalFontStyleProperty(this))
{
fontStyle = TextMapHelper.GetFontStyleStruct(fontStyleMap);
}
@@ -1147,7 +1154,14 @@ public void SetSelectionHandleImage(SelectionHandleImage selectionHandleImage)
{
using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandleImage.LeftImageUrl))
{
- SetValue(SelectionHandleImageLeftProperty, leftImageMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(SelectionHandleImageLeftProperty, leftImageMap);
+ }
+ else
+ {
+ SetInternalSelectionHandleImageLeftProperty(this, null, leftImageMap);
+ }
}
}
@@ -1155,7 +1169,14 @@ public void SetSelectionHandleImage(SelectionHandleImage selectionHandleImage)
{
using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandleImage.RightImageUrl))
{
- SetValue(SelectionHandleImageRightProperty, rightImageMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(SelectionHandleImageRightProperty, rightImageMap);
+ }
+ else
+ {
+ SetInternalSelectionHandleImageRightProperty(this, null, rightImageMap);
+ }
}
}
}
@@ -1171,8 +1192,8 @@ public void SetSelectionHandleImage(SelectionHandleImage selectionHandleImage)
public SelectionHandleImage GetSelectionHandleImage()
{
SelectionHandleImage selectionHandleImage;
- using (var leftImageMap = (PropertyMap)GetValue(SelectionHandleImageLeftProperty))
- using (var rightImageMap = (PropertyMap)GetValue(SelectionHandleImageRightProperty))
+ using (var leftImageMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(SelectionHandleImageLeftProperty) : (PropertyMap)GetInternalSelectionHandleImageLeftProperty(this))
+ using (var rightImageMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(SelectionHandleImageRightProperty) : (PropertyMap)GetInternalSelectionHandleImageRightProperty(this))
{
selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
}
@@ -1274,7 +1295,14 @@ public void SetSelectionHandlePressedImage(SelectionHandleImage selectionHandleP
{
using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandlePressedImage.LeftImageUrl))
{
- SetValue(SelectionHandlePressedImageLeftProperty, leftImageMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(SelectionHandlePressedImageLeftProperty, leftImageMap);
+ }
+ else
+ {
+ SetInternalSelectionHandlePressedImageLeftProperty(this, null, leftImageMap);
+ }
}
}
@@ -1282,7 +1310,14 @@ public void SetSelectionHandlePressedImage(SelectionHandleImage selectionHandleP
{
using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandlePressedImage.RightImageUrl))
{
- SetValue(SelectionHandlePressedImageRightProperty, rightImageMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(SelectionHandlePressedImageRightProperty, rightImageMap);
+ }
+ else
+ {
+ SetInternalSelectionHandlePressedImageRightProperty(this, null, rightImageMap);
+ }
}
}
}
@@ -1298,8 +1333,8 @@ public void SetSelectionHandlePressedImage(SelectionHandleImage selectionHandleP
public SelectionHandleImage GetSelectionHandlePressedImage()
{
SelectionHandleImage selectionHandleImage;
- using (var leftImageMap = (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty))
- using (var rightImageMap = (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty))
+ using (var leftImageMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty) : (PropertyMap)GetInternalSelectionHandlePressedImageLeftProperty(this))
+ using (var rightImageMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty) : (PropertyMap)GetInternalSelectionHandlePressedImageRightProperty(this))
{
selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
}
@@ -1401,7 +1436,14 @@ public void SetSelectionHandleMarkerImage(SelectionHandleImage selectionHandleMa
{
using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.LeftImageUrl))
{
- SetValue(SelectionHandleMarkerImageLeftProperty, leftImageMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(SelectionHandleMarkerImageLeftProperty, leftImageMap);
+ }
+ else
+ {
+ SetInternalSelectionHandleMarkerImageLeftProperty(this, null, leftImageMap);
+ }
}
}
@@ -1409,7 +1451,14 @@ public void SetSelectionHandleMarkerImage(SelectionHandleImage selectionHandleMa
{
using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.RightImageUrl))
{
- SetValue(SelectionHandleMarkerImageRightProperty, rightImageMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(SelectionHandleMarkerImageRightProperty, rightImageMap);
+ }
+ else
+ {
+ SetInternalSelectionHandleMarkerImageRightProperty(this, null, rightImageMap);
+ }
}
}
}
@@ -1425,8 +1474,8 @@ public void SetSelectionHandleMarkerImage(SelectionHandleImage selectionHandleMa
public SelectionHandleImage GetSelectionHandleMarkerImage()
{
SelectionHandleImage selectionHandleImage;
- using (var leftImageMap = (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty))
- using (var rightImageMap = (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty))
+ using (var leftImageMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty) : (PropertyMap)GetInternalSelectionHandleMarkerImageLeftProperty(this))
+ using (var rightImageMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty) : (PropertyMap)GetInternalSelectionHandleMarkerImageRightProperty(this))
{
selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
}
@@ -1669,7 +1718,14 @@ public void SetInputFontStyle(FontStyle fontStyle)
{
using (var fontStyleMap = TextMapHelper.GetFontStyleMap(fontStyle))
{
- SetValue(InputFontStyleProperty, fontStyleMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(InputFontStyleProperty, fontStyleMap);
+ }
+ else
+ {
+ SetInternalInputFontStyleProperty(this, null, fontStyleMap);
+ }
}
}
@@ -1881,7 +1937,14 @@ public void SetUnderline(Underline underline)
{
using (var underlineMap = TextMapHelper.GetUnderlineMap(underline))
{
- SetValue(UnderlineProperty, underlineMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(UnderlineProperty, underlineMap);
+ }
+ else
+ {
+ SetInternalUnderlineProperty(this, null, underlineMap);
+ }
}
}
@@ -1896,7 +1959,7 @@ public void SetUnderline(Underline underline)
public Underline GetUnderline()
{
Underline underline;
- using (var underlineMap = (PropertyMap)GetValue(UnderlineProperty))
+ using (var underlineMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(UnderlineProperty) : (PropertyMap)GetInternalUnderlineProperty(this))
{
underline = TextMapHelper.GetUnderlineStruct(underlineMap);
}
@@ -1995,7 +2058,14 @@ public void SetShadow(Tizen.NUI.Text.Shadow shadow)
{
using (var shadowMap = TextMapHelper.GetShadowMap(shadow))
{
- SetValue(ShadowProperty, shadowMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(ShadowProperty, shadowMap);
+ }
+ else
+ {
+ SetInternalShadowProperty(this, null, shadowMap);
+ }
}
}
@@ -2010,7 +2080,7 @@ public void SetShadow(Tizen.NUI.Text.Shadow shadow)
public Tizen.NUI.Text.Shadow GetShadow()
{
Tizen.NUI.Text.Shadow shadow;
- using (var shadowMap = (PropertyMap)GetValue(ShadowProperty))
+ using (var shadowMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(ShadowProperty) : (PropertyMap)GetInternalShadowProperty(this))
{
shadow = TextMapHelper.GetShadowStruct(shadowMap);
}
@@ -2172,7 +2242,14 @@ public void SetOutline(Outline outline)
{
using (var outlineMap = TextMapHelper.GetOutlineMap(outline))
{
- SetValue(OutlineProperty, outlineMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(OutlineProperty, outlineMap);
+ }
+ else
+ {
+ SetInternalOutlineProperty(this, null, outlineMap);
+ }
}
}
@@ -2187,7 +2264,7 @@ public void SetOutline(Outline outline)
public Outline GetOutline()
{
Outline outline;
- using (var outlineMap = (PropertyMap)GetValue(OutlineProperty))
+ using (var outlineMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(OutlineProperty) : (PropertyMap)GetInternalOutlineProperty(this))
{
outline = TextMapHelper.GetOutlineStruct(outlineMap);
}
@@ -3073,7 +3150,14 @@ public void SetPlaceholder(Placeholder placeholder)
{
using (var placeholderMap = TextMapHelper.GetPlaceholderMap(placeholder))
{
- SetValue(PlaceholderProperty, placeholderMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(PlaceholderProperty, placeholderMap);
+ }
+ else
+ {
+ SetInternalPlaceholderProperty(this, null, placeholderMap);
+ }
}
}
@@ -3088,7 +3172,7 @@ public void SetPlaceholder(Placeholder placeholder)
public Placeholder GetPlaceholder()
{
Placeholder placeholder;
- using (var placeholderMap = (PropertyMap)GetValue(PlaceholderProperty))
+ using (var placeholderMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(PlaceholderProperty) : (PropertyMap)GetInternalPlaceholderProperty(this))
{
placeholder = TextMapHelper.GetPlaceholderStruct(placeholderMap);
}
diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs
index 75865f343cf..364d59ab829 100755
--- a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs
+++ b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs
@@ -256,6 +256,12 @@ static TextField()
CharacterSpacingProperty = BindableProperty.Create(nameof(CharacterSpacing), typeof(float), typeof(TextField), default(float),
propertyChanged: SetInternalCharacterSpacingProperty, defaultValueCreator: GetInternalCharacterSpacingProperty);
+
+ RemoveFrontInsetProperty = BindableProperty.Create(nameof(RemoveFrontInset), typeof(bool), typeof(TextField), false,
+ propertyChanged: SetInternalRemoveFrontInsetProperty, defaultValueCreator: GetInternalRemoveFrontInsetProperty);
+
+ RemoveBackInsetProperty = BindableProperty.Create(nameof(RemoveBackInset), typeof(bool), typeof(TextField), false,
+ propertyChanged: SetInternalRemoveBackInsetProperty, defaultValueCreator: GetInternalRemoveBackInsetProperty);
}
}
@@ -715,7 +721,14 @@ public void SetFontStyle(FontStyle fontStyle)
{
using (var fontStyleMap = TextMapHelper.GetFontStyleMap(fontStyle))
{
- SetValue(FontStyleProperty, fontStyleMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(FontStyleProperty, fontStyleMap);
+ }
+ else
+ {
+ SetInternalFontStyleProperty(this, null, fontStyleMap);
+ }
}
}
@@ -730,7 +743,7 @@ public void SetFontStyle(FontStyle fontStyle)
public FontStyle GetFontStyle()
{
FontStyle fontStyle;
- using (var fontStyleMap = (PropertyMap)GetValue(FontStyleProperty))
+ using (var fontStyleMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(FontStyleProperty) : (PropertyMap)GetInternalFontStyleProperty(this))
{
fontStyle = TextMapHelper.GetFontStyleStruct(fontStyleMap);
}
@@ -895,7 +908,6 @@ public VerticalAlignment VerticalAlignment
SetInternalVerticalAlignmentProperty(this, null, value);
}
NotifyPropertyChanged();
- NotifyPropertyChanged();
}
}
@@ -1031,7 +1043,14 @@ private Vector2 InternalShadowOffset
map.Add("offset", value);
var shadowMap = Shadow;
shadowMap.Merge(map);
- SetValue(ShadowProperty, shadowMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(ShadowProperty, shadowMap);
+ }
+ else
+ {
+ SetInternalShadowProperty(this, null, shadowMap);
+ }
NotifyPropertyChanged();
}
}
@@ -1098,7 +1117,14 @@ private Vector4 InternalShadowColor
map.Add("color", value);
var shadowMap = Shadow;
shadowMap.Merge(map);
- SetValue(ShadowProperty, shadowMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(ShadowProperty, shadowMap);
+ }
+ else
+ {
+ SetInternalShadowProperty(this, null, shadowMap);
+ }
NotifyPropertyChanged();
}
}
@@ -1560,7 +1586,14 @@ public void SetSelectionHandleImage(SelectionHandleImage selectionHandleImage)
{
using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandleImage.LeftImageUrl))
{
- SetValue(SelectionHandleImageLeftProperty, leftImageMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(SelectionHandleImageLeftProperty, leftImageMap);
+ }
+ else
+ {
+ SetInternalSelectionHandleImageLeftProperty(this, null, leftImageMap);
+ }
}
}
@@ -1568,7 +1601,14 @@ public void SetSelectionHandleImage(SelectionHandleImage selectionHandleImage)
{
using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandleImage.RightImageUrl))
{
- SetValue(SelectionHandleImageRightProperty, rightImageMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(SelectionHandleImageRightProperty, rightImageMap);
+ }
+ else
+ {
+ SetInternalSelectionHandleImageRightProperty(this, null, rightImageMap);
+ }
}
}
}
@@ -1584,8 +1624,8 @@ public void SetSelectionHandleImage(SelectionHandleImage selectionHandleImage)
public SelectionHandleImage GetSelectionHandleImage()
{
SelectionHandleImage selectionHandleImage;
- using (var leftImageMap = (PropertyMap)GetValue(SelectionHandleImageLeftProperty))
- using (var rightImageMap = (PropertyMap)GetValue(SelectionHandleImageRightProperty))
+ using (var leftImageMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(SelectionHandleImageLeftProperty) : (PropertyMap)GetInternalSelectionHandleImageLeftProperty(this))
+ using (var rightImageMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(SelectionHandleImageRightProperty) : (PropertyMap)GetInternalSelectionHandleImageRightProperty(this))
{
selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
}
@@ -1687,7 +1727,14 @@ public void SetSelectionHandlePressedImage(SelectionHandleImage selectionHandleP
{
using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandlePressedImage.LeftImageUrl))
{
- SetValue(SelectionHandlePressedImageLeftProperty, leftImageMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(SelectionHandlePressedImageLeftProperty, leftImageMap);
+ }
+ else
+ {
+ SetInternalSelectionHandlePressedImageLeftProperty(this, null, leftImageMap);
+ }
}
}
@@ -1695,7 +1742,14 @@ public void SetSelectionHandlePressedImage(SelectionHandleImage selectionHandleP
{
using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandlePressedImage.RightImageUrl))
{
- SetValue(SelectionHandlePressedImageRightProperty, rightImageMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(SelectionHandlePressedImageRightProperty, rightImageMap);
+ }
+ else
+ {
+ SetInternalSelectionHandlePressedImageRightProperty(this, null, rightImageMap);
+ }
}
}
}
@@ -1711,8 +1765,8 @@ public void SetSelectionHandlePressedImage(SelectionHandleImage selectionHandleP
public SelectionHandleImage GetSelectionHandlePressedImage()
{
SelectionHandleImage selectionHandleImage;
- using (var leftImageMap = (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty))
- using (var rightImageMap = (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty))
+ using (var leftImageMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(SelectionHandlePressedImageLeftProperty) : (PropertyMap)GetInternalSelectionHandlePressedImageLeftProperty(this))
+ using (var rightImageMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(SelectionHandlePressedImageRightProperty) : (PropertyMap)GetInternalSelectionHandlePressedImageRightProperty(this))
{
selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
}
@@ -1814,7 +1868,14 @@ public void SetSelectionHandleMarkerImage(SelectionHandleImage selectionHandleMa
{
using (var leftImageMap = TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.LeftImageUrl))
{
- SetValue(SelectionHandleMarkerImageLeftProperty, leftImageMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(SelectionHandleMarkerImageLeftProperty, leftImageMap);
+ }
+ else
+ {
+ SetInternalSelectionHandleMarkerImageLeftProperty(this, null, leftImageMap);
+ }
}
}
@@ -1822,7 +1883,14 @@ public void SetSelectionHandleMarkerImage(SelectionHandleImage selectionHandleMa
{
using (var rightImageMap = TextMapHelper.GetFileNameMap(selectionHandleMarkerImage.RightImageUrl))
{
- SetValue(SelectionHandleMarkerImageRightProperty, rightImageMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(SelectionHandleMarkerImageRightProperty, rightImageMap);
+ }
+ else
+ {
+ SetInternalSelectionHandleMarkerImageRightProperty(this, null, rightImageMap);
+ }
}
}
}
@@ -1838,8 +1906,8 @@ public void SetSelectionHandleMarkerImage(SelectionHandleImage selectionHandleMa
public SelectionHandleImage GetSelectionHandleMarkerImage()
{
SelectionHandleImage selectionHandleImage;
- using (var leftImageMap = (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty))
- using (var rightImageMap = (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty))
+ using (var leftImageMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(SelectionHandleMarkerImageLeftProperty) : (PropertyMap)GetInternalSelectionHandleMarkerImageLeftProperty(this))
+ using (var rightImageMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(SelectionHandleMarkerImageRightProperty) : (PropertyMap)GetInternalSelectionHandleMarkerImageRightProperty(this))
{
selectionHandleImage = TextMapHelper.GetSelectionHandleImageStruct(leftImageMap, rightImageMap);
}
@@ -2128,9 +2196,16 @@ public void SetInputFontStyle(FontStyle fontStyle)
{
using (var fontStyleMap = TextMapHelper.GetFontStyleMap(fontStyle))
{
- SetValue(InputFontStyleProperty, fontStyleMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(InputFontStyleProperty, fontStyleMap);
+ }
+ else
+ {
+ SetInternalInputFontStyleProperty(this, null, fontStyleMap);
+ }
}
- }
+ }
///
/// Get InputFontStyle from TextField.
@@ -2143,7 +2218,7 @@ public void SetInputFontStyle(FontStyle fontStyle)
public FontStyle GetInputFontStyle()
{
FontStyle fontStyle;
- using (var fontStyleMap = (PropertyMap)GetValue(InputFontStyleProperty))
+ using (var fontStyleMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(InputFontStyleProperty) : (PropertyMap)GetInternalInputFontStyleProperty(this))
{
fontStyle = TextMapHelper.GetFontStyleStruct(fontStyleMap);
}
@@ -2244,7 +2319,14 @@ public void SetUnderline(Underline underline)
{
using (var underlineMap = TextMapHelper.GetUnderlineMap(underline))
{
- SetValue(UnderlineProperty, underlineMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(UnderlineProperty, underlineMap);
+ }
+ else
+ {
+ SetInternalUnderlineProperty(this, null, underlineMap);
+ }
}
}
@@ -2259,7 +2341,7 @@ public void SetUnderline(Underline underline)
public Underline GetUnderline()
{
Underline underline;
- using (var underlineMap = (PropertyMap)GetValue(UnderlineProperty))
+ using (var underlineMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(UnderlineProperty) : (PropertyMap)GetInternalUnderlineProperty(this))
{
underline = TextMapHelper.GetUnderlineStruct(underlineMap);
}
@@ -2320,7 +2402,7 @@ public PropertyMap Shadow
}
else
{
- return (PropertyMap)GetInternalShadowColorProperty(this);
+ return (PropertyMap)GetInternalShadowProperty(this);
}
}
set
@@ -2358,7 +2440,14 @@ public void SetShadow(Tizen.NUI.Text.Shadow shadow)
{
using (var shadowMap = TextMapHelper.GetShadowMap(shadow))
{
- SetValue(ShadowProperty, shadowMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(ShadowProperty, shadowMap);
+ }
+ else
+ {
+ SetInternalShadowProperty(this, null, shadowMap);
+ }
}
}
@@ -2373,7 +2462,7 @@ public void SetShadow(Tizen.NUI.Text.Shadow shadow)
public Tizen.NUI.Text.Shadow GetShadow()
{
Tizen.NUI.Text.Shadow shadow;
- using (var shadowMap = (PropertyMap)GetValue(ShadowProperty))
+ using (var shadowMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(ShadowProperty) : (PropertyMap)GetInternalShadowProperty(this))
{
shadow = TextMapHelper.GetShadowStruct(shadowMap);
}
@@ -2535,7 +2624,14 @@ public void SetOutline(Outline outline)
{
using (var outlineMap = TextMapHelper.GetOutlineMap(outline))
{
- SetValue(OutlineProperty, outlineMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(OutlineProperty, outlineMap);
+ }
+ else
+ {
+ SetInternalOutlineProperty(this, null, outlineMap);
+ }
}
}
@@ -2550,7 +2646,7 @@ public void SetOutline(Outline outline)
public Outline GetOutline()
{
Outline outline;
- using (var outlineMap = (PropertyMap)GetValue(OutlineProperty))
+ using (var outlineMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(OutlineProperty) : (PropertyMap)GetInternalOutlineProperty(this))
{
outline = TextMapHelper.GetOutlineStruct(outlineMap);
}
@@ -2664,8 +2760,16 @@ public void SetHiddenInput(HiddenInput hiddenInput)
{
using (var hiddenInputMap = TextMapHelper.GetHiddenInputMap(hiddenInput))
{
- SetValue(HiddenInputSettingsProperty, hiddenInputMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(HiddenInputSettingsProperty, hiddenInputMap);
+ }
+ else
+ {
+ SetInternalHiddenInputSettingsProperty(this, null, hiddenInputMap);
+ }
}
+
}
///
@@ -2679,7 +2783,7 @@ public void SetHiddenInput(HiddenInput hiddenInput)
public HiddenInput GetHiddenInput()
{
HiddenInput hiddenInput;
- using (var hiddenInputMap = (PropertyMap)GetValue(HiddenInputSettingsProperty))
+ using (var hiddenInputMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(HiddenInputSettingsProperty) : (PropertyMap)GetInternalHiddenInputSettingsProperty(this))
{
hiddenInput = TextMapHelper.GetHiddenInputStruct(hiddenInputMap);
}
@@ -3322,7 +3426,14 @@ public void SetPlaceholder(Placeholder placeholder)
{
using (var placeholderMap = TextMapHelper.GetPlaceholderMap(placeholder))
{
- SetValue(PlaceholderProperty, placeholderMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(PlaceholderProperty, placeholderMap);
+ }
+ else
+ {
+ SetInternalPlaceholderProperty(this, null, placeholderMap);
+ }
}
}
@@ -3337,7 +3448,7 @@ public void SetPlaceholder(Placeholder placeholder)
public Placeholder GetPlaceholder()
{
Placeholder placeholder;
- using (var placeholderMap = (PropertyMap)GetValue(PlaceholderProperty))
+ using (var placeholderMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(PlaceholderProperty) : (PropertyMap)GetInternalPlaceholderProperty(this))
{
placeholder = TextMapHelper.GetPlaceholderStruct(placeholderMap);
}
@@ -3629,11 +3740,25 @@ public bool RemoveFrontInset
{
get
{
- return (bool)GetValue(RemoveFrontInsetProperty);
+ if (NUIApplication.IsUsingXaml)
+ {
+ return (bool)GetValue(RemoveFrontInsetProperty);
+ }
+ else
+ {
+ return (bool)GetInternalRemoveFrontInsetProperty(this);
+ }
}
set
{
- SetValue(RemoveFrontInsetProperty, value);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(RemoveFrontInsetProperty, value);
+ }
+ else
+ {
+ SetInternalRemoveFrontInsetProperty(this, null, value);
+ }
NotifyPropertyChanged();
}
}
@@ -3650,11 +3775,25 @@ public bool RemoveBackInset
{
get
{
- return (bool)GetValue(RemoveBackInsetProperty);
+ if (NUIApplication.IsUsingXaml)
+ {
+ return (bool)GetValue(RemoveBackInsetProperty);
+ }
+ else
+ {
+ return (bool)GetInternalRemoveBackInsetProperty(this);
+ }
}
set
{
- SetValue(RemoveBackInsetProperty, value);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(RemoveBackInsetProperty, value);
+ }
+ else
+ {
+ SetInternalRemoveBackInsetProperty(this, null, value);
+ }
NotifyPropertyChanged();
}
}
diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextFieldBindableProperty.cs b/src/Tizen.NUI/src/public/BaseComponents/TextFieldBindableProperty.cs
index 492fb958e6e..2fab5e69c3c 100755
--- a/src/Tizen.NUI/src/public/BaseComponents/TextFieldBindableProperty.cs
+++ b/src/Tizen.NUI/src/public/BaseComponents/TextFieldBindableProperty.cs
@@ -1318,36 +1318,40 @@ internal static object GetInternalCharacterSpacingProperty(BindableObject bindab
/// RemoveFrontInsetProperty
///
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty RemoveFrontInsetProperty = BindableProperty.Create(nameof(RemoveFrontInset), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ public static readonly BindableProperty RemoveFrontInsetProperty = null;
+ internal static void SetInternalRemoveFrontInsetProperty(BindableObject bindable, object oldValue, object newValue)
{
var textField = (TextField)bindable;
if (newValue != null)
{
- Object.InternalSetPropertyBool(textField.SwigCPtr, TextField.Property.RemoveFrontInset, (bool)newValue);
+ Object.InternalSetPropertyBool(textField.SwigCPtr, TextField.Property.RemoveFrontInset, (bool)newValue);
}
- }),
- defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ }
+ internal static object GetInternalRemoveFrontInsetProperty(BindableObject bindable)
{
var textField = (TextField)bindable;
+
return Object.InternalGetPropertyBool(textField.SwigCPtr, TextField.Property.RemoveFrontInset);
- }));
+ }
///
/// RemoveBackInsetProperty
///
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty RemoveBackInsetProperty = BindableProperty.Create(nameof(RemoveBackInset), typeof(bool), typeof(TextLabel), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ public static readonly BindableProperty RemoveBackInsetProperty = null;
+ internal static void SetInternalRemoveBackInsetProperty(BindableObject bindable, object oldValue, object newValue)
{
var textField = (TextField)bindable;
if (newValue != null)
{
Object.InternalSetPropertyBool(textField.SwigCPtr, TextField.Property.RemoveBackInset, (bool)newValue);
}
- }),
- defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ }
+ internal static object GetInternalRemoveBackInsetProperty(BindableObject bindable)
{
var textField = (TextField)bindable;
+
return Object.InternalGetPropertyBool(textField.SwigCPtr, TextField.Property.RemoveBackInset);
- }));
+ }
}
}
diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs
index ceb07bdaca4..186470e773c 100755
--- a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs
+++ b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs
@@ -641,7 +641,14 @@ public void SetFontStyle(FontStyle fontStyle)
{
using (var fontStyleMap = TextMapHelper.GetFontStyleMap(fontStyle))
{
- SetValue(FontStyleProperty, fontStyleMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(FontStyleProperty, fontStyleMap);
+ }
+ else
+ {
+ SetInternalFontStyleProperty(this, null, fontStyleMap);
+ }
}
}
@@ -656,7 +663,7 @@ public void SetFontStyle(FontStyle fontStyle)
public FontStyle GetFontStyle()
{
FontStyle fontStyle;
- using (var fontStyleMap = (PropertyMap)GetValue(FontStyleProperty))
+ using (var fontStyleMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(FontStyleProperty) : (PropertyMap)GetInternalFontStyleProperty(this))
{
fontStyle = TextMapHelper.GetFontStyleStruct(fontStyleMap);
}
@@ -889,11 +896,16 @@ private Vector2 InternalShadowOffset
using (var map = new PropertyMap())
{
map.Add("offset", value);
-
var shadowMap = Shadow;
shadowMap.Merge(map);
-
- SetValue(ShadowProperty, shadowMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(ShadowProperty, shadowMap);
+ }
+ else
+ {
+ SetInternalShadowProperty(this, null, shadowMap);
+ }
NotifyPropertyChanged();
}
}
@@ -961,7 +973,14 @@ private Vector4 InternalShadowColor
map.Add("color", value);
var shadowMap = Shadow;
shadowMap.Merge(map);
- SetValue(ShadowProperty, shadowMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(ShadowProperty, shadowMap);
+ }
+ else
+ {
+ SetInternalShadowProperty(this, null, shadowMap);
+ }
NotifyPropertyChanged();
}
}
@@ -1021,9 +1040,16 @@ private bool InternalUnderlineEnabled
using (var map = new PropertyMap())
{
map.Add("enable", value);
- var undelineMap = Underline;
- undelineMap.Merge(map);
- SetValue(UnderlineProperty, undelineMap);
+ var underlineMap = Underline;
+ underlineMap.Merge(map);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(UnderlineProperty, underlineMap);
+ }
+ else
+ {
+ SetInternalUnderlineProperty(this, null, underlineMap);
+ }
NotifyPropertyChanged();
}
}
@@ -1089,9 +1115,16 @@ private Vector4 InternalUnderlineColor
using (var map = new PropertyMap())
{
map.Add("color", value);
- var undelineMap = Underline;
- undelineMap.Merge(map);
- SetValue(UnderlineProperty, undelineMap);
+ var underlineMap = Underline;
+ underlineMap.Merge(map);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(UnderlineProperty, underlineMap);
+ }
+ else
+ {
+ SetInternalUnderlineProperty(this, null, underlineMap);
+ }
NotifyPropertyChanged();
}
}
@@ -1151,9 +1184,17 @@ private float InternalUnderlineHeight
using (var map = new PropertyMap())
{
map.Add("height", value);
- var undelineMap = Underline;
- undelineMap.Merge(map);
- SetValue(UnderlineProperty, undelineMap);
+ var underlineMap = Underline;
+ underlineMap.Merge(map);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(UnderlineProperty, underlineMap);
+ }
+ else
+ {
+ SetInternalUnderlineProperty(this, null, underlineMap);
+ }
+
NotifyPropertyChanged();
}
}
@@ -1444,7 +1485,14 @@ public void SetUnderline(Underline underline)
{
using (var underlineMap = TextMapHelper.GetUnderlineMap(underline))
{
- SetValue(UnderlineProperty, underlineMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(UnderlineProperty, underlineMap);
+ }
+ else
+ {
+ SetInternalUnderlineProperty(this, null, underlineMap);
+ }
}
}
@@ -1459,7 +1507,7 @@ public void SetUnderline(Underline underline)
public Underline GetUnderline()
{
Underline underline;
- using (var underlineMap = (PropertyMap)GetValue(UnderlineProperty))
+ using (var underlineMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(UnderlineProperty) : (PropertyMap)GetInternalUnderlineProperty(this))
{
underline = TextMapHelper.GetUnderlineStruct(underlineMap);
}
@@ -1527,7 +1575,14 @@ public void SetShadow(Tizen.NUI.Text.Shadow shadow)
{
using (var shadowMap = TextMapHelper.GetShadowMap(shadow))
{
- SetValue(ShadowProperty, shadowMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(ShadowProperty, shadowMap);
+ }
+ else
+ {
+ SetInternalShadowProperty(this, null, shadowMap);
+ }
}
}
@@ -1542,7 +1597,7 @@ public void SetShadow(Tizen.NUI.Text.Shadow shadow)
public Tizen.NUI.Text.Shadow GetShadow()
{
Tizen.NUI.Text.Shadow shadow;
- using (var shadowMap = (PropertyMap)GetValue(ShadowProperty))
+ using (var shadowMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(ShadowProperty) : (PropertyMap)GetInternalShadowProperty(this))
{
shadow = TextMapHelper.GetShadowStruct(shadowMap);
}
@@ -1672,7 +1727,14 @@ public void SetOutline(Outline outline)
{
using (var outlineMap = TextMapHelper.GetOutlineMap(outline))
{
- SetValue(OutlineProperty, outlineMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(OutlineProperty, outlineMap);
+ }
+ else
+ {
+ SetInternalOutlineProperty(this, null, outlineMap);
+ }
}
}
@@ -1687,7 +1749,7 @@ public void SetOutline(Outline outline)
public Outline GetOutline()
{
Outline outline;
- using (var outlineMap = (PropertyMap)GetValue(OutlineProperty))
+ using (var outlineMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(OutlineProperty) : (PropertyMap)GetInternalOutlineProperty(this))
{
outline = TextMapHelper.GetOutlineStruct(outlineMap);
}
@@ -2098,7 +2160,14 @@ public void SetTextFit(TextFit textFit)
{
using (var textFitMap = TextMapHelper.GetTextFitMap(textFit))
{
- SetValue(TextFitProperty, textFitMap);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(TextFitProperty, textFitMap);
+ }
+ else
+ {
+ SetInternalTextFitProperty(this, null, textFitMap);
+ }
}
}
@@ -2115,7 +2184,7 @@ public void SetTextFit(TextFit textFit)
public TextFit GetTextFit()
{
TextFit textFit;
- using (var textFitMap = (PropertyMap)GetValue(TextFitProperty))
+ using (var textFitMap = NUIApplication.IsUsingXaml ? (PropertyMap)GetValue(TextFitProperty) : (PropertyMap)GetInternalTextFitProperty(this))
{
textFit = TextMapHelper.GetTextFitStruct(textFitMap);
}
diff --git a/src/Tizen.NUI/src/public/Common/Property.cs b/src/Tizen.NUI/src/public/Common/Property.cs
index 50a210a0b71..437f06313ea 100755
--- a/src/Tizen.NUI/src/public/Common/Property.cs
+++ b/src/Tizen.NUI/src/public/Common/Property.cs
@@ -29,17 +29,6 @@ public Property(Animatable animatable, int propertyIndex) : this(Interop.Propert
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- ///
- /// This constructor creates a property instance.
- ///
- /// A valid handle to the target object.
- /// The index of a property.
- /// Index to a sub component of a property, for use with Vector2, Vector3 and Vector4. -1 for the main property (default is -1).
- public Property(Animatable animatable, int propertyIndex, int componentIndex) : this(Interop.Property.NewProperty(Animatable.getCPtr(animatable), propertyIndex, componentIndex), true)
- {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
///
/// This constructor creates a property instance.
/// This performs a property index query and is therefore slower than constructing a property directly with the index.
@@ -51,18 +40,6 @@ public Property(Animatable animatable, string propertyName) : this(Interop.Prope
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- ///
- /// This constructor creates a property instance.
- /// This performs a property index query and is therefore slower than constructing a property directly with the index.
- ///
- /// A valid handle to the target object.
- /// The property name.
- /// Index to a sub component of a property, for use with Vector2, Vector3 and Vector4. -1 for main property (default is -1).
- public Property(Animatable animatable, string propertyName, int componentIndex) : this(Interop.Property.NewProperty(Animatable.getCPtr(animatable), propertyName, componentIndex), true)
- {
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
}
@@ -85,24 +62,6 @@ public int PropertyIndex
}
}
- ///
- /// Gets or sets the component index of the property.
- ///
- public int ComponentIndex
- {
- set
- {
- Interop.Property.ComponentIndexSet(SwigCPtr, value);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
- get
- {
- int ret = Interop.Property.ComponentIndexGet(SwigCPtr);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
- }
- }
-
internal static int InvalidIndex
{
get
diff --git a/src/Tizen.NUI/src/public/DragAndDrop/DragAndDrop.cs b/src/Tizen.NUI/src/public/DragAndDrop/DragAndDrop.cs
index b37a11c2afc..c0d9120baaf 100755
--- a/src/Tizen.NUI/src/public/DragAndDrop/DragAndDrop.cs
+++ b/src/Tizen.NUI/src/public/DragAndDrop/DragAndDrop.cs
@@ -18,6 +18,7 @@
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Collections.Generic;
+using System.Linq;
using System.Diagnostics.CodeAnalysis;
using Tizen.NUI.BaseComponents;
@@ -32,10 +33,10 @@ public class DragAndDrop : BaseHandle
{
public delegate void SourceEventHandler(DragSourceEventType sourceEventType);
private delegate void InternalSourceEventHandler(int sourceEventType);
- public delegate void DragAndDropEventHandler(View targetView, DragEvent dragEvent);
+ public delegate void DragAndDropEventHandler(View targetView, DragEvent navtiveDragEvent);
[EditorBrowsable(EditorBrowsableState.Never)]
- public delegate void DragAndDropWindowEventHandler(Window targetWindow, DragEvent dragEvent);
- private delegate void InternalDragAndDropEventHandler(global::System.IntPtr dragEvent);
+ public delegate void DragAndDropWindowEventHandler(Window targetWindow, DragEvent navtiveDragEvent);
+ private delegate void InternalDragAndDropEventHandler(global::System.IntPtr navtiveDragEvent);
private InternalSourceEventHandler sourceEventCb;
private Dictionary targetEventDictionary = new Dictionary();
private Dictionary targetWindowEventDictionary = new Dictionary();
@@ -46,11 +47,107 @@ public class DragAndDrop : BaseHandle
private int dragWindowOffsetX = 0;
private int dragWindowOffsetY = 0;
- private bool initDrag = false;
-
private const int MinDragWindowWidth = 100;
private const int MinDragWindowHeight = 100;
+ private void ProcessDragEventTargetCallback(IntPtr navtiveDragEvent, View targetView, DragAndDropEventHandler callback)
+ {
+ DragType type = (DragType)Interop.DragAndDrop.GetAction(navtiveDragEvent);
+ DragEvent dragEvent = new DragEvent();
+ global::System.IntPtr cPtr = Interop.DragAndDrop.GetPosition(navtiveDragEvent);
+ dragEvent.Position = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, true);
+
+ IntPtr nativeMimeTypes;
+ int count;
+ Interop.DragAndDrop.GetMimeTypes(navtiveDragEvent, out nativeMimeTypes, out count);
+ if (count > 0)
+ {
+ IntPtr [] nativeMimeTypesArrary = new IntPtr[count];
+ Marshal.Copy(nativeMimeTypes, nativeMimeTypesArrary, 0, count);
+
+ string [] managedMimeTypes = new string[count];
+
+ for (int iterator = 0; iterator < count; iterator++)
+ {
+ managedMimeTypes[iterator] = Marshal.PtrToStringAnsi(nativeMimeTypesArrary[iterator]);
+ }
+
+ dragEvent.MimeType = managedMimeTypes[0];
+ dragEvent.MimeTypes = managedMimeTypes;
+ }
+
+ if (type == DragType.Enter)
+ {
+ dragEvent.DragType = type;
+ callback(targetView, dragEvent);
+ }
+ else if (type == DragType.Leave)
+ {
+ dragEvent.DragType = type;
+ callback(targetView, dragEvent);
+ }
+ else if (type == DragType.Move)
+ {
+ dragEvent.DragType = type;
+ callback(targetView, dragEvent);
+ }
+ else if (type == DragType.Drop)
+ {
+ dragEvent.DragType = type;
+ dragEvent.Data = Interop.DragAndDrop.GetData(navtiveDragEvent);
+ callback(targetView, dragEvent);
+ }
+ }
+
+ private void ProcessDragEventWindowCallback(IntPtr navtiveDragEvent, Window targetWindow, DragAndDropWindowEventHandler callback)
+ {
+ DragType type = (DragType)Interop.DragAndDrop.GetAction(navtiveDragEvent);
+ DragEvent dragEvent = new DragEvent();
+ global::System.IntPtr cPtr = Interop.DragAndDrop.GetPosition(navtiveDragEvent);
+ dragEvent.Position = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
+
+ IntPtr nativeMimeTypes;
+ int count;
+ Interop.DragAndDrop.GetMimeTypes(navtiveDragEvent, out nativeMimeTypes, out count);
+ if (count > 0)
+ {
+ IntPtr [] nativeMimeTypesArrary = new IntPtr[count];
+ Marshal.Copy(nativeMimeTypes, nativeMimeTypesArrary, 0, count);
+
+ string [] managedMimeTypes = new string[count];
+
+ for (int iterator = 0; iterator < count; iterator++)
+ {
+ managedMimeTypes[iterator] = Marshal.PtrToStringAnsi(nativeMimeTypesArrary[iterator]);
+ }
+
+ dragEvent.MimeType = managedMimeTypes[0];
+ dragEvent.MimeTypes = managedMimeTypes;
+ }
+
+ if (type == DragType.Enter)
+ {
+ dragEvent.DragType = type;
+ callback(targetWindow, dragEvent);
+ }
+ else if (type == DragType.Leave)
+ {
+ dragEvent.DragType = type;
+ callback(targetWindow, dragEvent);
+ }
+ else if (type == DragType.Move)
+ {
+ dragEvent.DragType = type;
+ callback(targetWindow, dragEvent);
+ }
+ else if (type == DragType.Drop)
+ {
+ dragEvent.DragType = type;
+ dragEvent.Data = Interop.DragAndDrop.GetData(navtiveDragEvent);
+ callback(targetWindow, dragEvent);
+ }
+ }
+
private DragAndDrop() : this(Interop.DragAndDrop.New(), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
@@ -92,14 +189,7 @@ private void ReleaseDragWindow()
/// The source event callback
/// 10
public void StartDragAndDrop(View sourceView, View shadowView, DragData dragData, SourceEventHandler callback)
- {
- if (initDrag)
- {
- Tizen.Log.Fatal("NUI", "Start Drag And Drop Initializing...");
- return;
- }
- initDrag = true;
-
+ {
if (Window.IsSupportedMultiWindow() == false)
{
throw new NotSupportedException("This device does not support surfaceless_context. So Window cannot be created.");
@@ -155,7 +245,7 @@ public void StartDragAndDrop(View sourceView, View shadowView, DragData dragData
{
if ((DragSourceEventType)sourceEventType != DragSourceEventType.Start)
{
- Tizen.Log.Fatal("NUI", "DnD Source Event is Called");
+ Tizen.Log.Fatal("NUI", "DnD Source Event is Called");
ReleaseDragWindow();
}
@@ -165,15 +255,29 @@ public void StartDragAndDrop(View sourceView, View shadowView, DragData dragData
//Show Drag Window before StartDragAndDrop
mDragWindow.Show();
- if (!Interop.DragAndDrop.StartDragAndDrop(SwigCPtr, View.getCPtr(sourceView), Window.getCPtr(mDragWindow), dragData.MimeType, dragData.Data,
+ string [] mimeTypes;
+ string [] dataSet;
+
+ if (string.IsNullOrEmpty(dragData.MimeType) && dragData.DataMap != null)
+ {
+ mimeTypes = dragData.DataMap.Keys.ToArray();
+ dataSet = dragData.DataMap.Values.ToArray();
+ }
+ else
+ {
+ mimeTypes = new string[1];
+ mimeTypes[0] = dragData.MimeType;
+
+ dataSet = new string[1];
+ dataSet[0] = dragData.Data;
+ }
+
+ if (!Interop.DragAndDrop.StartDragAndDrop(SwigCPtr, View.getCPtr(sourceView), Window.getCPtr(mDragWindow), mimeTypes, mimeTypes.Length, dataSet, dataSet.Length,
new global::System.Runtime.InteropServices.HandleRef(this, Marshal.GetFunctionPointerForDelegate(sourceEventCb))))
{
throw new InvalidOperationException("Fail to StartDragAndDrop");
}
-
- }
-
- initDrag = false;
+ }
}
///
@@ -184,42 +288,23 @@ public void StartDragAndDrop(View sourceView, View shadowView, DragData dragData
/// 10
public void AddListener(View targetView, DragAndDropEventHandler callback)
{
- InternalDragAndDropEventHandler cb = (dragEvent) =>
- {
- DragType type = (DragType)Interop.DragAndDrop.GetAction(dragEvent);
- DragEvent ev = new DragEvent();
- global::System.IntPtr cPtr = Interop.DragAndDrop.GetPosition(dragEvent);
- ev.Position = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, true);
+ AddListener(targetView, "*/*", callback);
+ }
- if (type == DragType.Enter)
- {
- ev.DragType = type;
- ev.MimeType = Interop.DragAndDrop.GetMimeType(dragEvent);
- callback(targetView, ev);
- }
- else if (type == DragType.Leave)
- {
- ev.DragType = type;
- callback(targetView, ev);
- }
- else if (type == DragType.Move)
- {
- ev.DragType = type;
- ev.MimeType = Interop.DragAndDrop.GetMimeType(dragEvent);
- callback(targetView, ev);
- }
- else if (type == DragType.Drop)
- {
- ev.DragType = type;
- ev.MimeType = Interop.DragAndDrop.GetMimeType(dragEvent);
- ev.Data = Interop.DragAndDrop.GetData(dragEvent);
- callback(targetView, ev);
- }
- };
+ ///
+ /// Adds listener for drop targets
+ ///
+ /// The target view
+ /// The mime type for target view
+ /// The callback function to get drag event when the drag source enters, moves, leaves and drops on the drop target
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void AddListener(View targetView, string mimeType, DragAndDropEventHandler callback)
+ {
+ InternalDragAndDropEventHandler cb = (navtiveDragEvent) => ProcessDragEventTargetCallback(navtiveDragEvent, targetView, callback);
targetEventDictionary.Add(targetView, cb);
- if (!Interop.DragAndDrop.AddListener(SwigCPtr, View.getCPtr(targetView),
+ if (!Interop.DragAndDrop.AddListener(SwigCPtr, View.getCPtr(targetView), mimeType,
new global::System.Runtime.InteropServices.HandleRef(this, Marshal.GetFunctionPointerForDelegate(cb))))
{
throw new InvalidOperationException("Fail to AddListener for View");
@@ -256,40 +341,23 @@ public void RemoveListener(View targetView, DragAndDropEventHandler _)
[EditorBrowsable(EditorBrowsableState.Never)]
public void AddListener(Window targetWindow, DragAndDropWindowEventHandler callback)
{
- InternalDragAndDropEventHandler cb = (dragEvent) =>
- {
- DragType type = (DragType)Interop.DragAndDrop.GetAction(dragEvent);
- DragEvent ev = new DragEvent();
- global::System.IntPtr cPtr = Interop.DragAndDrop.GetPosition(dragEvent);
- ev.Position = (cPtr == global::System.IntPtr.Zero) ? null : new Position(cPtr, false);
+ AddListener(targetWindow, "*/*", callback);
+ }
- if (type == DragType.Enter)
- {
- ev.DragType = type;
- callback(targetWindow, ev);
- }
- else if (type == DragType.Leave)
- {
- ev.DragType = type;
- callback(targetWindow, ev);
- }
- else if (type == DragType.Move)
- {
- ev.DragType = type;
- callback(targetWindow, ev);
- }
- else if (type == DragType.Drop)
- {
- ev.DragType = type;
- ev.MimeType = Interop.DragAndDrop.GetMimeType(dragEvent);
- ev.Data = Interop.DragAndDrop.GetData(dragEvent);
- callback(targetWindow, ev);
- }
- };
+ ///
+ /// Adds listener for drop targets
+ ///
+ /// The target Window
+ /// The mime type for target view
+ /// The callback function to get drag event when the drag source enters, moves, leaves and drops on the drop target
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void AddListener(Window targetWindow, string mimeType, DragAndDropWindowEventHandler callback)
+ {
+ InternalDragAndDropEventHandler cb = (navtiveDragEvent) => ProcessDragEventWindowCallback(navtiveDragEvent, targetWindow, callback);
targetWindowEventDictionary.Add(targetWindow, cb);
- if (!Interop.DragAndDrop.WindowAddListener(SwigCPtr, Window.getCPtr(targetWindow),
+ if (!Interop.DragAndDrop.WindowAddListener(SwigCPtr, Window.getCPtr(targetWindow), mimeType,
new global::System.Runtime.InteropServices.HandleRef(this, Marshal.GetFunctionPointerForDelegate(cb))))
{
throw new InvalidOperationException("Fail to AddListener for Window");
diff --git a/src/Tizen.NUI/src/public/DragAndDrop/DragEvent.cs b/src/Tizen.NUI/src/public/DragAndDrop/DragEvent.cs
index 6c705b90d3d..da4cc9ae183 100755
--- a/src/Tizen.NUI/src/public/DragAndDrop/DragEvent.cs
+++ b/src/Tizen.NUI/src/public/DragAndDrop/DragEvent.cs
@@ -16,6 +16,7 @@
*/
using System;
using System.ComponentModel;
+using System.Collections.Generic;
using Tizen.NUI.Binding;
namespace Tizen.NUI
@@ -60,6 +61,12 @@ public struct DragData
/// The drag data to send
///
public string Data { get; set; }
+
+ ///
+ /// The mime types and drag data set
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Dictionary DataMap;
}
///
@@ -106,6 +113,13 @@ public struct DragEvent
/// The mime type of drag object
///
public string MimeType { get; set; }
+
+ ///
+ /// The mime types of drag object
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public string [] MimeTypes { get; set; }
+
///
/// The drag data to receive
///
diff --git a/test/NUIDnDMultiWindow/NUIDnDMultiWindow.cs b/test/NUIDnDMultiWindow/NUIDnDMultiWindow.cs
index 3d95b347b28..dec31805f78 100644
--- a/test/NUIDnDMultiWindow/NUIDnDMultiWindow.cs
+++ b/test/NUIDnDMultiWindow/NUIDnDMultiWindow.cs
@@ -89,7 +89,7 @@ void Initialize()
Tizen.Log.Debug("NUIDnDMultiWindow", "StartDragAndDrop");
shadowView = new ImageView(Tizen.Applications.Application.Current.DirectoryInfo.SharedResource + "dragsource.png");
shadowView.Size = new Size(150, 150);
- DragData dragData;
+ DragData dragData = new DragData();
dragData.MimeType = "text/uri-list";
dragData.Data = Tizen.Applications.Application.Current.DirectoryInfo.SharedResource + "dragsource.png";
dnd.StartDragAndDrop(sourceView, shadowView, dragData, OnSourceApp_SourceFunc);
diff --git a/test/NUIDnDSource/NUIDnDSource.cs b/test/NUIDnDSource/NUIDnDSource.cs
index 7bceebef55c..ae242037a8a 100644
--- a/test/NUIDnDSource/NUIDnDSource.cs
+++ b/test/NUIDnDSource/NUIDnDSource.cs
@@ -91,7 +91,7 @@ void Initialize()
Tizen.Log.Debug("NUIDnDSource", "StartDragAndDrop");
shadowView = new ImageView(Tizen.Applications.Application.Current.DirectoryInfo.SharedResource + "dragsource.png");
shadowView.Size = new Size(150, 150);
- DragData dragData;
+ DragData dragData = new DragData();
dragData.MimeType = "text/uri-list";
dragData.Data = Tizen.Applications.Application.Current.DirectoryInfo.SharedResource + "dragsource.png";
dnd.StartDragAndDrop(sourceView, shadowView, dragData, OnSourceEventFunc);
diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSProperty.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSProperty.cs
index 4b723f7cff8..bb47d0193d1 100755
--- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSProperty.cs
+++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Common/TSProperty.cs
@@ -60,31 +60,6 @@ public void PropertyConstructor()
tlog.Debug(tag, $"PropertyConstructor END (OK)");
}
- [Test]
- [Category("P1")]
- [Description("Property constructor. With sub component index")]
- [Property("SPEC", "Tizen.NUI.Property.Property C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void PropertyConstructorWithSubComponentIndex()
- {
- tlog.Debug(tag, $"PropertyConstructorWithSubComponentIndex START");
-
- var animatable = new Animatable();
- Assert.IsNotNull(animatable, "Should be not null!");
- Assert.IsInstanceOf(animatable, "Should return PropertyValue instance.");
-
- var dummyIndex = 28000000;
- var testingTarget = new Property(animatable, dummyIndex, -1);
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf(testingTarget, "Should return PropertyValue instance.");
-
- testingTarget.Dispose();
- animatable.Dispose();
- tlog.Debug(tag, $"PropertyConstructorWithSubComponentIndex END (OK)");
- }
-
[Test]
[Category("P1")]
[Description("Property constructor. With property name")]
@@ -109,30 +84,6 @@ public void PropertyConstructorWithPropertyName()
tlog.Debug(tag, $"PropertyConstructorWithPropertyName END (OK)");
}
- [Test]
- [Category("P1")]
- [Description("Property constructor. With property name and sub component index")]
- [Property("SPEC", "Tizen.NUI.Property.Property C")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "CONSTR")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void PropertyConstructorWithPropertyNameSubComponentIndex()
- {
- tlog.Debug(tag, $"PropertyConstructorWithPropertyNameSubComponentIndex START");
-
- var animatable = new Animatable();
- Assert.IsNotNull(animatable, "Should be not null!");
- Assert.IsInstanceOf(animatable, "Should return PropertyValue instance.");
-
- var testingTarget = new Property(animatable, "image", -1);
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf(testingTarget, "Should return PropertyValue instance.");
-
- testingTarget.Dispose();
- animatable.Dispose();
- tlog.Debug(tag, $"PropertyConstructorWithPropertyNameSubComponentIndex END (OK)");
- }
-
[Test]
[Category("P1")]
[Description("Property propertyIndex. Get")]
@@ -187,60 +138,5 @@ public void PropertyPropertyIndexSet()
animatable.Dispose();
tlog.Debug(tag, $"PropertyPropertyIndexSet END (OK)");
}
-
- [Test]
- [Category("P1")]
- [Description("Property componentIndex. Get")]
- [Property("SPEC", "Tizen.NUI.Property.componentIndex A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void PropertyComponentIndexGet()
- {
- tlog.Debug(tag, $"PropertyComponentIndexGet START");
-
- var animatable = new Animatable();
- Assert.IsNotNull(animatable, "Should be not null!");
- Assert.IsInstanceOf(animatable, "Should return PropertyValue instance.");
-
- var testingTarget = new Property(animatable, 28000000, -1);
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf(testingTarget, "Should return PropertyValue instance.");
-
- var result = testingTarget.componentIndex;
- Assert.IsTrue(-1 == result);
-
- testingTarget.Dispose();
- animatable.Dispose();
- tlog.Debug(tag, $"PropertyComponentIndexGet END (OK)");
- }
-
- [Test]
- [Category("P1")]
- [Description("Property componentIndex. Get")]
- [Property("SPEC", "Tizen.NUI.Property.componentIndex A")]
- [Property("SPEC_URL", "-")]
- [Property("CRITERIA", "PRO")]
- [Property("AUTHOR", "guowei.wang@samsung.com")]
- public void PropertyComponentIndexSet()
- {
- tlog.Debug(tag, $"PropertyComponentIndexSet START");
-
- var animatable = new Animatable();
- Assert.IsNotNull(animatable, "Should be not null!");
- Assert.IsInstanceOf(animatable, "Should return PropertyValue instance.");
-
- var testingTarget = new Property(animatable, 28000000, -1);
- Assert.IsNotNull(testingTarget, "Should be not null!");
- Assert.IsInstanceOf(testingTarget, "Should return PropertyValue instance.");
-
- testingTarget.componentIndex = 30000000;
- var result = testingTarget.componentIndex;
- Assert.IsTrue(30000000 == result);
-
- testingTarget.Dispose();
- animatable.Dispose();
- tlog.Debug(tag, $"PropertyComponentIndexSet END (OK)");
- }
}
}