[−][src]Struct wayland_protocols::viewporter::client::wp_viewport::WpViewport
Implementations
impl WpViewport
[src]
pub fn destroy(&self)
[src]
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.
This is a destructor, you cannot send requests to this object any longer once this method is called.
pub fn set_source(&self, x: f64, y: f64, width: f64, height: f64)
[src]
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.
pub fn set_destination(&self, width: i32, height: i32)
[src]
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.
Trait Implementations
impl AsRef<Proxy<WpViewport>> for WpViewport
[src]
impl Clone for WpViewport
[src]
fn clone(&self) -> WpViewport
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for WpViewport
[src]
impl Eq for WpViewport
[src]
impl From<Proxy<WpViewport>> for WpViewport
[src]
impl From<WpViewport> for Proxy<WpViewport>
[src]
fn from(value: WpViewport) -> Self
[src]
impl Interface for WpViewport
[src]
type Request = Request
Set of requests associated to this interface Read more
type Event = Event
Set of events associated to this interface Read more
const NAME: &'static str
[src]
const VERSION: u32
[src]
fn c_interface() -> *const wl_interface
[src]
impl PartialEq<WpViewport> for WpViewport
[src]
fn eq(&self, other: &WpViewport) -> bool
[src]
fn ne(&self, other: &WpViewport) -> bool
[src]
impl StructuralEq for WpViewport
[src]
impl StructuralPartialEq for WpViewport
[src]
Auto Trait Implementations
impl !RefUnwindSafe for WpViewport
impl Send for WpViewport
impl Sync for WpViewport
impl Unpin for WpViewport
impl !UnwindSafe for WpViewport
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,