[NUI][AT-SPI] Add AccessibilityHidden property
authorArtur Świgoń <a.swigon@samsung.com>
Mon, 22 Nov 2021 10:17:27 +0000 (11:17 +0100)
committerSeoyeon2Kim <34738918+Seoyeon2Kim@users.noreply.github.com>
Wed, 12 Jan 2022 08:40:18 +0000 (17:40 +0900)
src/Tizen.NUI/src/internal/Interop/Interop.ViewProperty.cs
src/Tizen.NUI/src/public/BaseComponents/ViewAccessibilityProperties.cs
src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs
src/Tizen.NUI/src/public/BaseComponents/ViewEnum.cs

index 076b4dc..9f83f05 100755 (executable)
@@ -89,6 +89,9 @@ namespace Tizen.NUI
 
             [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_View_Property_DISPATCH_KEY_EVENTS_get")]
             public static extern int DispatchKeyEventsGet();
+
+            [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_View_Property_ACCESSIBILITY_HIDDEN_get")]
+            public static extern int AccessibilityHiddenGet();
         }
     }
 }
index 98d6ca1..b738c15 100755 (executable)
@@ -118,6 +118,26 @@ namespace Tizen.NUI.BaseComponents
         }
 
         /// <summary>
+        /// Controls whether the view is hidden from the AT-SPI tree.
+        /// </summary>
+        /// <remarks>
+        /// False by default. Hiding an object means that any AT-SPI clients are not able to see it.
+        /// </remarks>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool AccessibilityHidden
+        {
+            get
+            {
+                return (bool)GetValue(AccessibilityHiddenProperty);
+            }
+            set
+            {
+                SetValue(AccessibilityHiddenProperty, value);
+                NotifyPropertyChanged();
+            }
+        }
+
+        /// <summary>
         /// Gets or sets a value that allows the automation framework to find and interact with this element.
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
index 46e4023..51ff3ec 100755 (executable)
@@ -2057,6 +2057,26 @@ namespace Tizen.NUI.BaseComponents
         });
 
         /// <summary>
+        /// AccessibilityHiddenProperty
+        /// </summary>
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public static readonly BindableProperty AccessibilityHiddenProperty = BindableProperty.Create(nameof(AccessibilityHidden), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
+        {
+            var view = (View)bindable;
+            if (newValue != null)
+            {
+                Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityHidden, new Tizen.NUI.PropertyValue((bool)newValue));
+            }
+        },
+        defaultValueCreator: (bindable) =>
+        {
+            var view = (View)bindable;
+            bool temp = false;
+            Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityHidden).Get(out temp);
+            return temp;
+        });
+
+        /// <summary>
         /// ExcludeLayoutingProperty
         /// </summary>
         [EditorBrowsable(EditorBrowsableState.Never)]
index 53c08dc..9b92756 100755 (executable)
@@ -235,6 +235,7 @@ namespace Tizen.NUI.BaseComponents
             internal static readonly int AccessibilityHighlightable = Interop.ViewProperty.AccessibilityHighlightableGet();
             internal static readonly int AccessibilityAttributes = Interop.ViewProperty.AccessibilityAttributesGet();
             internal static readonly int DispatchKeyEvents = Interop.ViewProperty.DispatchKeyEventsGet();
+            internal static readonly int AccessibilityHidden = Interop.ViewProperty.AccessibilityHiddenGet();
         }
     }
 }