use crate::{DataSource, ffi};
use glib::{prelude::*, translate::*};
glib::wrapper! {
#[doc(alias = "ShumateTileDownloader")]
pub struct TileDownloader(Object<ffi::ShumateTileDownloader, ffi::ShumateTileDownloaderClass>) @extends DataSource;
match fn {
type_ => || ffi::shumate_tile_downloader_get_type(),
}
}
impl TileDownloader {
#[doc(alias = "shumate_tile_downloader_new")]
pub fn new(url_template: &str) -> TileDownloader {
assert_initialized_main_thread!();
unsafe {
from_glib_full(ffi::shumate_tile_downloader_new(
url_template.to_glib_none().0,
))
}
}
#[doc(alias = "url-template")]
pub fn url_template(&self) -> Option<glib::GString> {
ObjectExt::property(self, "url-template")
}
}