1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Take a look at the license at the top of the repository in the LICENSE file.

/// Initializes Libadwaita.
///
/// This function can be used instead of `init()` as it initializes GTK
/// implicitly.
///
/// There's no need to call this function if you're using [`Application`][crate::Application].
///
/// If Libadwaita has already been initialized, the function will simply return.
///
/// This makes sure translations, types, themes, and icons for the Adwaita
/// library are set up properly.
#[doc(alias = "adw_init")]
pub fn init() -> Result<(), glib::BoolError> {
    skip_assert_initialized!();
    gtk::init()?;
    unsafe {
        ffi::adw_init();
    }
    Ok(())
}