Remove mutual reference at RenderEffect
authorjmm <j0064423.lee@samsung.com>
Fri, 25 Oct 2024 08:01:30 +0000 (17:01 +0900)
committerSangHyeon Jade Lee <dltkdgus1764@gmail.com>
Thu, 31 Oct 2024 08:50:17 +0000 (17:50 +0900)
Signed-off-by: jmm <j0064423.lee@samsung.com>
src/Tizen.NUI/src/internal/Interop/Interop.BackgroundBlurEffect.cs [new file with mode: 0644]
src/Tizen.NUI/src/internal/Interop/Interop.RenderEffect.cs [deleted file]
src/Tizen.NUI/src/public/RenderEffects/RenderEffect.cs [new file with mode: 0644]
src/Tizen.NUI/src/public/Utility/RenderEffect.cs [deleted file]

diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.BackgroundBlurEffect.cs b/src/Tizen.NUI/src/internal/Interop/Interop.BackgroundBlurEffect.cs
new file mode 100644 (file)
index 0000000..1715ae0
--- /dev/null
@@ -0,0 +1,11 @@
+namespace Tizen.NUI
+{
+    internal static partial class Interop
+    {
+        internal static partial class BackgroundBlurEffect
+        {
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_BackgroundBlurEffect_New__SWIG_1")]
+            public static extern global::System.IntPtr New(uint pixelRadius);
+        }
+    }
+}
diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.RenderEffect.cs b/src/Tizen.NUI/src/internal/Interop/Interop.RenderEffect.cs
deleted file mode 100644 (file)
index 6165073..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-namespace Tizen.NUI
-{
-    internal static partial class Interop
-    {
-        internal static partial class BackgroundBlurEffect
-        {
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_BackgroundBlurEffect_New__SWIG_0")]
-            public static extern global::System.IntPtr New();
-
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_BackgroundBlurEffect_New__SWIG_1")]
-            public static extern global::System.IntPtr New(uint pixelRadius);
-
-            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_BackgroundBlurEffect")]
-            public static extern void Delete(global::System.Runtime.InteropServices.HandleRef self);
-        }
-    }
-}
diff --git a/src/Tizen.NUI/src/public/RenderEffects/RenderEffect.cs b/src/Tizen.NUI/src/public/RenderEffects/RenderEffect.cs
new file mode 100644 (file)
index 0000000..f45a9b2
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright(c) 2024 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.
+ *
+ */
+using System.ComponentModel;
+using System;
+
+namespace Tizen.NUI
+{
+    /// <summary>
+    /// View's optional render effect.
+    /// Applications can apply RenderEffect as the example below :
+    /// <code>
+    ///
+    /// view.SetRenderEffect(RenderEffect.CreateBackgroundBlurEffect(20));
+    /// view.ClearRenderEffect();
+    ///
+    /// </code>
+    /// Note that a view owns at most one render effect.
+    /// </summary>
+    [EditorBrowsable(EditorBrowsableState.Never)]
+    public class RenderEffect : BaseHandle
+    {
+        internal RenderEffect(global::System.IntPtr cPtr) : base(cPtr)
+        {
+        }
+
+        /// <summary>
+        /// Create a background blur effect
+        /// </summary>
+        /// <remarks>
+        /// Created RenderEffect is immutable.
+        /// </remarks>
+        /// <param name="blurRadius">The blur radius value. The unit is pixel for standard cases.</param>
+        /// <returns>Background blur effect with given blur radius.</returns>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static RenderEffect CreateBackgroundBlurEffect(float blurRadius)
+        {
+            return new RenderEffect(Interop.BackgroundBlurEffect.New((uint)Math.Round(blurRadius, 0)));
+        }
+    }
+}
diff --git a/src/Tizen.NUI/src/public/Utility/RenderEffect.cs b/src/Tizen.NUI/src/public/Utility/RenderEffect.cs
deleted file mode 100644 (file)
index cd409bd..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright(c) 2024 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.
- *
- */
-using System.ComponentModel;
-using System;
-
-namespace Tizen.NUI
-{
-    /// <summary>
-    /// View's optional render effect.
-    /// Applications can apply RenderEffect as the example below :
-    /// <code>
-    /// 
-    /// RenderEffect effect = RenderEffect.CreateBackgroundBlurEffect(20.0f);
-    ///
-    /// view.SetRenderEffect(effect);
-    /// view.ClearRenderEffect();
-    ///
-    /// </code>
-    /// Note that a view owns at most one render effect.
-    /// </summary>
-    [EditorBrowsable(EditorBrowsableState.Never)]
-    public class RenderEffect : BaseHandle
-    {
-        internal RenderEffect(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
-        {
-        }
-
-        /// <summary>
-        /// Create a background blur effect
-        /// </summary>
-        /// <remarks>
-        /// Created RenderEffect is immutable.
-        /// </remarks>
-        /// <param name="blurRadius">The blur radius value. The unit is pixel for standard cases.</param>
-        /// <returns>Background blur effect with given blur radius.</returns>
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        public static RenderEffect CreateBackgroundBlurEffect(float blurRadius)
-        {
-            return new BackgroundBlurEffect((uint)Math.Round(blurRadius, 0));
-        }
-    }
-
-
-    /// <summary>
-    /// Applications can create BackgroundBlurEffect as :
-    /// <code>
-    /// RenderEffect.CreateBackgroundBlurEffect(blurRadius);
-    /// </code>
-    /// </summary>
-    [EditorBrowsable(EditorBrowsableState.Never)]
-    sealed class BackgroundBlurEffect : RenderEffect
-    {
-        /// <summary>
-        /// Create a BackgroundBlurEffect.
-        /// The default values are:
-        ///     uint  blurRadius = 5;
-        /// </summary>
-        internal BackgroundBlurEffect() : this(Interop.BackgroundBlurEffect.New(), true)
-        {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        /// <summary>
-        /// Create a BackgroundBlurEffect.
-        /// </summary>
-        /// <param name="blurRadius">Size of gaussian kernel, determines blur intensity.</param>
-        internal BackgroundBlurEffect(uint blurRadius) : this(Interop.BackgroundBlurEffect.New(blurRadius), true)
-        {
-            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-        }
-
-        internal BackgroundBlurEffect(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
-        {
-        }
-
-        /// This will not be public opened.
-        [EditorBrowsable(EditorBrowsableState.Never)]
-        protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
-        {
-            Interop.BackgroundBlurEffect.Delete(swigCPtr);
-        }
-    }
-}