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
59
60
61
62
63
64
65
66
// 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::{prelude::*, translate::*, Object};

crate::wrapper! {
    #[doc(alias = "GSignalGroup")]
    pub struct SignalGroup(Object<gobject_ffi::GSignalGroup>);

    match fn {
        type_ => || gobject_ffi::g_signal_group_get_type(),
    }
}

impl SignalGroup {
    #[doc(alias = "g_signal_group_new")]
    #[doc(alias = "new")]
    pub fn with_type(target_type: crate::types::Type) -> SignalGroup {
        unsafe { from_glib_full(gobject_ffi::g_signal_group_new(target_type.into_glib())) }
    }

    #[doc(alias = "g_signal_group_block")]
    pub fn block(&self) {
        unsafe {
            gobject_ffi::g_signal_group_block(self.to_glib_none().0);
        }
    }

    #[doc(alias = "g_signal_group_dup_target")]
    #[doc(alias = "dup_target")]
    pub fn target(&self) -> Option<Object> {
        unsafe {
            from_glib_full(gobject_ffi::g_signal_group_dup_target(
                self.to_glib_none().0,
            ))
        }
    }

    #[doc(alias = "g_signal_group_set_target")]
    pub fn set_target(&self, target: Option<&impl IsA<Object>>) {
        unsafe {
            gobject_ffi::g_signal_group_set_target(
                self.to_glib_none().0,
                target.map(|p| p.as_ref()).to_glib_none().0,
            );
        }
    }

    #[doc(alias = "g_signal_group_unblock")]
    pub fn unblock(&self) {
        unsafe {
            gobject_ffi::g_signal_group_unblock(self.to_glib_none().0);
        }
    }

    #[cfg(feature = "v2_72")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v2_72")))]
    #[doc(alias = "target-type")]
    pub fn target_type(&self) -> crate::types::Type {
        ObjectExt::property(self, "target-type")
    }
}

unsafe impl Send for SignalGroup {}
unsafe impl Sync for SignalGroup {}