pub trait StageSystem {
fn width(&self) -> i32;
fn height(&self) -> i32;
fn orientation(&self) -> Value<Orientation>;
fn fullscreen(&self) -> Value<bool>;
fn is_fullscreen_supported(&self) -> bool;
fn resize_signal(&self) -> Signal0;
fn lock_orientation(&self, orient: Orientation);
fn unlock_orientation(&self);
fn request_resize(&self, width: i32, height: i32);
fn request_fullscreen(&self, enable: bool);
}
Expand description
Functions related to the environment’s display viewport.
Required Methods
fn orientation(&self) -> Value<Orientation>
fn orientation(&self) -> Value<Orientation>
The current screen orientation, or a wrapped None value if the environment doesn’t support multiple orientations.
fn fullscreen(&self) -> Value<bool>
fn fullscreen(&self) -> Value<bool>
True if the stage is currently fullscreen.
fn is_fullscreen_supported(&self) -> bool
fn is_fullscreen_supported(&self) -> bool
Whether the stage may change its fullscreen state. False if the stage is fullscreen and can’t go into windowed mode, or vise versa.
fn resize_signal(&self) -> Signal0
fn resize_signal(&self) -> Signal0
Emitted after the stage size changes, such as when the window is resized or the device is rotated.
fn lock_orientation(&self, orient: Orientation)
fn lock_orientation(&self, orient: Orientation)
Request to lock the orientation, so that rotating the device will not adjust the screen. Has no effect if the environment doesn’t support orientation locking. @param orient The orientation to lock to.
fn unlock_orientation(&self)
fn unlock_orientation(&self)
Request to unlock the orientation, so that rotating the device will adjust the screen. Has no effect if the environment doesn’t support orientation locking.
fn request_resize(&self, width: i32, height: i32)
fn request_resize(&self, width: i32, height: i32)
Request that the stage be resized to a certain size.
fn request_fullscreen(&self, enable: bool)
fn request_fullscreen(&self, enable: bool)
Request that fullscreen be enabled or disabled. No effect if changing fullscreen is not supported.