pub struct DesktopPlatform { /* private fields */ }Implementations§
Source§impl DesktopPlatform
impl DesktopPlatform
pub fn new() -> DesktopPlatform
pub fn with_feather_width(self, feather_width: f32) -> DesktopPlatform
pub fn with_feathering_enabled(self, enabled: bool) -> DesktopPlatform
Sourcepub fn with_vsync_enabled(self, enabled: bool) -> DesktopPlatform
pub fn with_vsync_enabled(self, enabled: bool) -> DesktopPlatform
Enable synchronized presentation. Focused, drawable windows continue presenting retained content so variable-refresh displays stay responsive.
pub fn with_external_texture_registry( self, registry: WgpuExternalTextureRegistry, ) -> DesktopPlatform
pub fn with_automation( self, automation: DesktopAutomationConfig, ) -> DesktopPlatform
Sourcepub fn with_extension(
self,
extension: impl DesktopExtension + 'static,
) -> DesktopPlatform
pub fn with_extension( self, extension: impl DesktopExtension + 'static, ) -> DesktopPlatform
Attach an optional UI-thread desktop integration.
pub fn renderer(&self) -> &WgpuRenderer
pub fn feather_width(&self) -> f32
pub fn feathering_enabled(&self) -> bool
pub fn vsync_enabled(&self) -> bool
pub fn set_feather_width(&mut self, feather_width: f32)
pub fn set_feathering_enabled(&mut self, enabled: bool)
pub fn set_vsync_enabled(&mut self, enabled: bool)
pub fn set_external_texture_registry( &mut self, registry: WgpuExternalTextureRegistry, )
pub fn renderer_mut(&mut self) -> &mut WgpuRenderer
pub fn run(self, runtime: Runtime) -> Result<Vec<PlatformWindow>, Error>
Sourcepub fn run_with(
self,
runtime: Runtime,
on_ready: impl FnOnce(CommandSender),
) -> Result<Vec<PlatformWindow>, Error>
pub fn run_with( self, runtime: Runtime, on_ready: impl FnOnce(CommandSender), ) -> Result<Vec<PlatformWindow>, Error>
Like run but hands the caller a typed, thread-safe
CommandSender before the loop starts.
Trait Implementations§
Source§impl Debug for DesktopPlatform
impl Debug for DesktopPlatform
Source§impl Default for DesktopPlatform
impl Default for DesktopPlatform
Source§fn default() -> DesktopPlatform
fn default() -> DesktopPlatform
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for DesktopPlatform
impl !RefUnwindSafe for DesktopPlatform
impl !Send for DesktopPlatform
impl !Sync for DesktopPlatform
impl !UnwindSafe for DesktopPlatform
impl Unpin for DesktopPlatform
impl UnsafeUnpin for DesktopPlatform
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.