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 glib::object::IsA; 6 use glib::translate::*; 7 use gtk_sys; 8 use std::fmt; 9 use Widget; 10 11 glib_wrapper! { 12 pub struct TextChildAnchor(Object<gtk_sys::GtkTextChildAnchor, gtk_sys::GtkTextChildAnchorClass, TextChildAnchorClass>); 13 14 match fn { 15 get_type => || gtk_sys::gtk_text_child_anchor_get_type(), 16 } 17 } 18 19 impl TextChildAnchor { new() -> TextChildAnchor20 pub fn new() -> TextChildAnchor { 21 assert_initialized_main_thread!(); 22 unsafe { from_glib_full(gtk_sys::gtk_text_child_anchor_new()) } 23 } 24 } 25 26 impl Default for TextChildAnchor { default() -> Self27 fn default() -> Self { 28 Self::new() 29 } 30 } 31 32 pub const NONE_TEXT_CHILD_ANCHOR: Option<&TextChildAnchor> = None; 33 34 pub trait TextChildAnchorExt: 'static { get_deleted(&self) -> bool35 fn get_deleted(&self) -> bool; 36 get_widgets(&self) -> Vec<Widget>37 fn get_widgets(&self) -> Vec<Widget>; 38 } 39 40 impl<O: IsA<TextChildAnchor>> TextChildAnchorExt for O { get_deleted(&self) -> bool41 fn get_deleted(&self) -> bool { 42 unsafe { 43 from_glib(gtk_sys::gtk_text_child_anchor_get_deleted( 44 self.as_ref().to_glib_none().0, 45 )) 46 } 47 } 48 get_widgets(&self) -> Vec<Widget>49 fn get_widgets(&self) -> Vec<Widget> { 50 unsafe { 51 FromGlibPtrContainer::from_glib_container(gtk_sys::gtk_text_child_anchor_get_widgets( 52 self.as_ref().to_glib_none().0, 53 )) 54 } 55 } 56 } 57 58 impl fmt::Display for TextChildAnchor { fmt(&self, f: &mut fmt::Formatter) -> fmt::Result59 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 60 write!(f, "TextChildAnchor") 61 } 62 } 63