# IPlatformSettings

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/platform/trait-iplatformsettings/

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

```rust
trait IPlatformSettings
```

A platform-specific settings contract.

This interface is not meant to be implemented by applications.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/i_platform_settings.rs#L12)

## Members

- [`get_tap_size`](#function-get_tap_size)
- [`get_double_tap_size`](#function-get_double_tap_size)
- [`get_double_tap_time`](#function-get_double_tap_time)
- [`hold_wait_duration`](#function-hold_wait_duration)
- [`hotkey_configuration`](#function-hotkey_configuration)
- [`preferred_application_language`](#function-preferred_application_language)
- [`animations_enabled`](#function-animations_enabled)
- [`transparency_enabled`](#function-transparency_enabled)
- [`accessibility_settings_changed`](#function-accessibility_settings_changed)
- [`get_color_values`](#function-get_color_values)
- [`color_values_changed`](#function-color_values_changed)
- [`preferred_application_language_changed`](#function-preferred_application_language_changed)
- [`energy_saver_enabled`](#function-energy_saver_enabled)
- [`energy_saver_changed`](#function-energy_saver_changed)

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

### get_tap_size

```rust
fn get_tap_size(self: &Self, type_: PointerType) -> Size
```

The size of the rectangle around the location of a pointer down that
a pointer up must occur within in order to register a tap gesture, in
device-independent pixels.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/i_platform_settings.rs#L16)

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

### get_double_tap_size

```rust
fn get_double_tap_size(self: &Self, type_: PointerType) -> Size
```

The size of the rectangle around the location of a pointer down that
a pointer up must occur within in order to register a double-tap
gesture, in device-independent pixels.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/i_platform_settings.rs#L21)

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

### get_double_tap_time

```rust
fn get_double_tap_time(self: &Self, type_: PointerType) -> Duration
```

The maximum time that may occur between the first and second click
of a double-tap gesture.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/i_platform_settings.rs#L25)

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

### hold_wait_duration

```rust
fn hold_wait_duration(self: &Self) -> Duration
```

The time a pointer must be held down for in order to register a
holding gesture.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/i_platform_settings.rs#L29)

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

### hotkey_configuration

```rust
fn hotkey_configuration(self: &Self) -> Rc<PlatformHotkeyConfiguration>
```

The key gestures of the platform for common commands.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/i_platform_settings.rs#L32)

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

### preferred_application_language

```rust
fn preferred_application_language(self: &Self) -> String
```

The preferred application language of the user: the tag of the
language (such as `en-US`) the platform reports for the application.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/i_platform_settings.rs#L36)

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

### animations_enabled

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

Whether the user lets the system play animations that are not essential (WinUI
`SharedHelpers::IsAnimationsEnabled`, which reads `UISettings.AnimationsEnabled`).

The setting is asked for each animation, not kept: a change of it applies to the next
animation. A platform that does not report it lets animations play (the default).
A FerroUI addition for the ports of WinUI controls (DEVIATIONS.md, Platform settings).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/i_platform_settings.rs#L44)

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

### transparency_enabled

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

Whether the system permits translucent materials and backdrop effects.

A backend that does not expose a transparency preference preserves the
application's normal materials. Backends should query the current
preference rather than cache it for the process lifetime.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/i_platform_settings.rs#L53)

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

### accessibility_settings_changed

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

Raised when motion, transparency, or other display accessibility
preferences change. The callback runs on the UI thread; consumers read
the current values and invalidate any derived resources.

The default is an empty subscription so existing platform backends and
external implementations remain source-compatible.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/i_platform_settings.rs#L63)

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

### get_color_values

```rust
fn get_color_values(self: &Self) -> PlatformColorValues
```

Gets current system color values including dark mode and accent
colors.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/i_platform_settings.rs#L69)

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

### color_values_changed

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

Raises when current system color values are changed, including
changing of a dark mode and accent colors. Disposing the returned
handle unsubscribes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/i_platform_settings.rs#L74)

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

### preferred_application_language_changed

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

Raised when the system language preferences change. Disposing the
returned handle unsubscribes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/i_platform_settings.rs#L78)

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

### energy_saver_enabled

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

Whether the energy saver of the system (battery saver, low power mode) is on: WinUI's
material policy (`MaterialHelper`) draws no acrylic while it is, from
`PowerManager.EnergySaverStatus`. A platform that does not report it answers `false`.
Backends should query the current state rather than cache it for the process lifetime.
A FerroUI addition (docs/porting/winui-materials.md).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/i_platform_settings.rs#L85)

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

### energy_saver_changed

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

Raised when the energy saver is turned on or off. The callback runs on the UI thread;
consumers read `energy_saver_enabled`. The default is an
empty subscription, for platforms that do not report it.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/i_platform_settings.rs#L92)

## Trait implementations

- [`IPlatformSettings`](/docs/0.5.0/api/ferroui-base/platform/trait-iplatformsettings/)

## Availability

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