1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from
// from gir-files (https://github.com/gtk-rs/gir-files.git)
// DO NOT EDIT

use glib::{prelude::*, translate::*};

/// Computes the ease out for a value.
/// ## `t`
/// the term
///
/// # Returns
///
/// the ease out for @t
#[doc(alias = "hdy_ease_out_cubic")]
pub fn ease_out_cubic(t: f64) -> f64 {
    assert_initialized_main_thread!();
    unsafe { ffi::hdy_ease_out_cubic(t) }
}

//#[doc(alias = "hdy_enum_value_row_name")]
//pub fn enum_value_row_name(value: &EnumValueObject, user_data: /*Unimplemented*/Option<Basic: Pointer>) -> Option<glib::GString> {
//    unsafe { TODO: call ffi:hdy_enum_value_row_name() }
//}

/// Checks whether animations are enabled for @widget.
///
/// This should be used when implementing an animated widget to know whether to
/// animate it or not.
/// ## `widget`
/// a widget
///
/// # Returns
///
/// whether animations are enabled for @widget
#[doc(alias = "hdy_get_enable_animations")]
#[doc(alias = "get_enable_animations")]
pub fn enables_animations(widget: &impl IsA<gtk::Widget>) -> bool {
    assert_initialized_main_thread!();
    unsafe {
        from_glib(ffi::hdy_get_enable_animations(
            widget.as_ref().to_glib_none().0,
        ))
    }
}

/// Initializes Libhandy.
///
/// Call this function just after initializing GTK, if you are using
/// `Gtk::Application` it means it must be called when the
/// [`startup`][struct@crate::Gio::Application#startup] signal is emitted.
///
/// If Libhandy has already been initialized, the function will simply return.
///
/// This makes sure translations, types, themes, and icons for the Handy library
/// are set up properly.
#[doc(alias = "hdy_init")]
pub fn init() {
    assert_initialized_main_thread!();
    unsafe {
        ffi::hdy_init();
    }
}