gtk4/print_settings.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::{PageRange, PrintSettings};
6
7impl PrintSettings {
8 /// Sets the value of [`PRINT_SETTINGS_PAGE_RANGES`][crate::PRINT_SETTINGS_PAGE_RANGES].
9 /// ## `page_ranges`
10 /// an array of [`PageRange`][crate::PageRange]s
11 #[doc(alias = "gtk_print_settings_set_page_ranges")]
12 pub fn set_page_ranges(&self, page_ranges: &[PageRange]) {
13 let num_ranges = page_ranges.len() as i32;
14 unsafe {
15 crate::ffi::gtk_print_settings_set_page_ranges(
16 self.to_glib_none().0,
17 mut_override(page_ranges.to_glib_none().0),
18 num_ranges,
19 );
20 }
21 }
22}