glib/gobject/auto/binding.rs
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
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use crate::{ffi, translate::*, BindingFlags};
crate::wrapper! {
#[doc(alias = "GBinding")]
pub struct Binding(Object<crate::gobject_ffi::GBinding>);
match fn {
type_ => || crate::gobject_ffi::g_binding_get_type(),
}
}
impl Binding {
#[doc(alias = "g_binding_get_flags")]
#[doc(alias = "get_flags")]
pub fn flags(&self) -> BindingFlags {
unsafe {
from_glib(crate::gobject_ffi::g_binding_get_flags(
self.to_glib_none().0,
))
}
}
#[doc(alias = "g_binding_get_source_property")]
#[doc(alias = "get_source_property")]
#[doc(alias = "source-property")]
pub fn source_property(&self) -> crate::GString {
unsafe {
from_glib_none(crate::gobject_ffi::g_binding_get_source_property(
self.to_glib_none().0,
))
}
}
#[doc(alias = "g_binding_get_target_property")]
#[doc(alias = "get_target_property")]
#[doc(alias = "target-property")]
pub fn target_property(&self) -> crate::GString {
unsafe {
from_glib_none(crate::gobject_ffi::g_binding_get_target_property(
self.to_glib_none().0,
))
}
}
#[doc(alias = "g_binding_unbind")]
pub fn unbind(&self) {
unsafe {
crate::gobject_ffi::g_binding_unbind(self.to_glib_none().0);
}
}
}
unsafe impl Send for Binding {}
unsafe impl Sync for Binding {}