[NUI] Change all CallingConvention to `Cdecl`
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / VideoView.cs
index 669494c..d54c56c 100755 (executable)
@@ -154,19 +154,6 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
-        /// Hidden API (Inhouse API).
-        /// Using Uri class to provide safe sevice and secure API.
-        /// Creates an initialized VideoView.
-        /// If the string is empty, VideoView will not display anything.
-        /// </summary>
-        /// <param name="uri">The URI of the video resource to display.</param>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public VideoView(Uri uri) : this(Interop.VideoView.New((uri == null) ? String.Empty : uri.AbsoluteUri), true)
-        {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        /// <summary>
         /// Creates an initialized VideoView.<br />
         /// If the string is empty, VideoView will not display anything.<br />
         /// </summary>
@@ -191,7 +178,7 @@ namespace Tizen.NUI.BaseComponents
 
         /// <summary>
         /// Hidden API (Inhouse API).
-        /// Using Uri class to provide safe sevice and secure API.
+        /// Using Uri class to provide safe service and secure API.
         /// Creates an initialized VideoView.
         /// If the string is empty, VideoView will not display anything.
         /// </summary>
@@ -212,7 +199,7 @@ namespace Tizen.NUI.BaseComponents
         {
         }
 
-        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
+        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
         private delegate void FinishedCallbackDelegate(IntPtr data);
 
         /// <summary>
@@ -396,6 +383,31 @@ namespace Tizen.NUI.BaseComponents
             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
         }
 
+        /// <summary>
+        /// Get native player handle.
+        /// <example>
+        /// How to get native player handle
+        /// <code>
+        /// VideoView videoView = new VideoView();
+        /// videoView.ResourceUrl = "some video path";
+        /// var handle = videoView.NativeHandle;
+        /// if(handle.IsInvalid == false)
+        /// {
+        ///     IntPtr nativeHandle = handle.DangerousGetHandle();
+        ///     // do something with nativeHandle
+        /// }
+        /// </code>
+        /// </example>
+        /// </summary>
+        /// <since_tizen> 9 </since_tizen>
+        public SafeHandle NativeHandle
+        {
+            get
+            {
+                return new NUI.SafeNativePlayerHandle(this);
+            }
+        }
+
         internal VideoViewSignal FinishedSignal()
         {
             VideoViewSignal ret = new VideoViewSignal(Interop.VideoView.FinishedSignal(SwigCPtr), false);
@@ -403,11 +415,6 @@ namespace Tizen.NUI.BaseComponents
             return ret;
         }
 
-        internal static global::System.Runtime.InteropServices.HandleRef getCPtr(VideoView obj)
-        {
-            return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.SwigCPtr;
-        }
-
         /// <summary>
         /// Dispose.
         /// </summary>
@@ -499,10 +506,11 @@ namespace Tizen.NUI.BaseComponents
     /// Contains and encapsulates Native Player handle.
     /// </summary>
     [EditorBrowsable(EditorBrowsableState.Never)]
+    [Obsolete("This has been deprecated in API9 and will be removed in API11. Use VideoView.NativeHandle instead.")]
     public class SafeNativePlayerHandle : SafeHandle
     {
         /// <summary>
-        /// Contructor, null handle is set.
+        /// Constructor, null handle is set.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public SafeNativePlayerHandle() : base(global::System.IntPtr.Zero, false)
@@ -510,7 +518,7 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
-        /// Contructor, Native player handle is set to handle.
+        /// Constructor, Native player handle is set to handle.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
         public SafeNativePlayerHandle(VideoView videoView) : base(global::System.IntPtr.Zero, false)