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) -> TextAttributes {
unsafe {
from_glib_full(ffi::gtk_text_attributes_copy(mut_override(self.to_glib_none().0)))
}
}
}