1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use crate::ffi;
use glib::translate::*;
glib::wrapper! {
/// A [`PageTransition`][crate::PageTransition] structures describes a visual transition
/// to use when moving between pages during a presentation
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct PageTransition(Boxed<ffi::PopplerPageTransition>);
match fn {
copy => |ptr| ffi::poppler_page_transition_copy(mut_override(ptr)),
free => |ptr| ffi::poppler_page_transition_free(ptr),
type_ => || ffi::poppler_page_transition_get_type(),
}
}
impl PageTransition {
/// Creates a new [`PageTransition`][crate::PageTransition]
///
/// # Returns
///
/// a new [`PageTransition`][crate::PageTransition], use `poppler_page_transition_free()` to free it
#[doc(alias = "poppler_page_transition_new")]
pub fn new() -> PageTransition {
unsafe { from_glib_full(ffi::poppler_page_transition_new()) }
}
}
impl Default for PageTransition {
fn default() -> Self {
Self::new()
}
}