Trait runa_wayland_protocols::stable::viewporter::wp_viewport::v1::RequestDispatch
source · pub trait RequestDispatch<Ctx> {
type Error;
type DestroyFut<'a>: Future<Output = Result<(), Self::Error>> + 'a
where Ctx: 'a;
type SetSourceFut<'a>: Future<Output = Result<(), Self::Error>> + 'a
where Ctx: 'a;
type SetDestinationFut<'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 set_source<'a>(
ctx: &'a mut Ctx,
object_id: u32,
x: Fixed,
y: Fixed,
width: Fixed,
height: Fixed
) -> Self::SetSourceFut<'a>;
fn set_destination<'a>(
ctx: &'a mut Ctx,
object_id: u32,
width: i32,
height: i32
) -> Self::SetDestinationFut<'a>;
}
Required Associated Types§
type Error
sourcetype DestroyFut<'a>: Future<Output = Result<(), Self::Error>> + 'a
where
Ctx: 'a
type DestroyFut<'a>: Future<Output = Result<(), Self::Error>> + 'a where Ctx: 'a
Type of future returned by destroy
sourcetype SetSourceFut<'a>: Future<Output = Result<(), Self::Error>> + 'a
where
Ctx: 'a
type SetSourceFut<'a>: Future<Output = Result<(), Self::Error>> + 'a where Ctx: 'a
Type of future returned by set_source
sourcetype SetDestinationFut<'a>: Future<Output = Result<(), Self::Error>> + 'a
where
Ctx: 'a
type SetDestinationFut<'a>: Future<Output = Result<(), Self::Error>> + 'a where Ctx: 'a
Type of future returned by set_destination
Required Methods§
sourcefn destroy<'a>(ctx: &'a mut Ctx, object_id: u32) -> Self::DestroyFut<'a>
fn destroy<'a>(ctx: &'a mut Ctx, object_id: u32) -> Self::DestroyFut<'a>
remove scaling and cropping from the surface
The associated wl_surface’s crop and scale state is removed. The change is applied on the next wl_surface.commit.
sourcefn set_source<'a>(
ctx: &'a mut Ctx,
object_id: u32,
x: Fixed,
y: Fixed,
width: Fixed,
height: Fixed
) -> Self::SetSourceFut<'a>
fn set_source<'a>( ctx: &'a mut Ctx, object_id: u32, x: Fixed, y: Fixed, width: Fixed, height: Fixed ) -> Self::SetSourceFut<'a>
set the source rectangle for cropping
Set the source rectangle of the associated wl_surface. See wp_viewport for the description, and relation to the wl_buffer size.
If all of x, y, width and height are -1.0, the source rectangle is unset instead. Any other set of values where width or height are zero or negative, or x or y are negative, raise the bad_value protocol error.
The crop and scale state is double-buffered state, and will be applied on the next wl_surface.commit.
sourcefn set_destination<'a>(
ctx: &'a mut Ctx,
object_id: u32,
width: i32,
height: i32
) -> Self::SetDestinationFut<'a>
fn set_destination<'a>( ctx: &'a mut Ctx, object_id: u32, width: i32, height: i32 ) -> Self::SetDestinationFut<'a>
set the surface size for scaling
Set the destination size of the associated wl_surface. See wp_viewport for the description, and relation to the wl_buffer size.
If width is -1 and height is -1, the destination size is unset instead. Any other pair of values for width and height that contains zero or negative values raises the bad_value protocol error.
The crop and scale state is double-buffered state, and will be applied on the next wl_surface.commit.