We do not have to same job calculating states.
This patch sets make the View use DALi states.
If there is NUI specific state, then it will be overwritten.
/// Informs AT-SPI bridge about the set of AT-SPI states associated with this object.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- protected override AccessibilityStates AccessibilityCalculateStates()
+ protected override AccessibilityStates AccessibilityCalculateStates(ulong states)
{
- var states = base.AccessibilityCalculateStates();
- FlagSetter(ref states, AccessibilityStates.Modal, true);
- return states;
+ var accessibilityStates = base.AccessibilityCalculateStates(states);
+ FlagSetter(ref accessibilityStates, AccessibilityStates.Modal, true);
+ return accessibilityStates;
}
/// Calculates current states for the button<br />
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- protected override AccessibilityStates AccessibilityCalculateStates()
+ protected override AccessibilityStates AccessibilityCalculateStates(ulong states)
{
- var states = base.AccessibilityCalculateStates();
- FlagSetter(ref states, AccessibilityStates.Checked, this.IsSelected);
- FlagSetter(ref states, AccessibilityStates.Enabled, this.IsEnabled);
- return states;
+ var accessibilityStates = base.AccessibilityCalculateStates(states);
+ FlagSetter(ref accessibilityStates, AccessibilityStates.Checked, this.IsSelected);
+ FlagSetter(ref accessibilityStates, AccessibilityStates.Enabled, this.IsEnabled);
+ return accessibilityStates;
}
/// <summary>
/// Informs AT-SPI bridge about the set of AT-SPI states associated with this object.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- protected override AccessibilityStates AccessibilityCalculateStates()
+ protected override AccessibilityStates AccessibilityCalculateStates(ulong states)
{
- var states = base.AccessibilityCalculateStates();
- FlagSetter(ref states, AccessibilityStates.Modal, true);
- return states;
+ var accessibilityStates = base.AccessibilityCalculateStates(states);
+ FlagSetter(ref accessibilityStates, AccessibilityStates.Modal, true);
+ return accessibilityStates;
}
private void OnRelayout(object sender, EventArgs e)
/// Informs AT-SPI bridge about the set of AT-SPI states associated with this object.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- protected override AccessibilityStates AccessibilityCalculateStates()
+ protected override AccessibilityStates AccessibilityCalculateStates(ulong states)
{
- var states = base.AccessibilityCalculateStates();
- FlagSetter(ref states, AccessibilityStates.Modal, true);
- return states;
+ var accessibilityStates = base.AccessibilityCalculateStates(states);
+ FlagSetter(ref accessibilityStates, AccessibilityStates.Modal, true);
+ return accessibilityStates;
}
private void UpdateView()
/// Informs AT-SPI bridge about the set of AT-SPI states associated with this object.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- protected override AccessibilityStates AccessibilityCalculateStates()
+ protected override AccessibilityStates AccessibilityCalculateStates(ulong states)
{
- var states = base.AccessibilityCalculateStates();
- FlagSetter(ref states, AccessibilityStates.Checked, this.IsSelected);
- return states;
+ var accessibilityStates = base.AccessibilityCalculateStates(states);
+ FlagSetter(ref accessibilityStates, AccessibilityStates.Checked, this.IsSelected);
+ return accessibilityStates;
}
/// <summary>
public AccessibilityDoAction DoAction; // 3
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
- public delegate IntPtr AccessibilityCalculateStates();
+ public delegate IntPtr AccessibilityCalculateStates(ulong states);
[EditorBrowsable(EditorBrowsableState.Never)]
public AccessibilityCalculateStates CalculateStates; // 4
GetName = () => DuplicateString(AccessibilityGetName()),
GetDescription = () => DuplicateString(AccessibilityGetDescription()),
DoAction = (name) => AccessibilityDoAction(Marshal.PtrToStringAnsi(name)),
- CalculateStates = () => DuplicateStates(AccessibilityCalculateStates()),
+ CalculateStates = (states) => DuplicateStates(AccessibilityCalculateStates(states)),
GetActionCount = () => AccessibilityGetActionCount(),
GetActionName = (index) => DuplicateString(AccessibilityGetActionName(index)),
ShouldReportZeroChildren = () => AccessibilityShouldReportZeroChildren(),
}
[EditorBrowsable(EditorBrowsableState.Never)]
- protected virtual AccessibilityStates AccessibilityCalculateStates()
+ protected virtual AccessibilityStates AccessibilityCalculateStates(ulong states)
{
- AccessibilityStates states = 0;
+ AccessibilityStates _states = (AccessibilityStates)states;
- FlagSetter(ref states, AccessibilityStates.Highlightable, this.AccessibilityHighlightable);
- FlagSetter(ref states, AccessibilityStates.Focusable, this.Focusable);
- FlagSetter(ref states, AccessibilityStates.Focused, this.State == States.Focused);
- FlagSetter(ref states, AccessibilityStates.Highlighted, this.IsHighlighted);
- FlagSetter(ref states, AccessibilityStates.Enabled, this.State != States.Disabled);
- FlagSetter(ref states, AccessibilityStates.Sensitive, this.Sensitive);
- FlagSetter(ref states, AccessibilityStates.Visible, true);
- FlagSetter(ref states, AccessibilityStates.Showing, this.Visibility);
- FlagSetter(ref states, AccessibilityStates.Defunct, !this.IsOnWindow);
+ FlagSetter(ref _states, AccessibilityStates.Highlightable, this.AccessibilityHighlightable);
+ FlagSetter(ref _states, AccessibilityStates.Focusable, this.Focusable);
+ FlagSetter(ref _states, AccessibilityStates.Focused, this.State == States.Focused);
+ FlagSetter(ref _states, AccessibilityStates.Highlighted, this.IsHighlighted);
+ FlagSetter(ref _states, AccessibilityStates.Enabled, this.State != States.Disabled);
+ FlagSetter(ref _states, AccessibilityStates.Sensitive, this.Sensitive);
+ FlagSetter(ref _states, AccessibilityStates.Visible, true);
+ FlagSetter(ref _states, AccessibilityStates.Defunct, !this.IsOnWindow);
- return states;
+ return _states;
}
[EditorBrowsable(EditorBrowsableState.Never)]
/// <since_tizen> 3 </since_tizen>
public void Show()
{
- if (Accessibility.Accessibility.Enabled && ((AccessibilityCalculateStates() & AccessibilityStates.Modal) != 0))
+ if (Accessibility.Accessibility.Enabled && ((GetAccessibilityStates() & AccessibilityStates.Modal) != 0))
{
RegisterPopup();
}
{
SetVisible(false);
- if (Accessibility.Accessibility.Enabled && ((AccessibilityCalculateStates() & AccessibilityStates.Modal) != 0))
+ if (Accessibility.Accessibility.Enabled && ((GetAccessibilityStates() & AccessibilityStates.Modal) != 0))
{
RemovePopup();
}