// This file was generated by gir (https://github.com/gtk-rs/gir)
// from 
// from ../gir-files-gstreamer
// from ../gir-files-gtk
// DO NOT EDIT

use crate::{ffi};
use glib::{prelude::*,signal::{connect_raw, SignalHandlerId},translate::*};
use std::{boxed::Box as Box_};

glib::wrapper! {
    #[doc(alias = "ClapperEnhancerProxy")]
    pub struct EnhancerProxy(Object<ffi::ClapperEnhancerProxy, ffi::ClapperEnhancerProxyClass>) @extends gst::Object;

    match fn {
        type_ => || ffi::clapper_enhancer_proxy_get_type(),
    }
}

impl EnhancerProxy {
    #[doc(alias = "clapper_enhancer_proxy_extra_data_lists_value")]
    pub fn extra_data_lists_value(&self, key: &str, value: &str) -> bool {
        unsafe {
            from_glib(ffi::clapper_enhancer_proxy_extra_data_lists_value(self.to_glib_none().0, key.to_glib_none().0, value.to_glib_none().0))
        }
    }

    #[doc(alias = "clapper_enhancer_proxy_get_description")]
    #[doc(alias = "get_description")]
    pub fn description(&self) -> Option<glib::GString> {
        unsafe {
            from_glib_none(ffi::clapper_enhancer_proxy_get_description(self.to_glib_none().0))
        }
    }

    #[doc(alias = "clapper_enhancer_proxy_get_extra_data")]
    #[doc(alias = "get_extra_data")]
    pub fn extra_data(&self, key: &str) -> Option<glib::GString> {
        unsafe {
            from_glib_none(ffi::clapper_enhancer_proxy_get_extra_data(self.to_glib_none().0, key.to_glib_none().0))
        }
    }

    #[doc(alias = "clapper_enhancer_proxy_get_friendly_name")]
    #[doc(alias = "get_friendly_name")]
    #[doc(alias = "friendly-name")]
    pub fn friendly_name(&self) -> Option<glib::GString> {
        unsafe {
            from_glib_none(ffi::clapper_enhancer_proxy_get_friendly_name(self.to_glib_none().0))
        }
    }

    #[doc(alias = "clapper_enhancer_proxy_get_module_dir")]
    #[doc(alias = "get_module_dir")]
    #[doc(alias = "module-dir")]
    pub fn module_dir(&self) -> Option<glib::GString> {
        unsafe {
            from_glib_none(ffi::clapper_enhancer_proxy_get_module_dir(self.to_glib_none().0))
        }
    }

    #[doc(alias = "clapper_enhancer_proxy_get_module_name")]
    #[doc(alias = "get_module_name")]
    #[doc(alias = "module-name")]
    pub fn module_name(&self) -> Option<glib::GString> {
        unsafe {
            from_glib_none(ffi::clapper_enhancer_proxy_get_module_name(self.to_glib_none().0))
        }
    }

    #[doc(alias = "clapper_enhancer_proxy_get_settings")]
    #[doc(alias = "get_settings")]
    pub fn settings(&self) -> Option<gio::Settings> {
        unsafe {
            from_glib_full(ffi::clapper_enhancer_proxy_get_settings(self.to_glib_none().0))
        }
    }

    #[doc(alias = "clapper_enhancer_proxy_get_target_creation_allowed")]
    #[doc(alias = "get_target_creation_allowed")]
    #[doc(alias = "target-creation-allowed")]
    pub fn is_target_creation_allowed(&self) -> bool {
        unsafe {
            from_glib(ffi::clapper_enhancer_proxy_get_target_creation_allowed(self.to_glib_none().0))
        }
    }

    //#[doc(alias = "clapper_enhancer_proxy_get_target_interfaces")]
    //#[doc(alias = "get_target_interfaces")]
    //pub fn target_interfaces(&self) -> /*Unimplemented*/Option<CArray TypeId { ns_id: 0, id: 30 }> {
    //    unsafe { TODO: call ffi:clapper_enhancer_proxy_get_target_interfaces() }
    //}

    //#[doc(alias = "clapper_enhancer_proxy_get_target_properties")]
    //#[doc(alias = "get_target_properties")]
    //pub fn target_properties(&self) -> /*Ignored*/Vec<glib::ParamSpec> {
    //    unsafe { TODO: call ffi:clapper_enhancer_proxy_get_target_properties() }
    //}

