Browse Source
For some reason, on win32 embedded `IRawElementProviderFragmentRoot`s just don't show up, so we need an interface to distinguish between "actual" root peers and "embedded" root peers. Ideally `IRootProvider` and `IEmbeddedRootProvider` would share a common interface but that would be a breaking change.pull/12330/head
5 changed files with 108 additions and 69 deletions
@ -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; |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue