gtk4/
print_operation.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use glib::translate::*;
4
5use crate::PrintOperation;
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 = std::ptr::null_mut();
13            crate::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}