logo
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

The width of the stage viewport, in pixels.

The height of the stage viewport, in pixels.

The current screen orientation, or a wrapped None value if the environment doesn’t support multiple orientations.

True if the stage is currently fullscreen.

Whether the stage may change its fullscreen state. False if the stage is fullscreen and can’t go into windowed mode, or vise versa.

Emitted after the stage size changes, such as when the window is resized or the device is rotated.

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.

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.

Request that the stage be resized to a certain size.

Request that fullscreen be enabled or disabled. No effect if changing fullscreen is not supported.

Implementors