Savanni D'Gerinel
6c68564a77
This is only available in test code, and it allows GUI component tests to run without having to worry about double-initializing GTK
11 lines
192 B
Rust
11 lines
192 B
Rust
use std::sync::Once;
|
|
|
|
static INITIALIZED: Once = Once::new();
|
|
|
|
pub fn gtk_init() {
|
|
INITIALIZED.call_once(|| {
|
|
eprintln!("initializing GTK");
|
|
let _ = gtk::init();
|
|
});
|
|
}
|