pub trait RequestDispatch<Ctx> {
    type Error;
    type DestroyFut<'a>: Future<Output = Result<(), Self::Error>> + 'a
       where Ctx: 'a;
    type GetViewportFut<'a>: Future<Output = Result<(), Self::Error>> + 'a
       where Ctx: 'a;

    // Required methods
    fn destroy<'a>(ctx: &'a mut Ctx, object_id: u32) -> Self::DestroyFut<'a>;
    fn get_viewport<'a>(
        ctx: &'a mut Ctx,
        object_id: u32,
        id: NewId,
        surface: Object
    ) -> Self::GetViewportFut<'a>;
}

Required Associated Types§

source

type Error

source

type DestroyFut<'a>: Future<Output = Result<(), Self::Error>> + 'a where Ctx: 'a

Type of future returned by destroy

source

type GetViewportFut<'a>: Future<Output = Result<(), Self::Error>> + 'a where Ctx: 'a

Type of future returned by get_viewport

Required Methods§

source

fn destroy<'a>(ctx: &'a mut Ctx, object_id: u32) -> Self::DestroyFut<'a>

unbind from the cropping and scaling interface

Informs the server that the client will not be using this protocol object anymore. This does not affect any other objects, wp_viewport objects included.

source

fn get_viewport<'a>( ctx: &'a mut Ctx, object_id: u32, id: NewId, surface: Object ) -> Self::GetViewportFut<'a>

extend surface interface for crop and scale

Instantiate an interface extension for the given wl_surface to crop and scale its content. If the given wl_surface already has a wp_viewport object associated, the viewport_exists protocol error is raised.

Implementors§