    #[doc(alias = "clapper_enhancer_proxy_get_version")]
    #[doc(alias = "get_version")]
    pub fn version(&self) -> Option<glib::GString> {
        unsafe {
            from_glib_none(ffi::clapper_enhancer_proxy_get_version(self.to_glib_none().0))
        }
    }

    //#[doc(alias = "clapper_enhancer_proxy_set_locally")]
    //pub fn set_locally(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) {
    //    unsafe { TODO: call ffi:clapper_enhancer_proxy_set_locally() }
    //}

    //#[doc(alias = "clapper_enhancer_proxy_set_locally_with_table")]
    //pub fn set_locally_with_table(&self, table: /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 3, id: 14 }) {
    //    unsafe { TODO: call ffi:clapper_enhancer_proxy_set_locally_with_table() }
    //}

    #[doc(alias = "clapper_enhancer_proxy_set_target_creation_allowed")]
    #[doc(alias = "target-creation-allowed")]
    pub fn set_target_creation_allowed(&self, allowed: bool) {
        unsafe {
            ffi::clapper_enhancer_proxy_set_target_creation_allowed(self.to_glib_none().0, allowed.into_glib());
        }
    }

    #[doc(alias = "clapper_enhancer_proxy_target_has_interface")]
    pub fn target_has_interface(&self, iface_type: glib::types::Type) -> bool {
        unsafe {
            from_glib(ffi::clapper_enhancer_proxy_target_has_interface(self.to_glib_none().0, iface_type.into_glib()))
        }
    }

    #[cfg(feature = "v0_10")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_10")))]
    #[doc(alias = "description")]
    pub fn connect_description_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_description_trampoline<F: Fn(&EnhancerProxy) + 'static>(this: *mut ffi::ClapperEnhancerProxy, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(&from_glib_borrow(this))
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::description".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_description_trampoline::<F> as *const ())), Box_::into_raw(f))
        }
    }

    #[cfg(feature = "v0_10")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_10")))]
    #[doc(alias = "friendly-name")]
    pub fn connect_friendly_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_friendly_name_trampoline<F: Fn(&EnhancerProxy) + 'static>(this: *mut ffi::ClapperEnhancerProxy, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(&from_glib_borrow(this))
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::friendly-name".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_friendly_name_trampoline::<F> as *const ())), Box_::into_raw(f))
        }
    }

    #[cfg(feature = "v0_10")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_10")))]
    #[doc(alias = "module-dir")]
    pub fn connect_module_dir_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_module_dir_trampoline<F: Fn(&EnhancerProxy) + 'static>(this: *mut ffi::ClapperEnhancerProxy, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(&from_glib_borrow(this))
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::module-dir".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_module_dir_trampoline::<F> as *const ())), Box_::into_raw(f))
        }
    }

    #[cfg(feature = "v0_10")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_10")))]
    #[doc(alias = "module-name")]
    pub fn connect_module_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_module_name_trampoline<F: Fn(&EnhancerProxy) + 'static>(this: *mut ffi::ClapperEnhancerProxy, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(&from_glib_borrow(this))
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::module-name".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_module_name_trampoline::<F> as *const ())), Box_::into_raw(f))
        }
    }

    #[cfg(feature = "v0_10")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_10")))]
    #[doc(alias = "target-creation-allowed")]
    pub fn connect_target_creation_allowed_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_target_creation_allowed_trampoline<F: Fn(&EnhancerProxy) + 'static>(this: *mut ffi::ClapperEnhancerProxy, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(&from_glib_borrow(this))
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::target-creation-allowed".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_target_creation_allowed_trampoline::<F> as *const ())), Box_::into_raw(f))
        }
    }

    #[cfg(feature = "v0_10")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_10")))]
    #[doc(alias = "version")]
    pub fn connect_version_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId {
        unsafe extern "C" fn notify_version_trampoline<F: Fn(&EnhancerProxy) + 'static>(this: *mut ffi::ClapperEnhancerProxy, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer) {
            let f: &F = &*(f as *const F);
            f(&from_glib_borrow(this))
        }
        unsafe {
            let f: Box_<F> = Box_::new(f);
            connect_raw(self.as_ptr() as *mut _, c"notify::version".as_ptr() as *const _,
                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(notify_version_trampoline::<F> as *const ())), Box_::into_raw(f))
        }
    }
}
