pub trait FrameSource: Clone + 'static {
// Required methods
fn frame_slot(&self) -> Arc<Mutex<Option<Frame>>>;
fn size_request_slot(&self) -> SizeRequestSlot;
fn cursor(&self) -> Interaction;
fn handle_event(
&self,
event: &Event,
bounds: Rectangle,
cursor: Cursor,
focused: bool,
) -> bool;
}Expand description
Trait that a frame source must implement to be rendered by
FrameWidget.
Required Methods§
Sourcefn size_request_slot(&self) -> SizeRequestSlot
fn size_request_slot(&self) -> SizeRequestSlot
Slot the widget writes the current physical-pixel size into.
Sourcefn cursor(&self) -> Interaction
fn cursor(&self) -> Interaction
Current cursor the source wants displayed.
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.