// 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::translate::*;

glib::wrapper! {
    #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct SpringParams(Shared<ffi::AdwSpringParams>);

    match fn {
        ref => |ptr| ffi::adw_spring_params_ref(ptr),
        unref => |ptr| ffi::adw_spring_params_unref(ptr),
        type_ => || ffi::adw_spring_params_get_type(),
    }
}

impl SpringParams {
    #[doc(alias = "adw_spring_params_new")]
    pub fn new(damping_ratio: f64, mass: f64, stiffness: f64) -> SpringParams {
        assert_initialized_main_thread!();
        unsafe { from_glib_full(ffi::adw_spring_params_new(damping_ratio, mass, stiffness)) }
    }

    #[doc(alias = "adw_spring_params_new_full")]
    pub fn new_full(damping: f64, mass: f64, stiffness: f64) -> SpringParams {
        assert_initialized_main_thread!();
        unsafe { from_glib_full(ffi::adw_spring_params_new_full(damping, mass, stiffness)) }
    }

    #[doc(alias = "adw_spring_params_get_damping")]
    #[doc(alias = "get_damping")]
    pub fn damping(&self) -> f64 {
        unsafe { ffi::adw_spring_params_get_damping(self.to_glib_none().0) }
    }

    #[doc(alias = "adw_spring_params_get_damping_ratio")]
    #[doc(alias = "get_damping_ratio")]
    pub fn damping_ratio(&self) -> f64 {
        unsafe { ffi::adw_spring_params_get_damping_ratio(self.to_glib_none().0) }
    }

    #[doc(alias = "adw_spring_params_get_mass")]
    #[doc(alias = "get_mass")]
    pub fn mass(&self) -> f64 {
        unsafe { ffi::adw_spring_params_get_mass(self.to_glib_none().0) }
    }

    #[doc(alias = "adw_spring_params_get_stiffness")]
    #[doc(alias = "get_stiffness")]
    pub fn stiffness(&self) -> f64 {
        unsafe { ffi::adw_spring_params_get_stiffness(self.to_glib_none().0) }
    }
}
