Trait CompositorHandler
pub trait CompositorHandler: Sized {
// Required methods
fn scale_factor_changed(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
surface: &WlSurface,
new_factor: i32,
);
fn transform_changed(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
surface: &WlSurface,
new_transform: Transform,
);
fn frame(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
surface: &WlSurface,
time: u32,
);
fn surface_enter(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
surface: &WlSurface,
output: &WlOutput,
);
fn surface_leave(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
surface: &WlSurface,
output: &WlOutput,
);
}wayland and Linux only.Required Methods§
fn scale_factor_changed(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
surface: &WlSurface,
new_factor: i32,
)
fn scale_factor_changed( &mut self, conn: &Connection, qh: &QueueHandle<Self>, surface: &WlSurface, new_factor: i32, )
The surface has either been moved into or out of an output and the output has a different scale factor.
fn transform_changed(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
surface: &WlSurface,
new_transform: Transform,
)
fn transform_changed( &mut self, conn: &Connection, qh: &QueueHandle<Self>, surface: &WlSurface, new_transform: Transform, )
The surface has either been moved into or out of an output and the output has different transform.
fn frame(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
surface: &WlSurface,
time: u32,
)
fn frame( &mut self, conn: &Connection, qh: &QueueHandle<Self>, surface: &WlSurface, time: u32, )
A frame callback has been completed.
Frame callbacks are used to avoid updating surfaces that are not currently visible. If a
frame callback is requested prior to committing a surface, the client should avoid drawing
to that surface until the callback completes. See the
WlSurface::frame request for more details.
This function will be called if you request a frame callback by passing the surface itself
as the userdata (surface.frame(&queue, &surface)); you can also implement Dispatch
for other values to more easily dispatch rendering for specific surface types.
fn surface_enter(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
surface: &WlSurface,
output: &WlOutput,
)
fn surface_enter( &mut self, conn: &Connection, qh: &QueueHandle<Self>, surface: &WlSurface, output: &WlOutput, )
The surface has entered an output.
fn surface_leave(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
surface: &WlSurface,
output: &WlOutput,
)
fn surface_leave( &mut self, conn: &Connection, qh: &QueueHandle<Self>, surface: &WlSurface, output: &WlOutput, )
The surface has left an output.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.