smithay/src/lib.rs

39 lines
919 B
Rust
Raw Normal View History

#![warn(missing_docs)]
2017-04-15 10:54:37 +00:00
//! **Smithay: the wayland compositor smithy**
//!
//! Most entry points in the modules can take an optionnal `slog::Logger` as argument
//! that will be used as a drain for logging. If `None` is provided, they'll log to `slog-stdlog`.
2017-03-11 08:15:17 +00:00
#![cfg_attr(feature = "clippy", feature(plugin))]
#![cfg_attr(feature = "clippy", plugin(clippy))]
#[macro_use]
2017-01-20 08:54:05 +00:00
extern crate wayland_server;
2017-02-20 21:32:03 +00:00
extern crate nix;
extern crate xkbcommon;
extern crate tempfile;
2017-03-18 16:26:22 +00:00
#[cfg(feature = "backend_glutin")]
2017-03-07 10:53:57 +00:00
extern crate glutin;
2017-03-18 16:26:22 +00:00
#[cfg(feature = "renderer_glium")]
extern crate glium;
2017-02-22 10:00:03 +00:00
#[macro_use]
extern crate slog;
extern crate slog_stdlog;
pub mod shm;
2017-03-07 10:53:57 +00:00
pub mod backend;
pub mod keyboard;
fn slog_or_stdlog<L>(logger: L) -> ::slog::Logger
where L: Into<Option<::slog::Logger>>
{
use slog::Drain;
logger
.into()
.unwrap_or_else(|| ::slog::Logger::root(::slog_stdlog::StdLog.fuse(), o!()))
}