-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12330 from AvaloniaUI/feature/embedded-automation…
…-roots Allow embedded root automation peers.
- Loading branch information
Showing
12 changed files
with
247 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/Avalonia.Controls/Automation/Provider/IEmbeddedRootProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using Avalonia.Automation.Peers; | ||
|
||
namespace Avalonia.Automation.Provider | ||
{ | ||
/// <summary> | ||
/// Exposure methods and properties to support UI Automation client access to the root of an | ||
/// automation tree hosted by another UI framework. | ||
/// </summary> | ||
/// <remarks> | ||
/// This interface is implemented by the <see cref="AutomationPeer"/> class, and can be used | ||
/// to embed an automation tree from a 3rd party UI framework that wishes to use Avalonia's | ||
/// automation support. | ||
/// </remarks> | ||
public interface IEmbeddedRootProvider | ||
{ | ||
/// <summary> | ||
/// Gets the currently focused element. | ||
/// </summary> | ||
AutomationPeer? GetFocus(); | ||
|
||
/// <summary> | ||
/// Gets the element at the specified point, expressed in top-level coordinates. | ||
/// </summary> | ||
/// <param name="p">The point.</param> | ||
AutomationPeer? GetPeerFromPoint(Point p); | ||
|
||
/// <summary> | ||
/// Raised by the automation peer when the focus changes. | ||
/// </summary> | ||
event EventHandler? FocusChanged; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.