gdk4::prelude

Trait SurfaceExt

Source
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§

Source

fn beep(&self)

Source

fn create_cairo_context(&self) -> CairoContext

Source

fn create_gl_context(&self) -> Result<GLContext, Error>

Source

fn create_vulkan_context(&self) -> Result<VulkanContext, Error>

👎Deprecated: Since 4.14
Source

fn destroy(&self)

Source

fn cursor(&self) -> Option<Cursor>

Source

fn device_cursor(&self, device: &impl IsA<Device>) -> Option<Cursor>

Source

fn device_position( &self, device: &impl IsA<Device>, ) -> Option<(f64, f64, ModifierType)>

Source

fn display(&self) -> Display

Source

fn frame_clock(&self) -> FrameClock

Source

fn height(&self) -> i32

Source

fn is_mapped(&self) -> bool

Source

fn scale(&self) -> f64

Available on crate feature v4_12 only.
Source

fn scale_factor(&self) -> i32

Source

fn width(&self) -> i32

Source

fn hide(&self)

Source

fn is_destroyed(&self) -> bool

Source

fn queue_render(&self)

Source

fn request_layout(&self)

Source

fn set_cursor(&self, cursor: Option<&Cursor>)

Source

fn set_device_cursor(&self, device: &impl IsA<Device>, cursor: &Cursor)

Source

fn set_input_region(&self, region: &Region)

Source

fn set_opaque_region(&self, region: Option<&Region>)

👎Deprecated: Since 4.16
Source

fn connect_enter_monitor<F: Fn(&Self, &Monitor) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_event<F: Fn(&Self, &Event) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_layout<F: Fn(&Self, i32, i32) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_leave_monitor<F: Fn(&Self, &Monitor) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_render<F: Fn(&Self, &Region) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_cursor_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source

fn connect_height_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source

fn connect_mapped_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source

fn connect_scale_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Available on crate feature v4_12 only.
Source

fn connect_scale_factor_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

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.

Implementors§