Struct smithay_client_toolkit::Environment[][src]

pub struct Environment {
    pub manager: GlobalManager,
    pub compositor: Proxy<WlCompositor>,
    pub subcompositor: Proxy<WlSubcompositor>,
    pub shell: Shell,
    pub shm: Proxy<WlShm>,
    pub data_device_manager: Proxy<WlDataDeviceManager>,
    pub outputs: OutputMgr,
    // some fields omitted
}

A convenience for global management

This type provides convenience utilities for writing wayland client apps, by auto-binding a large portion of the global objects you'll likely need to write your app. This is mostly provided as a mean to factor a consequent amount of dumb, redundant code.

Fields

The underlying GlobalManager wrapping your registry

The compositor global, used to create surfaces

The subcompositor global, used to create subsurfaces

The shell global, used make your surfaces into windows

This tries to bind using the xdg_shell protocol, and fallbacks to wl_shell if it fails

The SHM global, to create shared memory buffers

The data device manager, used to handle drag&drop and selection copy/paste

A manager for handling the advertized outputs

Methods

impl Environment
[src]

Create an environment wrapping a new registry

It requires you to provide the EventQueue as well because the initialization process does a few roundtrip to the server to initialize all the globals.

This may panic or fail if you do not provide the EventQueue hosting the registry you provided.

Create an environment wrapping a new registry

Additionnaly to from_registry, this allows you to provide a callback to be notified of global events, just like GlobalManager::new_with_cb. Note that you will still receive events even if they are processed by this Environment.

Important traits for Vec<u8>

Retrive the accepted SHM formats of the server

Auto Trait Implementations

impl Send for Environment

impl Sync for Environment