pub trait CompositorHandler: Sized {
    // Required methods
    fn scale_factor_changed(
        &mut self,
        conn: &Connection,
        qh: &QueueHandle<Self>,
        surface: &WlSurface,
        new_factor: i32,
    );
    fn transform_changed(
        &mut self,
        conn: &Connection,
        qh: &QueueHandle<Self>,
        surface: &WlSurface,
        new_transform: Transform,
    );
    fn frame(
        &mut self,
        conn: &Connection,
        qh: &QueueHandle<Self>,
        surface: &WlSurface,
        time: u32,
    );
}

Required Methods§

source

fn scale_factor_changed( &mut self, conn: &Connection, qh: &QueueHandle<Self>, surface: &WlSurface, new_factor: i32, )

The surface has either been moved into or out of an output and the output has a different scale factor.

source

fn transform_changed( &mut self, conn: &Connection, qh: &QueueHandle<Self>, surface: &WlSurface, new_transform: Transform, )

The surface has either been moved into or out of an output and the output has different transform.

source

fn frame( &mut self, conn: &Connection, qh: &QueueHandle<Self>, surface: &WlSurface, time: u32, )

A frame callback has been completed.

Frame callbacks are used to avoid updating surfaces that are not currently visible. If a frame callback is requested prior to committing a surface, the client should avoid drawing to that surface until the callback completes. See the WlSurface::frame request for more details.

This function will be called if you request a frame callback by passing the surface itself as the userdata (surface.frame(&queue, &surface)); you can also implement Dispatch for other values to more easily dispatch rendering for specific surface types.

Object Safety§

This trait is not object safe.

Implementors§