1
1
//! Application and window handling.
2

            
3
#![warn(
4
    clippy::cargo,
5
    missing_docs,
6
    // clippy::missing_docs_in_private_items,
7
    clippy::pedantic,
8
    future_incompatible,
9
    rust_2018_idioms,
10
)]
11
#![cfg_attr(doc, deny(rustdoc::all))]
12
#![allow(
13
    clippy::missing_errors_doc, // TODO clippy::missing_errors_doc
14
    clippy::missing_panics_doc, // TODO clippy::missing_panics_doc
15
    clippy::option_if_let_else,
16
    clippy::module_name_repetitions,
17
    clippy::cast_possible_truncation,
18
    clippy::cast_precision_loss,
19
    clippy::mut_mut, // false alarm on futures::select!
20
)]
21

            
22
mod application;
23
mod error;
24
mod runtime;
25
mod window;
26
#[cfg(feature = "multiwindow")]
27
pub use window::OpenableWindow;
28

            
29
pub use self::application::{Application, SingleWindowApplication};
30
pub use self::error::Error;
31
pub use self::runtime::Runtime;
32
pub use self::window::{
33
    event, CloseResponse, RedrawRequester, RedrawStatus, Window, WindowBuilder, WindowCreator,
34
    WindowHandle,
35
};
36

            
37
/// A collection of commonly used exports provided by this crate.
38
pub mod prelude {
39
    pub use super::event::{
40
        DeviceId, ElementState, Event, EventStatus, InputEvent, MouseButton, MouseScrollDelta,
41
        ScanCode, TouchPhase, VirtualKeyCode,
42
    };
43
    pub use super::{
44
        Application, CloseResponse, Error, RedrawRequester, RedrawStatus, Runtime,
45
        SingleWindowApplication, Window, WindowBuilder, WindowCreator, WindowHandle,
46
    };
47
}
48

            
49
/// Alias for [`std::result::Result`] where the error type is [`Error`].
50
pub type Result<T> = std::result::Result<T, Error>;