pub struct SiglusHost { /* private fields */ }Implementations§
Source§impl SiglusHost
impl SiglusHost
pub async fn new_with_renderer( config: SiglusHostConfig, renderer: Renderer, ) -> Result<Self>
pub fn set_native_messagebox_callback( &mut self, callback: Option<SiglusNativeMessageBoxCallback>, user_data: *mut c_void, )
pub fn submit_native_messagebox_result(&mut self, request_id: u64, value: i64)
pub fn resize(&mut self, width: u32, height: u32, scale_factor: f32)
pub fn resize_with_logical_viewport( &mut self, surface_width: u32, surface_height: u32, scale_factor: f32, logical_width: u32, logical_height: u32, viewport_x: u32, viewport_y: u32, viewport_width: u32, viewport_height: u32, )
pub fn logical_size(&self) -> (u32, u32)
pub fn debug_status_summary(&mut self) -> String
Sourcepub fn step(&mut self, dt_ms: u32) -> Result<bool>
pub fn step(&mut self, dt_ms: u32) -> Result<bool>
Step one frame and present when needed. Returns true if the engine requested exit.
pub fn mouse_move(&mut self, x: f64, y: f64)
pub fn mouse_down(&mut self, button: VmMouseButton)
pub fn mouse_up(&mut self, button: VmMouseButton)
pub fn mouse_wheel(&mut self, delta_y: i32)
pub fn touch(&mut self, phase: i32, x: f64, y: f64)
pub fn key_down(&mut self, key: VmKey)
pub fn key_down_code(&mut self, code: i32)
pub fn key_up(&mut self, key: VmKey)
pub fn key_up_code(&mut self, code: i32)
pub fn text_input(&mut self, text: &str)
pub fn renderer_mut(&mut self) -> &mut Renderer
pub fn vm_mut(&mut self) -> &mut SceneVm<'static>
Auto Trait Implementations§
impl !Freeze for SiglusHost
impl !RefUnwindSafe for SiglusHost
impl Send for SiglusHost
impl !Sync for SiglusHost
impl Unpin for SiglusHost
impl UnsafeUnpin for SiglusHost
impl !UnwindSafe for SiglusHost
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.