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

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

glib::wrapper! {
    #[doc(alias = "PpsFontDescription")]
    pub struct FontDescription(Object<ffi::PpsFontDescription, ffi::PpsFontDescriptionClass>);

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

impl FontDescription {
    pub const NONE: Option<&'static FontDescription> = None;

    #[doc(alias = "pps_font_description_new")]
    pub fn new() -> FontDescription {
        assert_initialized_main_thread!();
        unsafe { from_glib_full(ffi::pps_font_description_new()) }
    }
}

impl Default for FontDescription {
    fn default() -> Self {
        Self::new()
    }
}

pub trait FontDescriptionExt: IsA<FontDescription> + 'static {
    fn details(&self) -> Option<glib::GString> {
        ObjectExt::property(self.as_ref(), "details")
    }

    fn name(&self) -> Option<glib::GString> {
        ObjectExt::property(self.as_ref(), "name")
    }
}

impl<O: IsA<FontDescription>> FontDescriptionExt for O {}
