instance.UpdateState();
}
- if (instance.IsHighlighted)
+ if (Accessibility.Accessibility.Enabled && instance.IsHighlighted)
{
instance.EmitAccessibilityStatesChangedEvent(AccessibilityStates.Checked, newSelected);
}
{
TextLabel.Text = value;
- if (IsHighlighted && String.IsNullOrEmpty(AccessibilityName) && GetAccessibilityNameSignal().Empty())
+ if (Accessibility.Accessibility.Enabled && IsHighlighted && String.IsNullOrEmpty(AccessibilityName) && GetAccessibilityNameSignal().Empty())
{
EmitAccessibilityEvent(AccessibilityPropertyChangeEvent.Name);
}
SelectIn(indicatorList[selectedIndex]);
- if (IsHighlighted)
+ if (Accessibility.Accessibility.Enabled && IsHighlighted)
{
EmitAccessibilityEvent(AccessibilityPropertyChangeEvent.Value);
}
set
{
SetValue(CurrentValueProperty, value);
- if (IsHighlighted)
+ if (Accessibility.Accessibility.Enabled && IsHighlighted)
{
EmitAccessibilityEvent(AccessibilityPropertyChangeEvent.Value);
}
{
if (info.PreviousState.Contains(ControlState.Selected) != info.CurrentState.Contains(ControlState.Selected))
{
- if (IsHighlighted)
+ if (Accessibility.Accessibility.Enabled && IsHighlighted)
{
EmitAccessibilityStatesChangedEvent(AccessibilityStates.Checked, info.CurrentState.Contains(ControlState.Selected));
}
if (newValue != null)
{
instance.curValue = (float)newValue;
- if (instance.IsHighlighted)
+ if (Accessibility.Accessibility.Enabled && instance.IsHighlighted)
{
instance.EmitAccessibilityEvent(AccessibilityPropertyChangeEvent.Value);
}
private void OnSelect()
{
- if (IsHighlighted)
+ if (Accessibility.Accessibility.Enabled && IsHighlighted)
{
EmitAccessibilityStatesChangedEvent(AccessibilityStates.Checked, IsSelected);
}
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "csharp_dali_accessibility_BridgeDisableAutoInit")]
public static extern void BridgeDisableAutoInit();
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "csharp_dali_accessibility_IsEnabled")]
+ [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
+ public static extern bool IsEnabled();
}
}
}
{
get => accessibility;
}
+
+ /// <summary>
+ /// Flag to check whether the state of Accessibility is enabled or not.
+ /// </summary>
+ /// <remarks>
+ /// Getter returns true if Accessibility is enabled, false otherwise.
+ /// </remarks>
+ /// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static bool Enabled
+ {
+ get
+ {
+ return (bool)Interop.Accessibility.IsEnabled();
+ }
+ }
+
#endregion Property
/// <since_tizen> 3 </since_tizen>
public void Show()
{
- if ((AccessibilityCalculateStates() & AccessibilityStates.Modal) != 0)
+ if (Accessibility.Accessibility.Enabled && ((AccessibilityCalculateStates() & AccessibilityStates.Modal) != 0))
{
RegisterPopup();
}
{
SetVisible(false);
- if ((AccessibilityCalculateStates() & AccessibilityStates.Modal) != 0)
+ if (Accessibility.Accessibility.Enabled && ((AccessibilityCalculateStates() & AccessibilityStates.Modal) != 0))
{
RemovePopup();
}