use crate::ffi;
use glib::prelude::*;
#[cfg(feature = "v5_6")]
#[cfg_attr(docsrs, doc(cfg(feature = "v5_6")))]
use glib::translate::*;
glib::wrapper! {
#[doc(alias = "GtkSourceCompletionProposal")]
pub struct CompletionProposal(Interface<ffi::GtkSourceCompletionProposal, ffi::GtkSourceCompletionProposalInterface>);
match fn {
type_ => || ffi::gtk_source_completion_proposal_get_type(),
}
}
impl CompletionProposal {
pub const NONE: Option<&'static CompletionProposal> = None;
}
pub trait CompletionProposalExt: IsA<CompletionProposal> + 'static {
#[cfg(feature = "v5_6")]
#[cfg_attr(docsrs, doc(cfg(feature = "v5_6")))]
#[doc(alias = "gtk_source_completion_proposal_get_typed_text")]
#[doc(alias = "get_typed_text")]
fn typed_text(&self) -> Option<glib::GString> {
unsafe {
from_glib_full(ffi::gtk_source_completion_proposal_get_typed_text(
self.as_ref().to_glib_none().0,
))
}
}
}
impl<O: IsA<CompletionProposal>> CompletionProposalExt for O {}