[NUI] Add GenerateUrl in Capture
authorsunghyun kim <scholb.kim@samsung.com>
Thu, 15 Feb 2024 08:01:10 +0000 (17:01 +0900)
committerEunki Hong <h.pichulia@gmail.com>
Fri, 16 Feb 2024 06:40:55 +0000 (15:40 +0900)
Add GenerateUrl in capture.
this api for using capture.

related patches:
https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-adaptor/+/306064/
https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-toolkit/+/306066/
https://review.tizen.org/gerrit/#/c/platform/core/uifw/dali-csharp-binder/+/306067/

src/Tizen.NUI/src/internal/Interop/Interop.Capture.cs
src/Tizen.NUI/src/public/Utility/Capture.cs

index 8c23fe7..6896b96 100644 (file)
@@ -86,7 +86,7 @@ namespace Tizen.NUI
             public static extern IntPtr GetNativeImageSourcePtr(HandleRef jarg1);
 
             [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Capture_GenerateUrl")]
-            public static extern IntPtr GenerateUrl(HandleRef capture);
+            public static extern IntPtr GenerateUrl(global::System.IntPtr handle);
 
             [DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Capture_GetCapturedBuffer")]
             public static extern IntPtr GetCapturedBuffer(HandleRef capture);
index f944196..3807290 100755 (executable)
@@ -343,6 +343,17 @@ namespace Tizen.NUI
         {
             return new PixelBuffer(Interop.Capture.GetCapturedBuffer(SwigCPtr), true);
         }
+
+        /// <summary>
+        /// Generate captured image's Url
+        /// </summary>
+        /// <returns>The ImageUrl representing this captured image source</returns>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public ImageUrl GenerateUrl()
+        {
+            ImageUrl ret = new ImageUrl(Interop.Capture.GenerateUrl(this.SwigCPtr.Handle), true);
+            return ret;
+        }
     }
 
     /// <summary>