# RendererHost

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-media-controls/struct-rendererhost/

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

```rust
struct RendererHost
```

A normal composition control which schedules a client-owned renderer. Input
mailboxes borrow already-acquired frames; this control never opens a source.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Controls/renderer_host.rs#L86)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`schedule_property`](#function-schedule_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`schedule`](#function-schedule)
- [`set_schedule`](#function-set_schedule)
- [`errors`](#function-errors)
- [`set_renderer`](#function-set_renderer)
- [`set_renderer_factory`](#function-set_renderer_factory)
- [`output`](#function-output)
- [`set_inputs`](#function-set_inputs)
- [`invalidate_renderer`](#function-invalidate_renderer)
- [`viewport_point`](#function-viewport_point)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Controls/renderer_host.rs#L107)

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<RendererHost>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Controls/renderer_host.rs#L107)

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

### schedule_property

```rust
fn schedule_property() -> &'static StyledProperty<RenderSchedule>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Controls/renderer_host.rs#L119)

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

### construct

```rust
fn construct() -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Controls/renderer_host.rs#L203)

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

### new

```rust
fn new() -> Ref<Self>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Controls/renderer_host.rs#L226)

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

### schedule

```rust
fn schedule(self: &Self) -> RenderSchedule
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Controls/renderer_host.rs#L229)

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

### set_schedule

```rust
fn set_schedule(self: &Self, value: RenderSchedule)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Controls/renderer_host.rs#L232)

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

### errors

```rust
fn errors(self: &Self) -> MediaEvent<MediaError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Controls/renderer_host.rs#L235)

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

### set_renderer

```rust
fn set_renderer(self: &Self, renderer: Option<Rc<dyn TextureRenderer>>, source: u64, importer: Option<Rc<dyn TextureFrameImporter>>)
```

The renderer's output identity must use source and the viewport's
generation. The framework does not own its scenes or rendering library.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Controls/renderer_host.rs#L240)

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

### set_renderer_factory

```rust
fn set_renderer_factory(self: &Self, factory: Option<Rc<dyn Fn(&dyn ICompositionGpuInterop, u64) -> Result<(std::rc::Rc<dyn TextureRenderer>, std::rc::Rc<dyn TextureFrameImporter>), ferroui_media::MediaError>>>)
```

Enables recreation after context loss. Scene and pipeline recreation
remain client code; source inputs and scheduling remain on this host.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Controls/renderer_host.rs#L271)

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

### output

```rust
fn output(self: &Self) -> Option<Arc<FrameMailbox>>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Controls/renderer_host.rs#L366)

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

### set_inputs

```rust
fn set_inputs(self: &Self, inputs: Vec<Arc<FrameMailbox>>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Controls/renderer_host.rs#L369)

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

### invalidate_renderer

```rust
fn invalidate_renderer(self: &Self)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Controls/renderer_host.rs#L378)

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

### viewport_point

```rust
fn viewport_point(self: &Self, point: Point) -> Option<Point>
```

Map local pointer coordinates after normal control transforms. The
caller subscribes to ordinary routed input and owns hit testing.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Media.Controls/renderer_host.rs#L387)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- [`InputElementImplExt`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimplext/)
- [`InteractiveImplExt`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimplext/)
- [`LayoutableImplExt`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- [`VisualImplExt`](/docs/0.5.0/api/ferroui-base/trait-visualimplext/)
- `ErasedDestructor`
- `IntoEither`
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- [`PanelImplExt`](/docs/0.5.0/api/ferroui-controls/trait-panelimplext/)
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<RendererHost>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`PanelImpl`](/docs/0.5.0/api/ferroui-controls/trait-panelimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- `Drop`

## Availability

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