atk/auto/
hyperlink_impl.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// DO NOT EDIT
4
5use atk_sys;
6use glib::object::IsA;
7use glib::translate::*;
8use std::fmt;
9use Hyperlink;
10
11glib_wrapper! {
12    pub struct HyperlinkImpl(Interface<atk_sys::AtkHyperlinkImpl>);
13
14    match fn {
15        get_type => || atk_sys::atk_hyperlink_impl_get_type(),
16    }
17}
18
19pub const NONE_HYPERLINK_IMPL: Option<&HyperlinkImpl> = None;
20
21pub trait HyperlinkImplExt: 'static {
22    fn get_hyperlink(&self) -> Option<Hyperlink>;
23}
24
25impl<O: IsA<HyperlinkImpl>> HyperlinkImplExt for O {
26    fn get_hyperlink(&self) -> Option<Hyperlink> {
27        unsafe {
28            from_glib_full(atk_sys::atk_hyperlink_impl_get_hyperlink(
29                self.as_ref().to_glib_none().0,
30            ))
31        }
32    }
33}
34
35impl fmt::Display for HyperlinkImpl {
36    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
37        write!(f, "HyperlinkImpl")
38    }
39}