Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 27 additions & 25 deletions src/compositor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,21 @@ pub trait CompositorHandler: Sized {
/// The surface has either been moved into or out of an output and the output has a different scale factor.
fn scale_factor_changed(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
surface: &wl_surface::WlSurface,
new_factor: i32,
);
_conn: &Connection,
_qh: &QueueHandle<Self>,
_surface: &wl_surface::WlSurface,
_new_factor: i32,
) { /* No-op default impl */ }

/// The surface has either been moved into or out of an output and the output has different transform.
fn transform_changed(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
surface: &wl_surface::WlSurface,
new_transform: wl_output::Transform,
);
_conn: &Connection,
_qh: &QueueHandle<Self>,
_surface: &wl_surface::WlSurface,
_new_transform: wl_output::Transform,
) { /* No-op default impl */ }


/// A frame callback has been completed.
///
Expand All @@ -52,29 +53,30 @@ pub trait CompositorHandler: Sized {
/// for other values to more easily dispatch rendering for specific surface types.
fn frame(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
surface: &wl_surface::WlSurface,
time: u32,
);
_conn: &Connection,
_qh: &QueueHandle<Self>,
_surface: &wl_surface::WlSurface,
_time: u32,
) { /* No-op default impl */ }


/// The surface has entered an output.
fn surface_enter(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
surface: &wl_surface::WlSurface,
output: &wl_output::WlOutput,
);
_conn: &Connection,
_qh: &QueueHandle<Self>,
_surface: &wl_surface::WlSurface,
_output: &wl_output::WlOutput,
) { /* No-op default impl */ }

/// The surface has left an output.
fn surface_leave(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
surface: &wl_surface::WlSurface,
output: &wl_output::WlOutput,
);
_conn: &Connection,
_qh: &QueueHandle<Self>,
_surface: &wl_surface::WlSurface,
_output: &wl_output::WlOutput,
) { /* No-op default impl */ }
}

pub trait SurfaceDataExt: Send + Sync {
Expand Down
24 changes: 12 additions & 12 deletions src/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,28 @@ pub trait OutputHandler: Sized {
/// A new output has been advertised.
fn new_output(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
output: wl_output::WlOutput,
);
_conn: &Connection,
_qh: &QueueHandle<Self>,
_output: wl_output::WlOutput,
) { /* No-op default impl */ }

/// An existing output has changed.
fn update_output(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
output: wl_output::WlOutput,
);
_conn: &Connection,
_qh: &QueueHandle<Self>,
_output: wl_output::WlOutput,
) { /* No-op default impl */ }

/// An output is no longer advertised.
///
/// The info passed to this function was the state of the output before destruction.
fn output_destroyed(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
output: wl_output::WlOutput,
);
_conn: &Connection,
_qh: &QueueHandle<Self>,
_output: wl_output::WlOutput,
) { /* No-op default impl */ }
}

type ScaleWatcherFn =
Expand Down