glib/gobject/auto/
binding.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use crate::{ffi, translate::*, BindingFlags};
6
7crate::wrapper! {
8    #[doc(alias = "GBinding")]
9    pub struct Binding(Object<crate::gobject_ffi::GBinding>);
10
11    match fn {
12        type_ => || crate::gobject_ffi::g_binding_get_type(),
13    }
14}
15
16impl Binding {
17    #[doc(alias = "g_binding_get_flags")]
18    #[doc(alias = "get_flags")]
19    pub fn flags(&self) -> BindingFlags {
20        unsafe {
21            from_glib(crate::gobject_ffi::g_binding_get_flags(
22                self.to_glib_none().0,
23            ))
24        }
25    }
26
27    #[doc(alias = "g_binding_get_source_property")]
28    #[doc(alias = "get_source_property")]
29    #[doc(alias = "source-property")]
30    pub fn source_property(&self) -> crate::GString {
31        unsafe {
32            from_glib_none(crate::gobject_ffi::g_binding_get_source_property(
33                self.to_glib_none().0,
34            ))
35        }
36    }
37
38    #[doc(alias = "g_binding_get_target_property")]
39    #[doc(alias = "get_target_property")]
40    #[doc(alias = "target-property")]
41    pub fn target_property(&self) -> crate::GString {
42        unsafe {
43            from_glib_none(crate::gobject_ffi::g_binding_get_target_property(
44                self.to_glib_none().0,
45            ))
46        }
47    }
48
49    #[doc(alias = "g_binding_unbind")]
50    pub fn unbind(&self) {
51        unsafe {
52            crate::gobject_ffi::g_binding_unbind(self.to_glib_none().0);
53        }
54    }
55}
56
57unsafe impl Send for Binding {}
58unsafe impl Sync for Binding {}