Merge remote-tracking branch 'origin/master' into tizen
authoradmin <tizenapi@samsung.com>
Tue, 30 Apr 2019 15:52:12 +0000 (15:52 +0000)
committeradmin <tizenapi@samsung.com>
Tue, 30 Apr 2019 15:52:12 +0000 (15:52 +0000)
12 files changed:
src/Tizen.Content.MediaContent/Tizen.Content.MediaContent.csproj
src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/Columns.cs
src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/Folder.cs
src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfo.cs
src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/MediaInfoCommand.cs
src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/QueryArguments.cs
src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/Storage.cs [changed mode: 0755->0644]
src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/StorageCommand.cs
src/Tizen.NUI/src/internal/Registry.cs
src/Tizen.NUI/src/public/BaseComponents/VectorAnimationView.cs [new file with mode: 0755]
src/Tizen.WebView/Interop/Interop.Eina.cs
src/Tizen.WebView/Tizen.WebView/BackForwardList.cs

index fbac841..7a96416 100644 (file)
@@ -5,6 +5,7 @@
   </PropertyGroup>
 
   <ItemGroup>
+    <ProjectReference Include="..\Tizen.System.Storage\Tizen.System.Storage.csproj" />
     <ProjectReference Include="..\Tizen\Tizen.csproj" />
     <ProjectReference Include="..\Tizen.Log\Tizen.Log.csproj" />
     <ProjectReference Include="..\Tizen.System.Information\Tizen.System.Information.csproj" />
