pub struct WgpuCanvas { /* private fields */ }Available on macOS and crate feature
wgpu only.Implementations§
Source§impl WgpuCanvas
impl WgpuCanvas
pub fn new(parent: impl AsContainer) -> Result<Self>
pub fn is_visible(&self) -> Result<bool>
pub fn set_visible(&mut self, v: bool) -> Result<()>
pub fn is_enabled(&self) -> Result<bool>
pub fn set_enabled(&mut self, v: bool) -> Result<()>
pub fn loc(&self) -> Result<Point>
pub fn set_loc(&mut self, p: Point) -> Result<()>
pub fn size(&self) -> Result<Size>
pub fn set_size(&mut self, v: Size) -> Result<()>
pub fn tooltip(&self) -> Result<String>
pub fn set_tooltip(&mut self, s: impl AsRef<str>) -> Result<()>
pub async fn wait_mouse_down(&self) -> MouseButton
pub async fn wait_mouse_up(&self) -> MouseButton
pub async fn wait_mouse_move(&self) -> Point
pub async fn wait_mouse_wheel(&self) -> Vector
pub fn create_surface( &self, instance: &Instance, ) -> Result<Surface<'static>, CreateSurfaceError>
Trait Implementations§
Source§impl AsWidget for WgpuCanvas
impl AsWidget for WgpuCanvas
Source§fn as_widget(&self) -> BorrowedWidget<'_>
fn as_widget(&self) -> BorrowedWidget<'_>
Get the widget handle.
Auto Trait Implementations§
impl !RefUnwindSafe for WgpuCanvas
impl !Send for WgpuCanvas
impl !Sync for WgpuCanvas
impl !UnwindSafe for WgpuCanvas
impl Freeze for WgpuCanvas
impl Unpin for WgpuCanvas
impl UnsafeUnpin for WgpuCanvas
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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