Informs this crate that Clutter has been initialized and the current thread is the main one.
()
| 55 | |
| 56 | /// Informs this crate that Clutter has been initialized and the current thread is the main one. |
| 57 | pub unsafe fn set_initialized() { |
| 58 | skip_assert_initialized!(); |
| 59 | if is_initialized_main_thread() { |
| 60 | return; |
| 61 | } else if is_initialized() { |
| 62 | panic!("Attempted to initialize GDK from two different threads."); |
| 63 | } |
| 64 | INITIALIZED.store(true, Ordering::Release); |
| 65 | IS_MAIN_THREAD.with(|c| c.set(true)); |
| 66 | } |
| 67 | |
| 68 | pub fn init() { |
| 69 | assert_not_initialized!(); |
nothing calls this directly
no test coverage detected