use ffi;
pub struct TextAttributes {
pointer: *mut ffi::GtkTextAttributes
}
impl TextAttributes {
pub fn new() -> Option<TextAttributes> {
assert_initialized_main_thread!();
let tmp_pointer = unsafe { ffi::gtk_text_attributes_new() };
if tmp_pointer.is_null() {
None
} else {
Some(TextAttributes { pointer : tmp_pointer })
}
}
pub fn copy(&self) -> Option<TextAttributes> {
let tmp_pointer = unsafe { ffi::gtk_text_attributes_copy(self.pointer) };
if tmp_pointer.is_null() {
None
} else {
Some(TextAttributes { pointer : tmp_pointer })
}
}
pub fn copy_values_from(&self, src: &TextAttributes) {
unsafe { ffi::gtk_text_attributes_copy_values(src.pointer, self.pointer) }
}
pub fn unref(&self) {
unsafe { ffi::gtk_text_attributes_unref(self.pointer) }
}
pub fn _ref(&self) -> Option<TextAttributes> {
let tmp_pointer = unsafe { ffi::gtk_text_attributes_ref(self.pointer) };
if tmp_pointer.is_null() {
None
} else {
Some(TextAttributes { pointer : tmp_pointer })
}
}
}
impl_GObjectFunctions!(TextAttributes, GtkTextAttributes);
impl_TraitObject!(TextAttributes, GtkTextAttributes);