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
// This file was generated by gir (9e3f4cc) from gir-files (71d73f0)
// DO NOT EDIT

use Widget;
use ffi;
use glib::object::IsA;
use glib::translate::*;

glib_wrapper! {
    pub struct TextChildAnchor(Object<ffi::GtkTextChildAnchor>);

    match fn {
        get_type => || ffi::gtk_text_child_anchor_get_type(),
    }
}

impl TextChildAnchor {
    pub fn new() -> TextChildAnchor {
        assert_initialized_main_thread!();
        unsafe {
            from_glib_full(ffi::gtk_text_child_anchor_new())
        }
    }
}

pub trait TextChildAnchorExt {
    fn get_deleted(&self) -> bool;

    fn get_widgets(&self) -> Vec<Widget>;
}

impl<O: IsA<TextChildAnchor>> TextChildAnchorExt for O {
    fn get_deleted(&self) -> bool {
        unsafe {
            from_glib(ffi::gtk_text_child_anchor_get_deleted(self.to_glib_none().0))
        }
    }

    fn get_widgets(&self) -> Vec<Widget> {
        unsafe {
            FromGlibPtrContainer::from_glib_container(ffi::gtk_text_child_anchor_get_widgets(self.to_glib_none().0))
        }
    }
}