# Win32PlatformOptions

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-win32/struct-win32platformoptions/

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

```rust
struct Win32PlatformOptions
```

Platform-specific options which apply to Windows.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Windows/FerroUI.Win32/win32_platform_options.rs#L77)

## Members

- [`overlay_popups`](#struct_field-overlay_popups)
- [`rendering_mode`](#struct_field-rendering_mode)
- [`composition_mode`](#struct_field-composition_mode)
- [`win_ui_composition_backdrop_corner_radius`](#struct_field-win_ui_composition_backdrop_corner_radius)
- [`should_render_on_ui_thread`](#struct_field-should_render_on_ui_thread)
- [`wgl_profiles`](#struct_field-wgl_profiles)
- [`custom_platform_graphics`](#struct_field-custom_platform_graphics)
- [`dpi_awareness`](#struct_field-dpi_awareness)
- [`graphics_adapter_selection_callback`](#struct_field-graphics_adapter_selection_callback)

<a id="struct_field-overlay_popups"></a>

### overlay_popups

```rust
overlay_popups: bool
```

Embeds popups to the window when set to true. The default value is
false.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Windows/FerroUI.Win32/win32_platform_options.rs#L80)

<a id="struct_field-rendering_mode"></a>

### rendering_mode

```rust
rendering_mode: Vec<Win32RenderingMode>
```

Gets or sets Win32 rendering mode priority. The first available mode
is used; the default is ANGLE EGL with a software fallback.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Windows/FerroUI.Win32/win32_platform_options.rs#L84)

<a id="struct_field-composition_mode"></a>

### composition_mode

```rust
composition_mode: Vec<Win32CompositionMode>
```

Gets or sets Win32 composition mode priority. The first available
mode is used.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Windows/FerroUI.Win32/win32_platform_options.rs#L88)

<a id="struct_field-win_ui_composition_backdrop_corner_radius"></a>

### win_ui_composition_backdrop_corner_radius

```rust
win_ui_composition_backdrop_corner_radius: Option<f32>
```

When `composition_mode` is set to
`Win32CompositionMode::WinUIComposition`, create rounded corner
blur brushes. If set to `None` the brushes will be created using
default settings (sharp corners).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Windows/FerroUI.Win32/win32_platform_options.rs#L94)

<a id="struct_field-should_render_on_ui_thread"></a>

### should_render_on_ui_thread

```rust
should_render_on_ui_thread: bool
```

Render directly on the UI thread instead of using a dedicated render
thread. This can be usable if your device don't have multiple cores
to begin with. This setting is false by default.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Windows/FerroUI.Win32/win32_platform_options.rs#L99)

<a id="struct_field-wgl_profiles"></a>

### wgl_profiles

```rust
wgl_profiles: Vec<ferroui_opengl::GlVersion>
```

Windows OpenGL profiles used when
`rendering_mode` is set to
`Win32RenderingMode::Wgl`. This setting is 4.0 and 3.2 by default.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Windows/FerroUI.Win32/win32_platform_options.rs#L104)

<a id="struct_field-custom_platform_graphics"></a>

### custom_platform_graphics

```rust
custom_platform_graphics: Option<std::sync::Arc<dyn IPlatformGraphics>>
```

Provides a way to use a custom-implemented graphics context such as
a custom ISkiaGpu. When this property is set,
`rendering_mode` is ignored and
`composition_mode` only accepts null or
`Win32CompositionMode::RedirectionSurface`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Windows/FerroUI.Win32/win32_platform_options.rs#L111)

<a id="struct_field-dpi_awareness"></a>

### dpi_awareness

```rust
dpi_awareness: Win32DpiAwareness
```

Gets or sets the application's DPI awareness.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Windows/FerroUI.Win32/win32_platform_options.rs#L114)

<a id="struct_field-graphics_adapter_selection_callback"></a>

### graphics_adapter_selection_callback

```rust
graphics_adapter_selection_callback: Option<std::rc::Rc<dyn Fn(&[ferroui_base::platform::PlatformGraphicsDeviceAdapterDescription]) -> i32>>
```

Provides a callback to select a graphics adapter (with the DirectX
and Vulkan rendering modes).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/Windows/FerroUI.Win32/win32_platform_options.rs#L118)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `IUnknownImpl`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Default`

## Availability

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