Enum wayland_protocols::viewporter::client::wp_viewport::Request [−][src]
#[non_exhaustive]
pub enum Request {
Destroy,
SetSource {
x: f64,
y: f64,
width: f64,
height: f64,
},
SetDestination {
width: i32,
height: i32,
},
}
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Destroy
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, once sent this object cannot be used any longer.
SetSource
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.
SetDestination
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
Wire representation of this MessageGroup
The wrapper type for ObjectMap allowing the mapping of Object and NewId arguments to the object map during parsing. Read more
Whether this message is a destructor Read more
Retrieve the child Object
associated with this message if any
Construct a message from its raw representation
unsafe fn from_raw_c(
obj: *mut c_void,
opcode: u32,
args: *const wl_argument
) -> Result<Request, ()>
unsafe fn from_raw_c(
obj: *mut c_void,
opcode: u32,
args: *const wl_argument
) -> Result<Request, ()>
Construct a message of this group from its C representation Read more
Build a C representation of this message Read more