--- /dev/null
+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);
+ }
+ }
+}
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_View_ClearBackground")]
public static extern void ClearBackground(global::System.Runtime.InteropServices.HandleRef jarg1);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_View_SetRenderEffect")]
+ public static extern void SetRenderEffect(global::System.Runtime.InteropServices.HandleRef self, global::System.Runtime.InteropServices.HandleRef effectRef);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_View_ClearRenderEffect")]
+ public static extern void ClearRenderEffect(global::System.Runtime.InteropServices.HandleRef self);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_View__SWIG_2")]
public static extern global::System.IntPtr NewViewInternal(global::System.Runtime.InteropServices.HandleRef jarg1);
}
/// <summary>
+ /// Sets render effect to the view. The effect is applied to at most one view.
+ /// </summary>
+ /// <param name="effect">A render effect to set.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void SetRenderEffect(RenderEffect effect)
+ {
+ Interop.View.SetRenderEffect(SwigCPtr, RenderEffect.getCPtr(effect));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Clears render effect.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void ClearRenderEffect()
+ {
+ Interop.View.ClearRenderEffect(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+
+ }
+
+ /// <summary>
/// Shows the view.
/// </summary>
/// <remarks>
--- /dev/null
+/*
+ * 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>
+ [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);
+ }
+ }
+}