# IEmbeddedRootProvider

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/automation/provider/trait-iembeddedrootprovider/

**trait** · [`ferroui-controls`](/docs/0.5.0/api/ferroui-controls/) · v0.5.0

```rust
trait IEmbeddedRootProvider
```

Exposes methods and properties to support UI Automation client access to the root of an
automation tree hosted by another UI framework.

This contract can be implemented on custom automation peers to allow them to be embedded
in another automation tree.

Private API: for use by the platform backends.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_embedded_root_provider.rs#L14)

## Members

- [`peer`](#function-peer)
- [`get_focus`](#function-get_focus)
- [`get_peer_from_point`](#function-get_peer_from_point)
- [`focus_changed`](#function-focus_changed)

<a id="function-peer"></a>

### peer

```rust
fn peer(self: &Self) -> Ref<AutomationPeer>
```

The automation peer that provides this contract.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_embedded_root_provider.rs#L16)

<a id="function-get_focus"></a>

### get_focus

```rust
fn get_focus(self: &Self) -> Option<Ref<AutomationPeer>>
```

Gets the currently focused element.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_embedded_root_provider.rs#L19)

<a id="function-get_peer_from_point"></a>

### get_peer_from_point

```rust
fn get_peer_from_point(self: &Self, p: Point) -> Option<Ref<AutomationPeer>>
```

Gets the element at the specified point, expressed in top-level coordinates.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_embedded_root_provider.rs#L22)

<a id="function-focus_changed"></a>

### focus_changed

```rust
fn focus_changed(self: &Self, handler: Rc<dyn Fn() -> ()>) -> Rc<dyn IDisposable>
```

Raised by the automation peer when the focus changes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/i_embedded_root_provider.rs#L25)

## Trait implementations

- [`IEmbeddedRootProvider`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-iembeddedrootprovider/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
