libshumate 0.8.0

Rust bindings for libshumate
// 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::{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")
    }
}