pub trait SurfaceExt:
IsA<Surface>
+ Sealed
+ 'static {
Show 34 methods
// Provided methods
fn beep(&self) { ... }
fn create_cairo_context(&self) -> CairoContext { ... }
fn create_gl_context(&self) -> Result<GLContext, Error> { ... }
fn create_vulkan_context(&self) -> Result<VulkanContext, Error> { ... }
fn destroy(&self) { ... }
fn cursor(&self) -> Option<Cursor> { ... }
fn device_cursor(&self, device: &impl IsA<Device>) -> Option<Cursor> { ... }
fn device_position(
&self,
device: &impl IsA<Device>,
) -> Option<(f64, f64, ModifierType)> { ... }
fn display(&self) -> Display { ... }
fn frame_clock(&self) -> FrameClock { ... }
fn height(&self) -> i32 { ... }
fn is_mapped(&self) -> bool { ... }
fn scale(&self) -> f64 { ... }
fn scale_factor(&self) -> i32 { ... }
fn width(&self) -> i32 { ... }
fn hide(&self) { ... }
fn is_destroyed(&self) -> bool { ... }
fn queue_render(&self) { ... }
fn request_layout(&self) { ... }
fn set_cursor(&self, cursor: Option<&Cursor>) { ... }
fn set_device_cursor(&self, device: &impl IsA<Device>, cursor: &Cursor) { ... }
fn set_input_region(&self, region: &Region) { ... }
fn set_opaque_region(&self, region: Option<&Region>) { ... }
fn connect_enter_monitor<F: Fn(&Self, &Monitor) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_event<F: Fn(&Self, &Event) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_layout<F: Fn(&Self, i32, i32) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_leave_monitor<F: Fn(&Self, &Monitor) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_render<F: Fn(&Self, &Region) -> bool + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_cursor_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_height_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_mapped_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_scale_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_scale_factor_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_width_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Provided Methods§
fn beep(&self)
fn create_cairo_context(&self) -> CairoContext
fn create_gl_context(&self) -> Result<GLContext, Error>
fn create_vulkan_context(&self) -> Result<VulkanContext, Error>
👎Deprecated: Since 4.14
fn destroy(&self)
fn cursor(&self) -> Option<Cursor>
fn device_cursor(&self, device: &impl IsA<Device>) -> Option<Cursor>
fn device_position( &self, device: &impl IsA<Device>, ) -> Option<(f64, f64, ModifierType)>
fn display(&self) -> Display
fn frame_clock(&self) -> FrameClock
fn height(&self) -> i32
fn is_mapped(&self) -> bool
fn scale(&self) -> f64
Available on crate feature
v4_12
only.fn scale_factor(&self) -> i32
fn width(&self) -> i32
fn hide(&self)
fn is_destroyed(&self) -> bool
fn queue_render(&self)
fn request_layout(&self)
fn set_cursor(&self, cursor: Option<&Cursor>)
fn set_device_cursor(&self, device: &impl IsA<Device>, cursor: &Cursor)
fn set_input_region(&self, region: &Region)
fn set_opaque_region(&self, region: Option<&Region>)
👎Deprecated: Since 4.16
fn connect_enter_monitor<F: Fn(&Self, &Monitor) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_event<F: Fn(&Self, &Event) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_layout<F: Fn(&Self, i32, i32) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_leave_monitor<F: Fn(&Self, &Monitor) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_render<F: Fn(&Self, &Region) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_cursor_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_height_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_mapped_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_scale_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
Available on crate feature
v4_12
only.fn connect_scale_factor_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_width_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
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.