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

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

glib::wrapper! {
    #[doc(alias = "PangoCairoFont")]
    pub struct Font(Interface<ffi::PangoCairoFont>) @requires pango::Font;

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

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

pub trait PangoCairoFontExt: IsA<Font> + 'static {
    #[doc(alias = "pango_cairo_font_get_scaled_font")]
    #[doc(alias = "get_scaled_font")]
    fn scaled_font(&self) -> Option<cairo::ScaledFont> {
        unsafe {
            from_glib_none(ffi::pango_cairo_font_get_scaled_font(
                self.as_ref().to_glib_none().0,
            ))
        }
    }
}

impl<O: IsA<Font>> PangoCairoFontExt for O {}
