pub trait SurfaceFrame {
// Required methods
fn view_size(&self) -> ViewSize;
fn resize_surface(&mut self);
// Provided methods
fn pintch(&mut self, _touch: Touch, _scale: f32) { ... }
fn touch(&mut self, _touch: Touch) { ... }
fn normalize_touch_point(
&self,
_touch_point_x: f32,
_touch_point_y: f32
) -> (f32, f32) { ... }
fn enter_frame(&mut self) { ... }
fn get_current_frame_view(
&self,
_view_format: Option<TextureFormat>
) -> (SurfaceTexture, TextureView) { ... }
fn create_current_frame_view(
&self,
device: &Device,
surface: &Surface<'_>,
config: &SurfaceConfiguration,
view_format: Option<TextureFormat>
) -> (SurfaceTexture, TextureView) { ... }
}