winit-fullscreen

Crates.iowinit-fullscreen
lib.rswinit-fullscreen
version1.0.2
sourcesrc
created_at2021-06-17 22:09:56.324763
updated_at2023-12-03 16:35:10.39475
descriptionAdds a method to winit::window::Window to toggle fullscreen
homepagehttps://github.com/Cthutu/winit-fullscreen
repositoryhttps://github.com/Cthutu/winit-fullscreen
max_upload_size
id411581
size66,427
(Cthutu)

documentation

README

winit-fullscreen

This is a simple crate that manages toggling of fullscreen in a winit-based application. Given a borrowed immutable reference to your winit::window::Window instance, you can call:

window.toggle_fullscreen();

If your window is not fullscreen, it will be now, otherwise the reverse will be true.

Motivation

I found the fullscreen interface difficult to remember, the documentation lacking and there are some complexities involving different platforms (some do not support full exclusive mode, for example). So I decided to wrap up the functionality under a simple, argumentless, single function.

I am happy to contribute this back into the Winit crate if there is interest.

Issues and ideas

Please post any issues or ideas on the GitHub site on https://github.com/Cthutu/winit-fullscreen.

Credits

Written by Matt Davies, copyright ©2021, all rights reserved.

Commit count: 7

cargo fmt