# IVncFramebufferSource

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-headless-vnc/remote_viewing/vnc/trait-ivncframebuffersource/

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

```rust
trait IVncFramebufferSource: Send + Sync
```

Provides a framebuffer.

A source is called by the threads of the server session, hence `Send`
and `Sync`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/i_vnc_framebuffer_source.rs#L11)

## Members

- [`supports_resizing`](#function-supports_resizing)
- [`capture`](#function-capture)
- [`set_desktop_size`](#function-set_desktop_size)

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

### supports_resizing

```rust
fn supports_resizing(self: &Self) -> bool
```

Gets a value indicating whether the source supports resizing.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/i_vnc_framebuffer_source.rs#L13)

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

### capture

```rust
fn capture(self: &Self) -> Option<Arc<VncFramebuffer>>
```

Called when a framebuffer update is needed. You can use this
opportunity to switch framebuffers if desired.

Returns a framebuffer (`None` stands for the null of the original:
the session keeps the framebuffer it has).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/i_vnc_framebuffer_source.rs#L20)

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

### set_desktop_size

```rust
fn set_desktop_size(self: &Self, width: i32, height: i32) -> ExtendedDesktopSizeStatus
```

Handles a client request to resize the framebuffer to `width` by
`height`.

Returns a value indicating how the source handled the update request.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Headless/FerroUI.Headless.Vnc/remote_viewing/vnc/i_vnc_framebuffer_source.rs#L26)

## Trait implementations

- [`IVncFramebufferSource`](/docs/0.5.0/api/ferroui-headless-vnc/remote_viewing/vnc/trait-ivncframebuffersource/)

## Availability

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