2017-02-13 07:38:08 +00:00
|
|
|
#![warn(missing_docs)]
|
2018-10-30 12:56:30 +00:00
|
|
|
//! **Smithay: the Wayland compositor smithy**
|
2017-04-12 19:31:31 +00:00
|
|
|
//!
|
2018-10-30 12:56:30 +00:00
|
|
|
//! Most entry points in the modules can take an optional `slog::Logger` as argument
|
2017-04-12 19:31:31 +00:00
|
|
|
//! that will be used as a drain for logging. If `None` is provided, they'll log to `slog-stdlog`.
|
|
|
|
|
2017-09-18 14:58:20 +00:00
|
|
|
// `error_chain!` can recurse deeply
|
|
|
|
#![recursion_limit = "1024"]
|
2017-03-11 08:15:17 +00:00
|
|
|
|
2018-05-07 17:55:34 +00:00
|
|
|
pub extern crate image;
|
2017-12-21 15:01:16 +00:00
|
|
|
#[cfg_attr(feature = "backend_session", macro_use)]
|
2017-02-20 21:32:03 +00:00
|
|
|
extern crate nix;
|
2017-09-05 17:50:22 +00:00
|
|
|
extern crate tempfile;
|
2018-11-18 17:08:37 +00:00
|
|
|
pub extern crate wayland_commons;
|
2018-05-07 17:55:34 +00:00
|
|
|
pub extern crate wayland_protocols;
|
|
|
|
pub extern crate wayland_server;
|
2018-11-28 08:29:13 +00:00
|
|
|
#[cfg(feature = "native_lib")]
|
2018-01-07 12:02:26 +00:00
|
|
|
extern crate wayland_sys;
|
2017-09-05 17:50:22 +00:00
|
|
|
extern crate xkbcommon;
|
2017-02-13 07:38:08 +00:00
|
|
|
|
2018-01-27 12:50:24 +00:00
|
|
|
#[cfg(feature = "dbus")]
|
2018-05-07 17:55:34 +00:00
|
|
|
pub extern crate dbus;
|
2017-09-13 20:51:35 +00:00
|
|
|
#[cfg(feature = "backend_drm")]
|
2018-05-07 17:55:34 +00:00
|
|
|
pub extern crate drm;
|
2018-11-22 10:41:15 +00:00
|
|
|
#[cfg(feature = "backend_drm_gbm")]
|
2018-05-07 17:55:34 +00:00
|
|
|
pub extern crate gbm;
|
2017-04-14 22:23:03 +00:00
|
|
|
#[cfg(feature = "backend_libinput")]
|
2018-05-07 17:55:34 +00:00
|
|
|
pub extern crate input;
|
2017-11-25 12:56:38 +00:00
|
|
|
#[cfg(feature = "backend_session_logind")]
|
2018-05-07 17:55:34 +00:00
|
|
|
pub extern crate systemd;
|
2018-11-22 10:41:15 +00:00
|
|
|
#[cfg(feature = "backend_udev")]
|
2018-05-07 17:55:34 +00:00
|
|
|
pub extern crate udev;
|
2017-09-05 17:50:22 +00:00
|
|
|
#[cfg(feature = "backend_winit")]
|
|
|
|
extern crate wayland_client;
|
|
|
|
#[cfg(feature = "backend_winit")]
|
|
|
|
extern crate winit;
|
2017-03-07 10:53:57 +00:00
|
|
|
|
2017-05-18 20:28:02 +00:00
|
|
|
extern crate libloading;
|
|
|
|
|
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;
|
|
|
|
|
2017-09-18 14:58:20 +00:00
|
|
|
#[macro_use]
|
|
|
|
extern crate error_chain;
|
|
|
|
|
2017-12-09 16:32:22 +00:00
|
|
|
#[macro_use]
|
|
|
|
extern crate lazy_static;
|
|
|
|
|
2017-03-07 10:53:57 +00:00
|
|
|
pub mod backend;
|
2017-09-22 08:46:00 +00:00
|
|
|
pub mod utils;
|
2018-09-24 22:32:09 +00:00
|
|
|
pub mod wayland;
|
2017-04-12 19:31:31 +00:00
|
|
|
|
2018-04-30 19:28:17 +00:00
|
|
|
#[cfg(feature = "xwayland")]
|
|
|
|
pub mod xwayland;
|
|
|
|
|
2017-04-12 19:31:31 +00:00
|
|
|
fn slog_or_stdlog<L>(logger: L) -> ::slog::Logger
|
2017-06-20 09:31:18 +00:00
|
|
|
where
|
|
|
|
L: Into<Option<::slog::Logger>>,
|
2017-04-12 19:31:31 +00:00
|
|
|
{
|
|
|
|
use slog::Drain;
|
2017-09-05 17:50:22 +00:00
|
|
|
logger
|
|
|
|
.into()
|
|
|
|
.unwrap_or_else(|| ::slog::Logger::root(::slog_stdlog::StdLog.fuse(), o!()))
|
2017-04-12 19:31:31 +00:00
|
|
|
}
|