Add WINIT_UNIX_BACKEND documentation

This commit is contained in:
Alex Butler 2017-06-21 20:10:23 +01:00
parent eaa92a4282
commit 3a89843767
3 changed files with 34 additions and 8 deletions

View file

@ -1,4 +1,4 @@
//! Winit allows you to build a window on as many platforms as possible.
//! Winit allows you to build a window on as many platforms as possible.
//!
//! # Building a window
//!
@ -181,6 +181,14 @@ pub struct ButtonId(u32);
/// Provides a way to retreive events from the windows that were registered to it.
///
/// To wake up an `EventsLoop` from a another thread, see the `EventsLoopProxy` docs.
///
/// Usage will result in display backend initialisation, this can be controlled on linux
/// using an environment variable `WINIT_UNIX_BACKEND`.
/// > Legal values are `x11` and `wayland`. If this variable is set only the named backend
/// > will be tried by winit. If it is not set, winit will try to connect to a wayland connection,
/// > and if it fails will fallback on x11.
/// >
/// > If this variable is set with any other value, winit will panic.
pub struct EventsLoop {
events_loop: platform::EventsLoop,
}