// 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::Hyperlink;
use glib::{prelude::*, translate::*};
use std::fmt;

glib::wrapper! {
    #[doc(alias = "AtkHyperlinkImpl")]
    pub struct HyperlinkImpl(Interface<ffi::AtkHyperlinkImpl, ffi::AtkHyperlinkImplIface>);

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

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

mod sealed {
    pub trait Sealed {}
    impl<T: super::IsA<super::HyperlinkImpl>> Sealed for T {}
}

pub trait HyperlinkImplExt: IsA<HyperlinkImpl> + sealed::Sealed + 'static {
    #[doc(alias = "atk_hyperlink_impl_get_hyperlink")]
    #[doc(alias = "get_hyperlink")]
    fn hyperlink(&self) -> Option<Hyperlink> {
        unsafe {
            from_glib_full(ffi::atk_hyperlink_impl_get_hyperlink(
                self.as_ref().to_glib_none().0,
            ))
        }
    }
}

impl<O: IsA<HyperlinkImpl>> HyperlinkImplExt for O {}

impl fmt::Display for HyperlinkImpl {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        f.write_str("HyperlinkImpl")
    }
}
