Struct app_surface::AppSurface
source · pub struct AppSurface {
pub view: Option<Arc<Window>>,
pub is_offscreen_canvas: bool,
pub scale_factor: f32,
pub maximum_frames: i32,
pub sdq: SurfaceDeviceQueue,
pub callback_to_app: Option<extern "C" fn(arg: i32)>,
pub temporary_directory: &'static str,
pub library_directory: &'static str,
}
Fields§
§view: Option<Arc<Window>>
§is_offscreen_canvas: bool
§scale_factor: f32
§maximum_frames: i32
§sdq: SurfaceDeviceQueue
§callback_to_app: Option<extern "C" fn(arg: i32)>
§temporary_directory: &'static str
§library_directory: &'static str
Implementations§
Trait Implementations§
source§impl Deref for AppSurface
impl Deref for AppSurface
source§impl SurfaceFrame for AppSurface
impl SurfaceFrame for AppSurface
fn view_size(&self) -> ViewSize
fn resize_surface(&mut self)
fn normalize_touch_point( &self, touch_point_x: f32, touch_point_y: f32 ) -> (f32, f32)
fn get_current_frame_view( &self, view_format: Option<TextureFormat> ) -> (SurfaceTexture, TextureView)
fn pintch(&mut self, _touch: Touch, _scale: f32)
fn touch(&mut self, _touch: Touch)
fn enter_frame(&mut self)
fn create_current_frame_view( &self, device: &Device, surface: &Surface<'_>, config: &SurfaceConfiguration, view_format: Option<TextureFormat> ) -> (SurfaceTexture, TextureView)
Auto Trait Implementations§
impl !Freeze for AppSurface
impl !RefUnwindSafe for AppSurface
impl Send for AppSurface
impl Sync for AppSurface
impl Unpin for AppSurface
impl !UnwindSafe for AppSurface
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
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.