pub trait RequestDispatch<Ctx> {
    type Error;
    type DestroyFut<'a>: Future<Output = Result<(), Self::Error>> + 'a
       where Ctx: 'a;
    type GetSubsurfaceFut<'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_subsurface<'a>(
        ctx: &'a mut Ctx,
        object_id: u32,
        id: NewId,
        surface: Object,
        parent: Object
    ) -> Self::GetSubsurfaceFut<'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 GetSubsurfaceFut<'a>: Future<Output = Result<(), Self::Error>> + 'a where Ctx: 'a

Type of future returned by get_subsurface

Required Methods§

source

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

unbind from the subcompositor interface

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

source

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

give a surface the role sub-surface

Create a sub-surface interface for the given surface, and associate it with the given parent surface. This turns a plain wl_surface into a sub-surface.

The to-be sub-surface must not already have another role, and it must not have an existing wl_subsurface object. Otherwise the bad_surface protocol error is raised.

Adding sub-surfaces to a parent is a double-buffered operation on the parent (see wl_surface.commit). The effect of adding a sub-surface becomes visible on the next time the state of the parent surface is applied.

The parent surface must not be one of the child surface’s descendants, and the parent must be different from the child surface, otherwise the bad_parent protocol error is raised.

This request modifies the behaviour of wl_surface.commit request on the sub-surface, see the documentation on wl_subsurface interface.

Implementors§