gtk4_session_lock/
lib.rs

1#![cfg_attr(docsrs, feature(doc_cfg))]
2#![deny(warnings)]
3
4use gtk4_session_lock_sys as ffi;
5
6#[allow(unused_imports)]
7#[allow(clippy::single_component_path_imports)]
8use gdk; // Required for the documentation to build without warnings
9
10macro_rules! assert_initialized_main_thread {
11    () => {
12        if !::gtk::is_initialized_main_thread() {
13            if ::gtk::is_initialized() {
14                panic!("GTK may only be used from the main thread.");
15            } else {
16                panic!("GTK has not been initialized. Call `gtk::init` first.");
17            }
18        }
19    };
20}
21
22mod auto;
23pub use auto::functions::is_supported;
24
25#[cfg(feature = "v1_1")]
26#[cfg_attr(docsrs, doc(cfg(feature = "v1_1")))]
27pub use auto::Instance;