pub trait RegistryHandler<D>{
    // Provided methods
    fn new_global(
        data: &mut D,
        conn: &Connection,
        qh: &QueueHandle<D>,
        name: u32,
        interface: &str,
        version: u32,
    ) { ... }
    fn remove_global(
        data: &mut D,
        conn: &Connection,
        qh: &QueueHandle<D>,
        name: u32,
        interface: &str,
    ) { ... }
}
Expand description

A trait implemented by modular parts of a smithay’s client toolkit and protocol delegates that may be used to receive notification of a global being created or destroyed.

Delegates that choose to implement this trait may be used in registry_handlers which automatically notifies delegates about the creation and destruction of globals.

Note that in order to delegate registry handling to a type which implements this trait, your D data type must implement ProvidesRegistryState.

Provided Methods§

source

fn new_global( data: &mut D, conn: &Connection, qh: &QueueHandle<D>, name: u32, interface: &str, version: u32, )

Called when a new global has been advertised by the compositor.

The provided registry handle may be used to bind the global. This is not called during initial enumeration of globals. It is primarily useful for multi-instance globals such as wl_output and wl_seat.

The default implementation does nothing.

source

fn remove_global( data: &mut D, conn: &Connection, qh: &QueueHandle<D>, name: u32, interface: &str, )

Called when a global has been destroyed by the compositor.

The default implementation does nothing.

Object Safety§

This trait is not object safe.

Implementors§