Skip to content

Commit

Permalink
Initial implementation of UI automation.
Browse files Browse the repository at this point in the history
Follows WPF/UWP API as closely as possible. Limited to win32 right now. Broken in many places.
  • Loading branch information
grokys committed Mar 9, 2021
1 parent 8b34cd3 commit 2a44d8b
Show file tree
Hide file tree
Showing 111 changed files with 4,649 additions and 33 deletions.
28 changes: 28 additions & 0 deletions src/Avalonia.Controls/Automation/AutomationElementIdentifiers.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Avalonia.Automation.Peers;

namespace Avalonia.Automation
{
/// <summary>
/// Contains values used as automation property identifiers by UI Automation providers.
/// </summary>
public static class AutomationElementIdentifiers
{
/// <summary>
/// Identifies the bounding rectangle automation property. The bounding rectangle property
/// value is returned by the <see cref="AutomationPeer.GetBoundingRectangle"/> method.
/// </summary>
public static AutomationProperty BoundingRectangleProperty { get; } = new();

/// <summary>
/// Identifies the class name automation property. The class name property value is returned
/// by the <see cref="AutomationPeer.GetClassName"/> method.
/// </summary>
public static AutomationProperty ClassNameProperty { get; } = new();

/// <summary>
/// Identifies the name automation property. The class name property value is returned
/// by the <see cref="AutomationPeer.GetName"/> method.
/// </summary>
public static AutomationProperty NameProperty { get; } = new();
}
}
28 changes: 28 additions & 0 deletions src/Avalonia.Controls/Automation/AutomationLiveSetting.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
namespace Avalonia.Automation
{
/// <summary>
/// Describes the notification characteristics of a particular live region
/// </summary>
public enum AutomationLiveSetting
{
/// <summary>
/// The element does not send notifications if the content of the live region has changed.
/// </summary>
Off = 0,

/// <summary>
/// The element sends non-interruptive notifications if the content of the live region has
/// changed. With this setting, UI Automation clients and assistive technologies are expected
/// to not interrupt the user to inform of changes to the live region.
/// </summary>
Polite = 1,

/// <summary>
/// The element sends interruptive notifications if the content of the live region has changed.
/// With this setting, UI Automation clients and assistive technologies are expected to interrupt
/// the user to inform of changes to the live region.
/// </summary>
Assertive = 2,
}
}

Loading

0 comments on commit 2a44d8b

Please sign in to comment.