Skip to main content

Module fullscreen

Module fullscreen 

Source
Expand description

The fullscreen button, and the landscape lock that only a browser permits. Fullscreen: the button that takes the window fullscreen, and the landscape lock that only a browser permits.

The example’s content has a fixed aspect, so it reads best on a display of roughly that shape. A phone held upright shows it as a band across the middle of the screen, which is the case this module exists for: the button takes the window fullscreen, and a browser then locks a device being held upright to landscape so the picture fills the display.

Every platform draws the button, because every platform has a window that can be made fullscreen. On Android winit has no fullscreen to offer, so the button is drawn but a press changes nothing: the activity already takes the screen over for itself.

Re-exports§

use winit::window::Fullscreen; 🔒
use winit::window::Window; 🔒

Functions§

active
Whether window is fullscreen at this moment.
toggle
Put window into or out of fullscreen, whichever it is not.