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 | |
5 | use crate::{translate::*, BindingFlags}; |
6 | use std::fmt; |
7 | |
8 | crate::wrapper! { |
9 | #[doc (alias = "GBinding" )] |
10 | pub struct Binding(Object<gobject_ffi::GBinding>); |
11 | |
12 | match fn { |
13 | type_ => || gobject_ffi::g_binding_get_type(), |
14 | } |
15 | } |
16 | |
17 | impl Binding { |
18 | #[doc (alias = "g_binding_get_flags" )] |
19 | #[doc (alias = "get_flags" )] |
20 | pub fn flags(&self) -> BindingFlags { |
21 | unsafe { from_glib(gobject_ffi::g_binding_get_flags(self.to_glib_none().0)) } |
22 | } |
23 | |
24 | #[doc (alias = "g_binding_get_source_property" )] |
25 | #[doc (alias = "get_source_property" )] |
26 | pub fn source_property(&self) -> crate::GString { |
27 | unsafe { |
28 | from_glib_none(gobject_ffi::g_binding_get_source_property( |
29 | self.to_glib_none().0, |
30 | )) |
31 | } |
32 | } |
33 | |
34 | #[doc (alias = "g_binding_get_target_property" )] |
35 | #[doc (alias = "get_target_property" )] |
36 | pub fn target_property(&self) -> crate::GString { |
37 | unsafe { |
38 | from_glib_none(gobject_ffi::g_binding_get_target_property( |
39 | self.to_glib_none().0, |
40 | )) |
41 | } |
42 | } |
43 | |
44 | #[doc (alias = "g_binding_unbind" )] |
45 | pub fn unbind(&self) { |
46 | unsafe { |
47 | gobject_ffi::g_binding_unbind(self.to_glib_none().0); |
48 | } |
49 | } |
50 | } |
51 | |
52 | unsafe impl Send for Binding {} |
53 | unsafe impl Sync for Binding {} |
54 | |
55 | impl fmt::Display for Binding { |
56 | fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { |
57 | f.write_str(data:"Binding" ) |
58 | } |
59 | } |
60 | |