FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    WaylandPlatformOptions

    struct · ferroui-wayland · v0.5.0

    struct WaylandPlatformOptions
    

    Platform-specific options for the Wayland windowing backend, registered with the application builder before use_wayland.

    View source

    Members

    app_id

    app_id: Option<String>
    

    The default AppId for Wayland windows (xdg_toplevel.set_app_id). If None, no application identifier is sent. Defaults to the file name of the executable (the reference: the name of the entry assembly).

    Source

    wl_display_name

    wl_display_name: Option<String>
    

    The name of the Wayland display to connect to (e.g. wayland-0). When None, the WAYLAND_DISPLAY environment variable is used. Ignored when display_fd is set.

    Source

    display_fd

    display_fd: Option<i32>
    

    An already-opened file descriptor for the Wayland display socket. When set, wl_display_name is ignored and the connection is made over the descriptor instead of a socket found by name. Reconnects are automatically disabled in this mode because the fd is consumed by the connection and cannot be reused.

    Source

    enable_reconnects

    enable_reconnects: Option<bool>
    

    Whether to automatically attempt to reconnect to the compositor if the connection is lost. Defaults to enabled. Reconnects are always disabled when display_fd is set, because the file descriptor is consumed by the connection and cannot be reused.

    Source

    force_drawn_decorations

    force_drawn_decorations: bool
    

    Suppresses server-side decoration negotiation (zxdg_decoration_manager_v1): toplevels behave as if the compositor never advertised SSD support. Used primarily for testing the CSD path on compositors that would otherwise enforce server-side decorations (KWin, etc.). Equivalent in intent to X11PlatformOptions::force_drawn_decorations.

    Experimental, used mostly for testing.

    Source

    gl_profiles

    gl_profiles: Vec<ferroui_opengl::GlVersion>
    

    The OpenGL/OpenGL ES versions to try, in priority order, when creating the GL context. The first profile the driver supports is used.

    Source

    use_dmabuf_swapchain

    use_dmabuf_swapchain: Option<bool>
    

    Whether to use a dmabuf-based swapchain for GPU rendering. When None, the backend decides based on compositor and driver capabilities.

    Source

    use_g_lib_main_loop

    use_g_lib_main_loop: bool
    

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

    Source

    external_g_lib_main_loop_exception_logger

    external_g_lib_main_loop_exception_logger: Option<std::rc::Rc<dyn Fn(&dyn 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 of the framework, there is no way to report such exceptions, since allowing those to escape the native call boundary will likely brick GLib machinery since it's not aware of them. This property allows to inspect such exceptions before they will be ignored. Only used when use_g_lib_main_loop is enabled.

    Source

    new

    fn new() -> Self
    

    Source

    for_worker

    fn for_worker(self: &Self) -> WaylandWorkerOptions
    

    What the worker thread needs of the options, as values.

    Source

    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
    • NoneValue
    • Instrument
    • WithSubscriber
    • Downcast
    • Clone
    • Default
    • ErasedDestructor
    • IntoEither

    Availability

    Extracted for x86_64-unknown-linux-gnu, aarch64-apple-darwin. Cargo features are listed in the crate index.