winit::platform::unix

Trait WindowBuilderExtUnix

Source
pub trait WindowBuilderExtUnix {
    // Required methods
    fn with_name(
        self,
        general: impl Into<String>,
        instance: impl Into<String>,
    ) -> Self;
    fn with_skip_taskbar(self, skip: bool) -> WindowBuilder;
    fn with_transient_for(self, parent: &impl IsA<Window>) -> WindowBuilder;
    fn with_transparent_draw(self, draw: bool) -> WindowBuilder;
    fn with_double_buffered(self, double_buffered: bool) -> WindowBuilder;
    fn with_rgba_visual(self, rgba_visual: bool) -> WindowBuilder;
    fn with_app_paintable(self, app_paintable: bool) -> WindowBuilder;
    fn with_default_vbox(self, add: bool) -> WindowBuilder;
}
Available on x11_platform or wayland_platform only.

Required Methods§

Source

fn with_name( self, general: impl Into<String>, instance: impl Into<String>, ) -> Self

Build window with the given general and instance names.

The general sets general class of WM_CLASS(STRING), while instance set the instance part of it. The resulted property looks like WM_CLASS(STRING) = "general", "instance".

For details about application ID conventions, see the Desktop Entry Spec

Source

fn with_skip_taskbar(self, skip: bool) -> WindowBuilder

Whether to create the window icon with the taskbar icon or not.

Source

fn with_transient_for(self, parent: &impl IsA<Window>) -> WindowBuilder

Source

fn with_transparent_draw(self, draw: bool) -> WindowBuilder

Whether to enable or disable the internal draw for transparent window.

When tranparent attribute is enabled, we will call connect_draw and draw a transparent background. For anyone who wants to draw the background themselves, set this to false. Default is true.

Source

fn with_double_buffered(self, double_buffered: bool) -> WindowBuilder

Whether to enable or disable the double buffered rendering of the window.

Default is true.

Source

fn with_rgba_visual(self, rgba_visual: bool) -> WindowBuilder

Whether to enable the rgba visual for the window.

Default is false but is always true if WindowAttributes::transparent is true

Source

fn with_app_paintable(self, app_paintable: bool) -> WindowBuilder

Wether to set this window as app paintable

https://docs.gtk.org/gtk3/method.Widget.set_app_paintable.html

Default is false but is always true if WindowAttributes::transparent is true

Source

fn with_default_vbox(self, add: bool) -> WindowBuilder

Whether to create a vertical gtk::Box and add it as the sole child of this window. Created by default.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§