# X11PlatformOptions

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-x11/x11_platform/struct-x11platformoptions/

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

```rust
struct X11PlatformOptions
```

Platform-specific options which apply to Linux.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L650)

## Members

- [`rendering_mode`](#struct_field-rendering_mode)
- [`overlay_popups`](#struct_field-overlay_popups)
- [`use_d_bus_menu`](#struct_field-use_d_bus_menu)
- [`use_d_bus_file_picker`](#struct_field-use_d_bus_file_picker)
- [`enable_ime`](#struct_field-enable_ime)
- [`enable_input_focus_proxy`](#struct_field-enable_input_focus_proxy)
- [`enable_session_management`](#struct_field-enable_session_management)
- [`should_render_on_ui_thread`](#struct_field-should_render_on_ui_thread)
- [`gl_profiles`](#struct_field-gl_profiles)
- [`glx_renderer_blacklist`](#struct_field-glx_renderer_blacklist)
- [`wm_class`](#struct_field-wm_class)
- [`enable_multi_touch`](#struct_field-enable_multi_touch)
- [`use_retained_framebuffer`](#struct_field-use_retained_framebuffer)
- [`use_x_shm_framebuffer`](#struct_field-use_x_shm_framebuffer)
- [`use_g_lib_main_loop`](#struct_field-use_g_lib_main_loop)
- [`enable_drawn_decorations`](#struct_field-enable_drawn_decorations)
- [`force_drawn_decorations`](#struct_field-force_drawn_decorations)
- [`external_g_lib_main_loop_exception_logger`](#struct_field-external_g_lib_main_loop_exception_logger)
- [`new`](#function-new)

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

### rendering_mode

```rust
rendering_mode: Vec<X11RenderingMode>
```

Gets or sets the rendering modes with fallbacks.
The first element in the array has the highest priority.
The default value is: `X11RenderingMode::Glx`, `X11RenderingMode::Software`.

If application should work on as wide range of devices as possible, at least add
`X11RenderingMode::Software` as a fallback value.

The platform fails to initialize when no value is matched.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L659)

<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/FerroUI.X11/x11_platform.rs#L662)

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

### use_d_bus_menu

```rust
use_d_bus_menu: bool
```

Enables global menu support on Linux desktop environments where it's supported (e. g. XFCE and MATE with
plugin, KDE, etc). The default value is true.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L666)

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

### use_d_bus_file_picker

```rust
use_d_bus_file_picker: bool
```

Enables DBus file picker instead of GTK.
The default value is true.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L670)

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

### enable_ime

```rust
enable_ime: Option<bool>
```

Determines whether to use IME.
IME would be enabled by default if the current user input language is one of the following: Mandarin,
Japanese, Vietnamese or Korean.

Input method editor is a component that enables users to generate characters not natively available
on their input devices by using sequences of characters or mouse operations that are natively available on
their input devices.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L679)

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

### enable_input_focus_proxy

```rust
enable_input_focus_proxy: bool
```

Determines whether to use Input Focus Proxy.
The default value is false.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L683)

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

### enable_session_management

```rust
enable_session_management: bool
```

Determines whether to enable support for the
X Session Management Protocol.

X Session Management Protocol is a standard implemented on most
Linux systems that uses Xorg. This enables apps to control how they
can control and/or cancel the pending shutdown requested by the user.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L691)

<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/FerroUI.X11/x11_platform.rs#L696)

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

### gl_profiles

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L698)

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

### glx_renderer_blacklist

```rust
glx_renderer_blacklist: Vec<String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L700)

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

### wm_class

```rust
wm_class: Option<String>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L702)

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

### enable_multi_touch

```rust
enable_multi_touch: Option<bool>
```

Enables multitouch support. The default value is true.

Multitouch allows a surface (a touchpad or touchscreen) to recognize the presence of more than one point
of contact with the surface at the same time.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L708)

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

### use_retained_framebuffer

```rust
use_retained_framebuffer: Option<bool>
```

Retain window framebuffer contents if using CPU rendering mode.
This will keep an offscreen bitmap for each window with contents of the previous frame
While improving performance by saving a blit, it will increase memory consumption
if you have many windows

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L714)

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

### use_x_shm_framebuffer

```rust
use_x_shm_framebuffer: Option<bool>
```

Enables the MIT-SHM extension for CPU rendering mode, which uses shared memory
to transfer the framebuffer contents to the X server instead of sending pixels
over the connection socket.
Only used when set to true and the extension is supported by the server.
The default value is null.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L721)

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

### use_g_lib_main_loop

```rust
use_g_lib_main_loop: bool
```

If this option is set to true, GMainLoop and GSource based dispatcher implementation will be used instead
of epoll-based one.
Use this if you need to use GLib-based libraries on the main thread

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L726)

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

### enable_drawn_decorations

```rust
enable_drawn_decorations: Option<bool>
```

Enables client-side drawn window decorations on X11.
When true and ExtendClientAreaToDecorationsHint is set on a window,
the framework will draw its own decorations (titlebar, borders, resize grips)
instead of using the X11 window manager decorations.

Experimental, used mostly for testing.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L734)

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

### force_drawn_decorations

```rust
force_drawn_decorations: bool
```

Forces client-side drawn window decorations on X11 for all windows,
even when the app has not opted in via ExtendClientAreaToDecorationsHint.
In this mode, Window.ClientSize reflects the usable content area
(platform client size minus decoration margins) and the app is unaware
of the decorations.
Implies EnableDrawnDecorations = true.

Experimental, used mostly for testing.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L744)

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

### external_g_lib_main_loop_exception_logger

```rust
external_g_lib_main_loop_exception_logger: Option<std::rc::Rc<dyn Fn(&dyn std::any::Any + Send) -> ()>>
```

If the framework is in control of a run loop, we propagate exceptions by stopping the run loop frame
and rethrowing an exception. However, if there is no run loop frame controlled by the framework,
there is no way to report such exceptions, since allowing those to escape native->managed call boundary
will likely brick GLib machinery since it's not aware of managed Exceptions
This property allows to inspect such exceptions before they will be ignored

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L751)

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

### new

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.X11/x11_platform.rs#L755)

## Trait implementations

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

## Availability

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