gtk/print_operation.rs
1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use crate::PrintOperation;
4use glib::translate::*;
5use std::ptr;
6
7impl PrintOperation {
8 #[doc(alias = "gtk_print_operation_get_error")]
9 #[doc(alias = "get_error")]
10 pub fn error(&self) -> Option<glib::Error> {
11 unsafe {
12 let mut error = ptr::null_mut();
13 ffi::gtk_print_operation_get_error(self.to_glib_none().0, &mut error);
14 if error.is_null() {
15 None
16 } else {
17 Some(from_glib_full(error))
18 }
19 }
20 }
21}