[NUI] Support Blend Equaiton
authorseungho <sbsh.baek@samsung.com>
Mon, 9 Nov 2020 09:09:28 +0000 (18:09 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 1 Dec 2020 08:56:39 +0000 (17:56 +0900)
Signed-off-by: seungho <sbsh.baek@samsung.com>
src/Tizen.NUI/src/internal/Interop/Interop.ActorProperty.cs
src/Tizen.NUI/src/internal/Interop/Interop.GraphicsCapabilities.cs [new file with mode: 0644]
src/Tizen.NUI/src/public/BaseComponents/View.cs
src/Tizen.NUI/src/public/BaseComponents/ViewEnum.cs
src/Tizen.NUI/src/public/BlendEquationType.cs [new file with mode: 0644]
src/Tizen.NUI/src/public/Utility/GraphicsCapabilities.cs [moved from src/Tizen.NUI/src/internal/BlendEquationType.cs with 52% similarity, mode: 0644]

index ec56de3..c3cd0ea 100755 (executable)
@@ -188,6 +188,9 @@ namespace Tizen.NUI
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Actor_Property_CAPTURE_ALL_TOUCH_AFTER_START_get")]
             public static extern int ActorPropertyCaptureAllTouchAfterStartGet();
 
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Actor_Property_BLEND_EQUATION_get")]
+            public static extern int ActorPropertyBlendEquationGet();
+
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_new_Actor_Property")]
             public static extern global::System.IntPtr new_Actor_Property();
 
diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.GraphicsCapabilities.cs b/src/Tizen.NUI/src/internal/Interop/Interop.GraphicsCapabilities.cs
new file mode 100644 (file)
index 0000000..bd67fd8
--- /dev/null
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Tizen.NUI
+{
+    internal static partial class Interop
+    {
+        internal static partial class GraphicsCapabilities
+        {
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_IsBlendEquationSupported")]
+            public static extern bool IsBlendEquationSupported(int blendEquation);
+        }
+    }
+}
\ No newline at end of file
index ec44f55..ea8cae1 100755 (executable)
@@ -2348,6 +2348,27 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
+        /// Determines which blend equation will be used to render renderers of this actor.
+        /// </summary>
+        /// <returns>blend equation enum currently assigned</returns>
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public BlendEquationType BlendEquation
+        {
+            get
+            {
+                int temp = 0;
+                GetProperty(View.Property.BlendEquation).Get(out temp);
+                return (BlendEquationType)temp;
+            }
+            set
+            {
+                SetProperty(View.Property.BlendEquation, new Tizen.NUI.PropertyValue((int)value));
+                NotifyPropertyChanged();
+            }
+        }
+
+        /// <summary>
         /// If the value is true, the View will change its style as the theme changes.
         /// It is false by default, but turned to true when setting StyleName (by setting property or using specified constructor).
         /// </summary>
index c21b4be..b8e4477 100755 (executable)
@@ -208,6 +208,7 @@ namespace Tizen.NUI.BaseComponents
             internal static readonly int PADDING = Interop.ViewProperty.View_Property_PADDING_get();
             internal static readonly int SHADOW = Interop.ViewProperty.View_Property_SHADOW_get();
             internal static readonly int CaptureAllTouchAfterStart = Interop.ActorProperty.ActorPropertyCaptureAllTouchAfterStartGet();
+            internal static readonly int BlendEquation = Interop.ActorProperty.ActorPropertyBlendEquationGet();
         }
     }
 }
diff --git a/src/Tizen.NUI/src/public/BlendEquationType.cs b/src/Tizen.NUI/src/public/BlendEquationType.cs
new file mode 100644 (file)
index 0000000..d88b1ff
--- /dev/null
@@ -0,0 +1,90 @@
+/*
+ * Copyright(c) 2020 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;
+
+namespace Tizen.NUI
+{
+    /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+    [EditorBrowsable (EditorBrowsableState.Never)]
+    public enum BlendEquationType
+    {
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        Add = 0x8006,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        Subtract = 0x800A,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        ReverseSubtract = 0x800B,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        Min = 0x8007,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        Max = 0x8008,
+
+        //Advanced Blend Equation
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        Multiply = 0x9294,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        Screen = 0x9295,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        Overlay = 0x9296,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        Darken = 0x9297,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        Lighten = 0x9298,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        ColorDodge = 0x9299,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        ColorBurn = 0x929A,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        HardLight = 0x929B,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        SoftLight = 0x929C,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        Difference = 0x929E,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        Exclusion = 0x92A0,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        Hue = 0x92AD,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        Saturation = 0x92AE,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        Color = 0x92AF,
+        /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        Luminosity = 0x92B0
+
+    }
+}
old mode 100755 (executable)
new mode 100644 (file)
similarity index 52%
rename from src/Tizen.NUI/src/internal/BlendEquationType.cs
rename to src/Tizen.NUI/src/public/Utility/GraphicsCapabilities.cs
index cf6e4e4..e3b59e5
@@ -1,5 +1,5 @@
 /*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2020 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.
  * limitations under the License.
  *
  */
+using System.ComponentModel;
 
 namespace Tizen.NUI
 {
-    internal enum BlendEquationType
+    /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+    [EditorBrowsable (EditorBrowsableState.Never)]
+    public class GraphicsCapabilities
     {
-        ADD = 0x8006,
-        SUBTRACT = 0x800A,
-        REVERSE_SUBTRACT = 0x800B
+        [EditorBrowsable (EditorBrowsableState.Never)]
+        public static bool IsBlendEquationSupported(BlendEquationType blendEquation)
+        {
+          return Interop.GraphicsCapabilities.IsBlendEquationSupported((int)blendEquation);
+        }
     }
-}
+}
\ No newline at end of file