index 819fe5a..3d4f35c 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/*
  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
  *
  * Licensed under the Apache License, Version 2.0 (the License);
@@ -466,6 +466,7 @@ namespace Tizen.Content.MediaContent
         /// </remarks>
         /// <seealso cref="MediaInfo.StorageType"/>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public static string StorageType => "MEDIA_STORAGE_TYPE";
 
         /// <summary>
@@ -603,6 +604,7 @@ namespace Tizen.Content.MediaContent
         /// </remarks>
         /// <seealso cref="Folder.StorageType"/>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public static string StorageType => "FOLDER_STORAGE_TYPE";
     }
 
@@ -809,6 +811,7 @@ namespace Tizen.Content.MediaContent
     /// <seealso cref="StorageCommand.Count(CountArguments)"/>
     /// <seealso cref="StorageCommand.Select(SelectArguments)"/>
     /// <since_tizen> 4 </since_tizen>
+    [Obsolete("Please do not use! this will be deprecated in level 6")]
     public static class StorageColumns
     {
         /// <summary>
@@ -820,6 +823,7 @@ namespace Tizen.Content.MediaContent
         /// </remarks>
         /// <seealso cref="Storage.Id"/>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public static string Id => "STORAGE_ID";
 
         /// <summary>
@@ -831,6 +835,7 @@ namespace Tizen.Content.MediaContent
         /// </remarks>
         /// <seealso cref="Storage.Path"/>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public static string Path => "STORAGE_PATH";
 
         /// <summary>
@@ -843,6 +848,7 @@ namespace Tizen.Content.MediaContent
         /// </remarks>
         /// <seealso cref="Storage.Type"/>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public static string Type => "MEDIA_STORAGE_TYPE";
     }
 }
index 0da577a..841c421 100644 (file)
@@ -66,6 +66,7 @@ namespace Tizen.Content.MediaContent
         /// </summary>
         /// <value>The <see cref="StorageType"/> of the storage that the folder exists.</value>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public StorageType StorageType { get; }
 
         /// <summary>
@@ -73,6 +74,7 @@ namespace Tizen.Content.MediaContent
         /// </summary>
         /// <value>The storage ID of the storage that the folder exists.</value>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public string StorageId { get; }
 
         /// <summary>
index 38ea5f9..ffcb30f 100644 (file)
@@ -186,6 +186,7 @@ namespace Tizen.Content.MediaContent
         /// </summary>
         /// <value>The storage ID of the storage that the media is stored on.</value>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public string StorageId { get; }
 
         /// <summary>
@@ -200,6 +201,7 @@ namespace Tizen.Content.MediaContent
         /// </summary>
         /// <value>The storage type of the storage that the media is stored on.</value>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public StorageType StorageType { get; }
 
         /// <summary>
index b474646..fff1dfc 100644 (file)
@@ -20,6 +20,7 @@ using System.IO;
 using System.Linq;
 using System.Threading;
 using System.Threading.Tasks;
+using Tizen.System;
 
 namespace Tizen.Content.MediaContent
 {
@@ -880,13 +881,16 @@ namespace Tizen.Content.MediaContent
 
             using (handle)
             {
-                if (InteropHelper.GetValue<StorageType>(handle, Interop.MediaInfo.GetStorageType) == StorageType.ExternalUsb)
+                var path = InteropHelper.GetString(handle, Interop.MediaInfo.GetFilePath);
+
+                foreach (var extendedInternal in StorageManager.Storages.Where(s => s.StorageType == StorageArea.ExtendedInternal))
                 {
-                    throw new UnsupportedContentException("The media is in external usb storage.");
+                    if (path.Contains(extendedInternal.RootDirectory))
+                    {
+                        throw new UnsupportedContentException("The media is in external usb storage.");
+                    }
                 }
 
-                var path = InteropHelper.GetString(handle, Interop.MediaInfo.GetFilePath);
-
                 if (File.Exists(path) == false)
                 {
                     throw new FileNotFoundException($"The media file does not exist. Path={path}.", path);
index 765a740..4f3996f 100644 (file)
@@ -95,6 +95,7 @@ namespace Tizen.Content.MediaContent
         /// <value>The storage ID to restrict storage to search, or null for all storages.</value>
         /// <exception cref="ArgumentException"><paramref name="value"/> is a zero-length string, contains only white space.</exception>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public string StorageId
         {
             get => _storageId;
old mode 100755 (executable)
new mode 100644 (file)
index 621fa1f..d531d51
@@ -26,6 +26,7 @@ namespace Tizen.Content.MediaContent
     /// in each of the storage by using the storage ID.
     /// </remarks>
     /// <since_tizen> 3 </since_tizen>
+    [Obsolete("Please do not use! this will be deprecated in level 6")]
     public class Storage
     {
         internal Storage(IntPtr handle)
@@ -42,6 +43,7 @@ namespace Tizen.Content.MediaContent
         /// </summary>
         /// <value>The unique ID of the storage.</value>
         /// <since_tizen> 3 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public string Id { get; }
 
         /// <summary>
@@ -49,6 +51,7 @@ namespace Tizen.Content.MediaContent
         /// </summary>
         /// <value>The path of the storage.</value>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public string Path { get; }
 
         /// <summary>
@@ -56,6 +59,7 @@ namespace Tizen.Content.MediaContent
         /// </summary>
         /// <value>The type of the storage.</value>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public StorageType Type { get; }
 
         /// <summary>
@@ -63,6 +67,7 @@ namespace Tizen.Content.MediaContent
         /// </summary>
         /// <returns>A string representation of the current storage.</returns>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public override string ToString() =>
             $"Id={Id}, Path={Path}, Type={Type}";
     }
index 2d91c36..b526226 100644 (file)
@@ -26,6 +26,7 @@ namespace Tizen.Content.MediaContent
     /// </remarks>
     /// <seealso cref="Storage"/>
     /// <since_tizen> 4 </since_tizen>
+    [Obsolete("Please do not use! this will be deprecated in level 6")]
     public class StorageCommand : MediaCommand
     {
         /// <summary>
@@ -35,6 +36,7 @@ namespace Tizen.Content.MediaContent
         /// <exception cref="ArgumentNullException"><paramref name="database"/> is null.</exception>
         /// <exception cref="ObjectDisposedException"><paramref name="database"/> has already been disposed of.</exception>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public StorageCommand(MediaDatabase database) : base(database)
         {
         }
@@ -47,6 +49,7 @@ namespace Tizen.Content.MediaContent
         /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
         /// <exception cref="MediaDatabaseException">An error occurred while executing the command.</exception>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public int Count() => Count(arguments: null);
 
         /// <summary>
@@ -58,6 +61,7 @@ namespace Tizen.Content.MediaContent
         /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
         /// <exception cref="MediaDatabaseException">An error occurred while executing the command.</exception>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public int Count(CountArguments arguments)
         {
             ValidateDatabase();
@@ -76,6 +80,7 @@ namespace Tizen.Content.MediaContent
         /// <exception cref="ArgumentNullException"><paramref name="storageId"/> is null.</exception>
         /// <exception cref="ArgumentException"><paramref name="storageId"/> is a zero-length string, contains only white space.</exception>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public Storage Select(string storageId)
         {
             ValidateDatabase();
@@ -112,6 +117,7 @@ namespace Tizen.Content.MediaContent
         /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
         /// <exception cref="MediaDatabaseException">An error occurred while executing the command.</exception>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public MediaDataReader<Storage> Select() => Select(arguments: null);
 
         /// <summary>
@@ -123,6 +129,7 @@ namespace Tizen.Content.MediaContent
         /// <exception cref="ObjectDisposedException">The <see cref="MediaDatabase"/> has already been disposed of.</exception>
         /// <exception cref="MediaDatabaseException">An error occurred while executing the command.</exception>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public MediaDataReader<Storage> Select(SelectArguments arguments)
         {
             ValidateDatabase();
@@ -150,6 +157,7 @@ namespace Tizen.Content.MediaContent
         /// <exception cref="ArgumentNullException"><paramref name="storageId"/> is null.</exception>
         /// <exception cref="ArgumentException"><paramref name="storageId"/> is a zero-length string, contains only white space.</exception>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public int CountMedia(string storageId) => CountMedia(storageId, null);
 
         /// <summary>
@@ -164,6 +172,7 @@ namespace Tizen.Content.MediaContent
         /// <exception cref="ArgumentNullException"><paramref name="storageId"/> is null.</exception>
         /// <exception cref="ArgumentException"><paramref name="storageId"/> is a zero-length string, contains only white space.</exception>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public int CountMedia(string storageId, CountArguments arguments)
         {
             if (Exists(storageId) == false)
@@ -185,6 +194,7 @@ namespace Tizen.Content.MediaContent
         /// <exception cref="ArgumentNullException"><paramref name="storageId"/> is null.</exception>
         /// <exception cref="ArgumentException"><paramref name="storageId"/> is a zero-length string, contains only white space.</exception>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public MediaDataReader<MediaInfo> SelectMedia(string storageId) => SelectMedia(storageId, null);
 
         /// <summary>
@@ -199,6 +209,7 @@ namespace Tizen.Content.MediaContent
         /// <exception cref="ArgumentNullException"><paramref name="storageId"/> is null.</exception>
         /// <exception cref="ArgumentException"><paramref name="storageId"/> is a zero-length string, contains only white space.</exception>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Please do not use! this will be deprecated in level 6")]
         public MediaDataReader<MediaInfo> SelectMedia(string storageId, SelectArguments filter)
         {
             if (Exists(storageId) == false)
index 134ab54..9d1923a 100755 (executable)
@@ -157,7 +157,7 @@ namespace Tizen.NUI
             if (savedApplicationThread == null)
             {
                 Tizen.Log.Fatal("NUI", $"Error! maybe main thread is created by other process\n");
-                return;
+                throw new global::System.ApplicationException("Error! maybe main thread is created by other process");
             }
             int currentId = Thread.CurrentThread.ManagedThreadId;
             int mainThreadId = savedApplicationThread.ManagedThreadId;
diff --git a/src/Tizen.NUI/src/public/BaseComponents/VectorAnimationView.cs b/src/Tizen.NUI/src/public/BaseComponents/VectorAnimationView.cs
new file mode 100755 (executable)
index 0000000..6c83565
--- /dev/null
@@ -0,0 +1,692 @@
+/*
+ * Copyright(c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI.BaseComponents
+{
+    using global::System;
+    using global::System.Runtime.InteropServices;
+    using System.ComponentModel;
+    using Tizen.NUI;
+    using tizenlog = Tizen.Log;
+
+    /// <summary>
+    /// VectorAnimationView renders an animated vector image
+    /// </summary>
+    /// <since_tizen> none </since_tizen>
+    // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class VectorAnimationView : ImageView
+    {
+        /// <summary>
+        /// VectorAnimationView constructor
+        /// </summary>
+        /// <since_tizen> none </since_tizen>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public VectorAnimationView()
+        {
+        }
+
+        /// <summary>
+        /// Animation finished event
+        /// </summary>
+        /// <since_tizen> none </since_tizen>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public event EventHandler Finished
+        {
+            add
+            {
+                if (finishedEventHandler == null)
+                {
+                    tizenlog.Debug(debugTag, $"Finished()! add!");
+                    visualEventSignalCallback = onVisualEventSignal;
+                    VisualEventSignal().Connect(visualEventSignalCallback);
+                }
+                finishedEventHandler += value;
+            }
+            remove
+            {
+                tizenlog.Debug(debugTag, $"Finished()! remove!");
+                finishedEventHandler -= value;
+                if (finishedEventHandler == null && visualEventSignalCallback != null)
+                {
+                    VisualEventSignal().Disconnect(visualEventSignalCallback);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Enumeration for what state the vector animation is in
+        /// </summary>
+        /// <since_tizen> none </since_tizen>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public enum PlayStateType
+        {
+            /// <summary>
+            /// Invalid
+            /// </summary>
+            Invalid = -1,
+            /// <summary>
+            /// Vector Animation has stopped
+            /// </summary>
+            /// <since_tizen> none </since_tizen>
+            // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Stopped,
+            /// <summary>
+            /// The vector animation is playing
+            /// </summary>
+            /// <since_tizen> none </since_tizen>
+            // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Playing,
+            /// <summary>
+            /// The vector animation is paused
+            /// </summary>
+            /// <since_tizen> none </since_tizen>
+            // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+            [EditorBrowsable(EditorBrowsableState.Never)]
+            Paused
+        }
+
+        /// <summary>
+        /// Resource URL
+        /// </summary>
+        /// <since_tizen> none </since_tizen>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public string URL
+        {
+            get
+            {
+                string ret = ResourceUrl;
+                tizenlog.Debug(debugTag, $"URL get! base resource mUrl={ret}, name={Name}");
+                PropertyMap map = Image;
+                if (map != null)
+                {
+                    PropertyValue val = map.Find(ImageVisualProperty.URL);
+                    if (val != null)
+                    {
+                        if (val.Get(out ret))
+                        {
+                            tizenlog.Debug(debugTag, $"gotten url={ret}");
+                            return ret;
+                        }
+                    }
+                }
+                tizenlog.Error(tag, "[ERROR] fail to get ResourceUrl from dali");
+                return ret;
+            }
+            set
+            {
+                tizenlog.Debug(debugTag, $"URL set! value={value}");
+                string ret = (value == null ? "" : value);
+                url = ret;
+                PropertyMap map = new PropertyMap();
+                map.Add(Visual.Property.Type, new PropertyValue((int)DevelVisual.Type.AnimatedVectorImage))
+                    .Add(ImageVisualProperty.URL, new PropertyValue(ret));
+                Image = map;
+            }
+        }
+
+        /// <summary>
+        /// The number of times the VectorAnimationView will be looped
+        /// </summary>
+        /// <since_tizen> none </since_tizen>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public int LoopCount
+        {
+            set
+            {
+                tizenlog.Debug(debugTag, $"LoopCount set val={value}");
+                PropertyMap map = new PropertyMap();
+                map.Add(ImageVisualProperty.LoopCount, new PropertyValue(value));
+                DoAction(vectorImageVisualIndex, (int)actionType.updateProperty, new PropertyValue(map));
+            }
+            get
+            {
+                tizenlog.Debug(debugTag, $"LoopCount get!");
+                PropertyMap map = base.Image;
+                var ret = 0;
+                if (map != null)
+                {
+                    PropertyValue val = map.Find(ImageVisualProperty.LoopCount);
+                    if (val != null)
+                    {
+                        if (val.Get(out ret))
+                        {
+                            tizenlog.Debug(debugTag, $"gotten loop count={ret}");
+                            return ret;
+                        }
+                    }
+                }
+                tizenlog.Error(tag, "[ERROR] fail to get LoopCount from dali");
+                return ret;
+            }
+        }
+
+        /// <summary>
+        /// The playing state
+        /// </summary>
+        /// <since_tizen> none </since_tizen>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public PlayStateType PlayState
+        {
+            get
+            {
+                var ret = -1;
+                PropertyMap map = Image;
+                if (map != null)
+                {
+                    PropertyValue val = map.Find((int)DevelVisual.Type.AnimatedVectorImage);
+                    if (val != null)
+                    {
+                        if (val.Get(out ret))
+                        {
+                            return (PlayStateType)ret;
+                        }
+                    }
+                }
+                tizenlog.Error(tag, $"[ERROR] fail to get PlayState from dali");
+                return (PlayStateType)ret;
+            }
+        }
+
+        /// <summary>
+        /// The animation progress
+        /// </summary>
+        /// <since_tizen> none </since_tizen>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public float CurrentProgress
+        {
+            set
+            {
+                float val = value;
+                tizenlog.Debug(debugTag, $"set progress={val}");
+                DoAction(vectorImageVisualIndex, (int)actionType.jumpTo, new PropertyValue(val));
+            }
+            get
+            {
+                float ret = -1.0f;
+                PropertyMap map = Image;
+                if (map != null)
+                {
+                    PropertyValue val = map.Find(ImageVisualProperty.CurrentProgress);
+                    if (val != null)
+                    {
+                        if (val.Get(out ret))
+                        {
+                            return ret;
+                        }
+                    }
+                }
+                tizenlog.Error(tag, $"[ERROR] fail to get CurrentProgress from dali");
+                return ret;
+            }
+        }
+
+        /// <summary>
+        /// The animation frame
+        /// </summary>
+        /// <since_tizen> none </since_tizen>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public int CurrentFrame
+        {
+            set
+            {
+                currentFrame = value;
+                //to do
+            }
+            get
+            {
+                //to do
+                return currentFrame;
+            }
+        }
+
+        /// <summary>
+        /// Animation will play between the values specified. Both values should be between 0-1, otherwise they will be ignored. 
+        /// If the range provided is not in proper order(minimum, maximum ), it will be reordered.
+        /// Default 0 and 1
+        /// </summary>
+        /// <param name="range">Vector2 type, between 0 and 1</param>
+        /// <since_tizen> none </since_tizen>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public void SetPlayRange(Vector2 range)
+        {
+            PropertyMap map = new PropertyMap();
+            map.Add(ImageVisualProperty.PlayRange, new PropertyValue(range));
+            DoAction(vectorImageVisualIndex, (int)actionType.updateProperty, new PropertyValue(map));
+        }
+
+        /// <summary>
+        /// Get Animation play range
+        /// </summary>
+        /// <returns>Vector2 type, between 0 and 1</returns>
+        /// <since_tizen> none </since_tizen>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public Vector2 GetPlayRange()
+        {
+            Vector2 ret = new Vector2(-1.0f, -1.0f);
+            PropertyMap map = Image;
+            if (map != null)
+            {
+                PropertyValue val = map.Find(ImageVisualProperty.PlayRange);
+                if (val != null)
+                {
+                    if (val.Get(ret))
+                    {
+                        return ret;
+                    }
+                }
+            }
+            tizenlog.Error(tag, $"[ERROR] fail to get PlayRange from dali");
+            return ret;
+
+        }
+
+        /// <summary>
+        /// Play VectorAnimationView
+        /// </summary>
+        /// <since_tizen> none </since_tizen>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        new public void Play()
+        {
+            tizenlog.Debug(debugTag, $"play() called! my mUrl={url}");
+            base.Play();
+        }
+
+        /// <summary>
+        /// Pause VectorAnimationView
+        /// </summary>
+        /// <since_tizen> none </since_tizen>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        new public void Pause()
+        {
+            tizenlog.Debug(debugTag, $"pause() called! my mUrl={url}");
+            base.Pause();
+        }
+
+        /// <summary>
+        /// Stop VectorAnimationView
+        /// </summary>
+        /// <since_tizen> none </since_tizen>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        new public void Stop()
+        {
+            tizenlog.Debug(debugTag, $"stop() called! my mUrl={url}");
+            base.Stop();
+        }
+
+        /// <summary>
+        /// You can override it to clean-up your own resources
+        /// </summary>
+        /// <param name="type">DisposeTypes</param>
+        /// <since_tizen> none </since_tizen>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        protected override void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+                //Called by User
+                //Release your own managed resources here.
+                //You should release all of your own disposable objects here.
+            }
+
+            //Release your own unmanaged resources here.
+            //You should not access any managed member here except static instance.
+            //because the execution order of Finalizes is non-deterministic.
+            base.Dispose(type);
+        }
+
+        internal class VisualEventSignalArgs : EventArgs
+        {
+            public int VisualIndex
+            {
+                get
+                {
+                    return visualIndex;
+                }
+                set
+                {
+                    visualIndex = value;
+                }
+            }
+
+            public int SignalId
+            {
+                get
+                {
+                    return signalId;
+                }
+                set
+                {
+                    signalId = value;
+                }
+            }
+
+            int visualIndex;
+            int signalId;
+        }
+
+        private enum actionType
+        {
+            /// <summary>
+            /// Play the animated vector image
+            /// </summary>
+            play,
+            /// <summary>
+            /// Pause the animated vector image
+            /// </summary>
+            pause,
+            /// <summary>
+            /// Stop the animated vector image. This is also Default playback mode
+            /// </summary>
+            stop,
+            /// <summary>
+            /// Jump to the specified frame. Property::FLOAT value should be passed
+            /// </summary>
+            jumpTo,
+            /// <summary>
+            /// Update the properties of the animated vector image
+            /// </summary>
+            updateProperty
+        };
+
+        private struct DevelVisual
+        {
+            internal enum Type
+            {
+                /// <summary>
+                /// Renders an animated gradient
+                /// </summary>
+                AnimatedGradient = Tizen.NUI.Visual.Type.AnimatedImage + 1,
+                /// <summary>
+                /// Renders an animated vector image
+                /// </summary>
+                AnimatedVectorImage = Tizen.NUI.Visual.Type.AnimatedImage + 2,
+            }
+        }
+
+        private const string debugTag = "NUITEST";
+        private const string tag = "NUI";
+        //DummyControl.Property.TEST_VISUAL
+        private const int vectorImageVisualIndex = 10000000 + 1000 + 2;
+        private string url;
+        private int currentFrame;
+        private event EventHandler finishedEventHandler;
+
+        private void OnFinished()
+        {
+            finishedEventHandler?.Invoke(this, null);
+        }
+
+        private void onVisualEventSignal(IntPtr targetView, int visualIndex, int signalId)
+        {
+            OnFinished();
+
+            if (targetView != IntPtr.Zero)
+            {
+                View v = Registry.GetManagedBaseHandleFromNativePtr(targetView) as View;
+                if (v != null)
+                {
+                    tizenlog.Debug(debugTag, $"targetView is not null! name={v.Name}");
+                }
+                else
+                {
+                    tizenlog.Debug(debugTag, $"target is something created from dali");
+                }
+            }
+            VisualEventSignalArgs e = new VisualEventSignalArgs();
+            e.VisualIndex = visualIndex;
+            e.SignalId = signalId;
+            visualEventSignalHandler?.Invoke(this, e);
+
+            tizenlog.Debug(debugTag, $"@@ onVisualEventSignal()! visualIndex={visualIndex}, signalId={signalId}");
+        }
+
+        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+        private delegate void VisualEventSignalCallbackType(IntPtr targetView, int visualIndex, int signalId);
+
+        private VisualEventSignalCallbackType visualEventSignalCallback;
+
+        private EventHandler<VisualEventSignalArgs> visualEventSignalHandler;
+
+        internal event EventHandler<VisualEventSignalArgs> VisualEvent
+        {
+            add
+            {
+                if (visualEventSignalHandler == null)
+                {
+                    visualEventSignalCallback = onVisualEventSignal;
+                    VisualEventSignal().Connect(visualEventSignalCallback);
+                }
+                visualEventSignalHandler += value;
+            }
+            remove
+            {
+                visualEventSignalHandler -= value;
+                if (visualEventSignalHandler == null && VisualEventSignal().Empty() == false)
+                {
+                    VisualEventSignal().Disconnect(visualEventSignalCallback);
+                }
+            }
+        }
+
+        internal void EmitVisualEventSignal(int visualIndex, int signalId)
+        {
+            VisualEventSignal().Emit(this, visualIndex, signalId);
+        }
+
+        internal VisualEventSignal VisualEventSignal()
+        {
+            VisualEventSignal ret = new VisualEventSignal(InterOp.View_VisaulEventSignal(View.getCPtr(this)), false);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+    } // VectorAnimationView : ImageView
+} // namespace Tizen.NUI.BaseComponents
+
+namespace Tizen.NUI
+{
+    using Tizen.NUI.BaseComponents;
+    using global::System;
+    using global::System.Runtime.InteropServices;
+    using System.ComponentModel;
+    using tizenlog = Tizen.Log;
+
+    internal class VisualEventSignal : IDisposable
+    {
+        public VisualEventSignal() : this(InterOp.new_VisualEventSignal(), true)
+        {
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        ~VisualEventSignal()
+        {
+            if (!isDisposeQueued)
+            {
+                isDisposeQueued = true;
+                DisposeQueue.Instance.Add(this);
+            }
+        }
+
+        /// <summary>
+        /// Dispose
+        /// </summary>
+        public void Dispose()
+        {
+            if (!Window.IsInstalled())
+            {
+                throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
+            }
+
+            if (isDisposeQueued)
+            {
+                Dispose(DisposeTypes.Implicit);
+            }
+            else
+            {
+                Dispose(DisposeTypes.Explicit);
+                GC.SuppressFinalize(this);
+            }
+        }
+
+        protected virtual void Dispose(DisposeTypes type)
+        {
+            if (disposed)
+            {
+                return;
+            }
+
+            if (type == DisposeTypes.Explicit)
+            {
+                //Called by User
+                //Release your own managed resources here.
+                //You should release all of your own disposable objects here.
+
+            }
+
+            //Release your own unmanaged resources here.
+            //You should not access any managed member here except static instance.
+            //because the execution order of Finalizes is non-deterministic.
+
+            if (swigCPtr.Handle != IntPtr.Zero)
+            {
+                if (swigCMemOwn)
+                {
+                    swigCMemOwn = false;
+                    InterOp.delete_VisualEventSignal(swigCPtr);
+                }
+                swigCPtr = new HandleRef(null, IntPtr.Zero);
+            }
+            disposed = true;
+        }
+
+        public bool Empty()
+        {
+            bool ret = InterOp.VisualEventSignal_Empty(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        public uint GetConnectionCount()
+        {
+            uint ret = InterOp.VisualEventSignal_GetConnectionCount(swigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return ret;
+        }
+
+        public void Connect(Delegate func)
+        {
+            tizenlog.Debug(tag, $"Connect()!");
+
+            IntPtr ip = Marshal.GetFunctionPointerForDelegate<Delegate>(func);
+            {
+                InterOp.VisualEventSignal_Connect(swigCPtr, new HandleRef(this, ip));
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+        }
+
+        public void Disconnect(Delegate func)
+        {
+            IntPtr ip = Marshal.GetFunctionPointerForDelegate<Delegate>(func);
+            {
+                InterOp.VisualEventSignal_Disconnect(swigCPtr, new HandleRef(this, ip));
+                if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            }
+        }
+
+        public void Emit(View target, int visualIndex, int signalId)
+        {
+            InterOp.VisualEventSignal_Emit(swigCPtr, View.getCPtr(target), visualIndex, signalId);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        internal VisualEventSignal(IntPtr cPtr, bool cMemoryOwn)
+        {
+            swigCMemOwn = cMemoryOwn;
+            swigCPtr = new HandleRef(this, cPtr);
+        }
+
+        internal static HandleRef getCPtr(VisualEventSignal obj)
+        {
+            return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
+        }
+
+        private const string tag = "NUI";
+        private HandleRef swigCPtr;
+        protected bool swigCMemOwn;
+
+        private bool isDisposeQueued = false;
+        protected bool disposed = false;
+
+    } // internal class VisualEventSignal : IDisposable
+} // namespace Tizen.NUI
+
+namespace Tizen.NUI
+{
+    using global::System.Runtime.InteropServices;
+    using global::System;
+
+    internal partial class InterOp
+    {
+        const string Lib = "libdali-csharp-binder.so";
+
+        [DllImport(Lib, EntryPoint = "CSharp_Dali_VisualEventSignal_Empty")]
+        public static extern bool VisualEventSignal_Empty(HandleRef jarg1);
+
+        [DllImport(Lib, EntryPoint = "CSharp_Dali_VisualEventSignal_GetConnectionCount")]
+        public static extern uint VisualEventSignal_GetConnectionCount(HandleRef jarg1);
+
+        [DllImport(Lib, EntryPoint = "CSharp_Dali_VisualEventSignal_Connect")]
+        public static extern void VisualEventSignal_Connect(HandleRef jarg1, HandleRef jarg2);
+
+        [DllImport(Lib, EntryPoint = "CSharp_Dali_VisualEventSignal_Disconnect")]
+        public static extern void VisualEventSignal_Disconnect(HandleRef jarg1, HandleRef jarg2);
+
+        [DllImport(Lib, EntryPoint = "CSharp_Dali_VisualEventSignal_Emit")]
+        public static extern void VisualEventSignal_Emit(HandleRef jarg1, HandleRef jarg2, int jarg3, int jarg4);
+
+        [DllImport(Lib, EntryPoint = "CSharp_Dali_new_VisualEventSignal")]
+        public static extern IntPtr new_VisualEventSignal();
+
+        [DllImport(Lib, EntryPoint = "CSharp_Dali_delete_VisualEventSignal")]
+        public static extern void delete_VisualEventSignal(HandleRef jarg1);
+
+        [DllImport(Lib, EntryPoint = "CSharp_Dali_View_VisualEventSignal")]
+        public static extern IntPtr View_VisaulEventSignal(HandleRef jarg1);
+    }
+}
index a80d61b..cf88bc8 100644 (file)
@@ -29,9 +29,16 @@ internal static partial class Interop
         internal static extern bool eina_hash_add(IntPtr hash, string Key, string Value);
 
         [DllImport(Libraries.Eina)]
-        internal static extern uint eina_list_count(IntPtr list);
+        internal static extern IntPtr eina_list_iterator_new(IntPtr list);
 
         [DllImport(Libraries.Eina)]
-        internal static extern IntPtr eina_list_nth(IntPtr list, uint n);
+        [return: MarshalAs(UnmanagedType.U1)]
+        internal static extern bool eina_iterator_next(IntPtr iterator, out IntPtr data);
+
+        [DllImport(Libraries.Eina)]
+        internal static extern void eina_iterator_free(IntPtr list);
+
+        [DllImport(Libraries.Eina)]
+        internal static extern IntPtr eina_list_free(IntPtr list);
     }
 }
index 49dda74..74f78e9 100644 (file)
@@ -156,15 +156,17 @@ namespace Tizen.WebView
         /// <since_tizen> 6 </since_tizen>
         public IList<BackForwardListItem> BackItems(int limit)
         {
-            IntPtr backList = Interop.ChromiumEwk.ewk_back_forward_list_n_back_items_copy(_list_handle, limit);
+            IntPtr list = Interop.ChromiumEwk.ewk_back_forward_list_n_back_items_copy(_list_handle, limit);
             List<BackForwardListItem> backItemsList = new List<BackForwardListItem>();
 
-            uint count = Interop.Eina.eina_list_count(backList);
-
-            for(uint i=0; i < count; i++) {
-              IntPtr data = Interop.Eina.eina_list_nth(backList, i);
+            var iter = Interop.Eina.eina_list_iterator_new(list);
+            for (IntPtr data; Interop.Eina.eina_iterator_next(iter, out data);) {
               backItemsList.Add(new BackForwardListItem(data));
             }
+
+            Interop.Eina.eina_iterator_free(iter);
+            Interop.Eina.eina_list_free(list);
+
             return backItemsList;
         }
 
@@ -177,15 +179,17 @@ namespace Tizen.WebView
         /// <since_tizen> 6 </since_tizen>
         public IList<BackForwardListItem> ForwardItems(int limit)
         {
-            IntPtr forwardList = Interop.ChromiumEwk.ewk_back_forward_list_n_forward_items_copy(_list_handle, limit);
+            IntPtr list = Interop.ChromiumEwk.ewk_back_forward_list_n_forward_items_copy(_list_handle, limit);
             List<BackForwardListItem> forwardItemsList = new List<BackForwardListItem>();
 
-            uint count = Interop.Eina.eina_list_count(forwardList);
-
-            for(uint i = 0; i < count; i++) {
-              IntPtr data = Interop.Eina.eina_list_nth(forwardList, i);
+            var iter = Interop.Eina.eina_list_iterator_new(list);
+            for (IntPtr data; Interop.Eina.eina_iterator_next(iter, out data);) {
               forwardItemsList.Add(new BackForwardListItem(data));
             }
+
+            Interop.Eina.eina_iterator_free(iter);
+            Interop.Eina.eina_list_free(list);
+
             return forwardItemsList;
         }
     }