diff --git a/Cargo.toml b/Cargo.toml index 7965426..3fc3101 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ slog-term = "2.3" gl_generator = { version = "0.10", optional = true } [features] -default = ["backend_winit", "backend_drm_legacy", "backend_drm_gbm", "backend_drm_egl", "backend_libinput", "backend_udev", "backend_session", "renderer_glium", "xwayland", "wayland_frontend"] +default = ["backend_winit", "backend_drm_legacy", "backend_drm_gbm", "backend_drm_egl", "backend_libinput", "backend_udev", "backend_session_logind", "renderer_glium", "xwayland", "wayland_frontend"] backend_winit = ["winit", "wayland-server/dlopen", "wayland-client/dlopen", "backend_egl", "renderer_gl", "use_system_lib"] backend_drm = ["drm"] backend_drm_legacy = ["backend_drm"] diff --git a/anvil/Cargo.toml b/anvil/Cargo.toml index 84864fa..a90fed6 100644 --- a/anvil/Cargo.toml +++ b/anvil/Cargo.toml @@ -25,7 +25,7 @@ features = [ "renderer_glium", "backend_egl", "wayland_frontend" ] gl_generator = "0.10" [features] -default = [ "winit", "egl", "udev" ] +default = [ "winit", "egl", "udev", "logind" ] egl = [ "smithay/use_system_lib" ] winit = [ "smithay/backend_winit" ] udev = [ "smithay/backend_libinput", "smithay/backend_drm_legacy", "smithay/backend_drm_gbm", "smithay/backend_drm_egl", "smithay/backend_udev", "smithay/backend_session" ] diff --git a/src/utils/signaling.rs b/src/utils/signaling.rs new file mode 100644 index 0000000..c88d921 --- /dev/null +++ b/src/utils/signaling.rs @@ -0,0 +1,39 @@ +use std::{rc::Rc, cell::RefCell}; + +struct SignalerInner { + closures: RefCell>> +} + +impl SignalerInner { + fn new() -> SignalerInner { + SignalerInner { + closures: RefCell::new(Vec::new()) + } + } +} + +pub struct Signaler { + inner: Rc> +} + +impl Clone for Signaler { + fn clone(&self) -> Signaler { + Signaler { + inner: self.inner.clone() + } + } +} + +impl Signaler { + pub fn new() -> Signaler { + Signaler { + inner: Rc::new(SignalerInner::new()) + } + } + + fn register_closure(&self, f: F) { + } + + fn send_event(&self, event: &mut E) { + } +}