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

use ffi;
use glib::translate::*;

glib_wrapper! {
    pub struct TextAttributes(Shared<ffi::GtkTextAttributes>);

    match fn {
        ref => |ptr| ffi::gtk_text_attributes_ref(ptr),
        unref => |ptr| ffi::gtk_text_attributes_unref(ptr),
    }
}

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

    pub fn copy(&self) -> Option<TextAttributes> {
        unsafe {
            from_glib_full(ffi::gtk_text_attributes_copy(self.to_glib_none().0))
        }
    }

    pub fn copy_values(&self, dest: &TextAttributes) {
        unsafe {
            ffi::gtk_text_attributes_copy_values(self.to_glib_none().0, dest.to_glib_none().0);
        }
    }
}