Trait Vulkan Window Ext
Source pub trait VulkanWindowExt: IsA<VulkanWindow> + 'static {
Show 16 methods
// Provided methods
fn close(&self) { ... }
fn display(&self) -> VulkanDisplay { ... }
fn is_presentation_support(
&self,
device: &impl IsA<VulkanDevice>,
queue_family_idx: u32,
) -> bool { ... }
fn surface_dimensions(&self) -> (u32, u32) { ... }
fn handle_events(&self, handle_events: bool) { ... }
fn open(&self) -> Result<(), Error> { ... }
fn redraw(&self) { ... }
fn resize(&self, width: i32, height: i32) { ... }
fn send_key_event(&self, event_type: &str, key_str: &str) { ... }
fn send_mouse_event(
&self,
event_type: &str,
button: i32,
posx: f64,
posy: f64,
) { ... }
fn connect_close<F: Fn(&Self) -> bool + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_draw<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_key_event<F: Fn(&Self, &str, &str) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_mouse_event<F: Fn(&Self, &str, i32, f64, f64) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_resize<F: Fn(&Self, u32, u32) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_display_notify<F: Fn(&Self) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}Expand description
Provided Methods§
Sourcefn display(&self) -> VulkanDisplay
fn display(&self) -> VulkanDisplay
§Returns
the VulkanDisplay for self
Sourcefn is_presentation_support(
&self,
device: &impl IsA<VulkanDevice>,
queue_family_idx: u32,
) -> bool
fn is_presentation_support( &self, device: &impl IsA<VulkanDevice>, queue_family_idx: u32, ) -> bool
Sourcefn surface_dimensions(&self) -> (u32, u32)
fn surface_dimensions(&self) -> (u32, u32)
Sourcefn handle_events(&self, handle_events: bool)
fn handle_events(&self, handle_events: bool)
Tell a self that it should handle events from the window system. These
events are forwarded upstream as navigation events. In some window systems
events are not propagated in the window hierarchy if a client is listening
for them. This method allows you to disable events handling completely
from the self.
§handle_events
a gboolean indicating if events should be handled or not.
fn send_key_event(&self, event_type: &str, key_str: &str)
fn send_mouse_event(&self, event_type: &str, button: i32, posx: f64, posy: f64)
fn connect_close<F: Fn(&Self) -> bool + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_draw<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
Sourcefn connect_key_event<F: Fn(&Self, &str, &str) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_key_event<F: Fn(&Self, &str, &str) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
Will be emitted when a key event is received by the VulkanWindow.
§id
the name of the event
§key
the id of the key pressed
Sourcefn connect_mouse_event<F: Fn(&Self, &str, i32, f64, f64) + Send + Sync + 'static>(
&self,
f: F,
) -> SignalHandlerId
fn connect_mouse_event<F: Fn(&Self, &str, i32, f64, f64) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
Will be emitted when a mouse event is received by the VulkanWindow.
§id
the name of the event
§button
the id of the button
§x
the x coordinate of the mouse event
§y
the y coordinate of the mouse event
fn connect_resize<F: Fn(&Self, u32, u32) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_display_notify<F: Fn(&Self) + Send + Sync + '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.