// This file was generated by gir (https://github.com/gtk-rs/gir)
// DO NOT EDIT
use glib::{translate::*};
glib::wrapper! {
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct Iterator(Shared<ffi::WpIterator>);
match fn {
ref => |ptr| ffi::wp_iterator_ref(ptr),
unref => |ptr| ffi::wp_iterator_unref(ptr),
type_ => || ffi::wp_iterator_get_type(),
}
}
impl Iterator {
#[doc(alias = "wp_iterator_next")]
pub fn next(&self) -> Option<glib::Value> {
unsafe {
let mut item = glib::Value::uninitialized();
let ret = from_glib(ffi::wp_iterator_next(self.to_glib_none().0, item.to_glib_none_mut().0));
if ret { Some(item) } else { None }
}
}
#[doc(alias = "wp_iterator_reset")]
pub fn reset(&self) {
unsafe {
ffi::wp_iterator_reset(self.to_glib_none().0);
}
}
}