Skip to main content

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 crate::{Hyperlink, ffi};
6use glib::{prelude::*, translate::*};
7
8glib::wrapper! {
9    /// A queryable interface which allows AtkHyperlink instances
10    /// associated with an AtkObject to be obtained. AtkHyperlinkImpl
11    /// corresponds to AT-SPI's Hyperlink interface, and differs from
12    /// AtkHyperlink in that AtkHyperlink is an object type, rather than an
13    /// interface, and thus cannot be directly queried. FTW
14    ///
15    /// # Implements
16    ///
17    /// [`HyperlinkImplExt`][trait@crate::prelude::HyperlinkImplExt]
18    #[doc(alias = "AtkHyperlinkImpl")]
19    pub struct HyperlinkImpl(Interface<ffi::AtkHyperlinkImpl, ffi::AtkHyperlinkImplIface>);
20
21    match fn {
22        type_ => || ffi::atk_hyperlink_impl_get_type(),
23    }
24}
25
26impl HyperlinkImpl {
27    pub const NONE: Option<&'static HyperlinkImpl> = None;
28}
29
30/// Trait containing all [`struct@HyperlinkImpl`] methods.
31///
32/// # Implementors
33///
34/// [`HyperlinkImpl`][struct@crate::HyperlinkImpl]
35pub trait HyperlinkImplExt: IsA<HyperlinkImpl> + 'static {
36    /// Gets the hyperlink associated with this object.
37    ///
38    /// # Returns
39    ///
40    /// an AtkHyperlink object which points to this
41    /// implementing AtkObject.
42    #[doc(alias = "atk_hyperlink_impl_get_hyperlink")]
43    #[doc(alias = "get_hyperlink")]
44    fn hyperlink(&self) -> Option<Hyperlink> {
45        unsafe {
46            from_glib_full(ffi::atk_hyperlink_impl_get_hyperlink(
47                self.as_ref().to_glib_none().0,
48            ))
49        }
50    }
51}
52
53impl<O: IsA<HyperlinkImpl>> HyperlinkImplExt for O {}