// This file was generated by gir (https://github.com/gtk-rs/gir)
// from
// from gir-files (https://github.com/gtk-rs/gir-files.git)
// DO NOT EDIT

use crate::{ffi, VectorReaderIter};
use glib::translate::*;

glib::wrapper! {
    #[doc(alias = "ShumateVectorReader")]
    pub struct VectorReader(Object<ffi::ShumateVectorReader, ffi::ShumateVectorReaderClass>);

    match fn {
        type_ => || ffi::shumate_vector_reader_get_type(),
    }
}

impl VectorReader {
    #[doc(alias = "shumate_vector_reader_new")]
    pub fn new(bytes: &glib::Bytes) -> VectorReader {
        assert_initialized_main_thread!();
        unsafe { from_glib_full(ffi::shumate_vector_reader_new(bytes.to_glib_none().0)) }
    }

    #[doc(alias = "shumate_vector_reader_iterate")]
    pub fn iterate(&self) -> Option<VectorReaderIter> {
        unsafe { from_glib_full(ffi::shumate_vector_reader_iterate(self.to_glib_none().0)) }
    }
}
