pub struct AppSurface {
pub view: Option<Arc<Window>>,
pub scale_factor: f32,
pub maximum_frames: i32,
pub ctx: IASDQContext,
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>>§scale_factor: f32§maximum_frames: i32§ctx: IASDQContext§callback_to_app: Option<extern "C" fn(arg: i32)>§temporary_directory: &'static str§library_directory: &'static strImplementations§
Source§impl AppSurface
impl AppSurface
pub async fn new(view: Arc<Window>) -> Self
pub fn get_view(&self) -> &Window
pub fn get_view_size(&self) -> (u32, u32)
pub fn request_redraw(&self)
pub fn pre_present_notify(&self)
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 resize_surface_by_size(&mut self, size: (u32, u32))
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>, ) -> Option<(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>, ) -> Option<(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 UnsafeUnpin 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.