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::translate::*;
6 
7 glib::wrapper! {
8     #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
9     pub struct TextAttributes(Shared<ffi::GtkTextAttributes>);
10 
11     match fn {
12         ref => |ptr| ffi::gtk_text_attributes_ref(ptr),
13         unref => |ptr| ffi::gtk_text_attributes_unref(ptr),
14         type_ => || ffi::gtk_text_attributes_get_type(),
15     }
16 }
17 
18 impl TextAttributes {
19     #[doc(alias = "gtk_text_attributes_new")]
new() -> TextAttributes20     pub fn new() -> TextAttributes {
21         assert_initialized_main_thread!();
22         unsafe { from_glib_full(ffi::gtk_text_attributes_new()) }
23     }
24 
25     #[doc(alias = "gtk_text_attributes_copy")]
copy(&self) -> Option<TextAttributes>26     pub fn copy(&self) -> Option<TextAttributes> {
27         unsafe { from_glib_full(ffi::gtk_text_attributes_copy(self.to_glib_none().0)) }
28     }
29 
30     #[doc(alias = "gtk_text_attributes_copy_values")]
copy_values(&self, dest: &TextAttributes)31     pub fn copy_values(&self, dest: &TextAttributes) {
32         unsafe {
33             ffi::gtk_text_attributes_copy_values(self.to_glib_none().0, dest.to_glib_none().0);
34         }
35     }
36 }
37 
38 impl Default for TextAttributes {
default() -> Self39     fn default() -> Self {
40         Self::new()
41     }
42 }
43