pub trait CompletionProposalExt: IsA<CompletionProposal> + Sealed + 'static {
    // Provided methods
    fn changed(&self) { ... }
    fn equal(&self, other: &impl IsA<CompletionProposal>) -> bool { ... }
    fn gicon(&self) -> Option<Icon> { ... }
    fn icon(&self) -> Option<Pixbuf> { ... }
    fn icon_name(&self) -> Option<GString> { ... }
    fn info(&self) -> Option<GString> { ... }
    fn label(&self) -> Option<GString> { ... }
    fn markup(&self) -> Option<GString> { ... }
    fn text(&self) -> Option<GString> { ... }
    fn hash(&self) -> u32 { ... }
    fn connect_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
    fn emit_changed(&self) { ... }
}
Expand description

Provided Methods§

source

fn changed(&self)

Emits the “changed” signal on self. This should be called by implementations whenever the name, icon or info of the proposal has changed.

source

fn equal(&self, other: &impl IsA<CompletionProposal>) -> bool

source

fn gicon(&self) -> Option<Icon>

Gets the gio::Icon for the icon of self.

Returns

A gio::Icon with the icon of self.

source

fn icon(&self) -> Option<Pixbuf>

Gets the gdk_pixbuf::Pixbuf for the icon of self.

Returns

A gdk_pixbuf::Pixbuf with the icon of self.

source

fn icon_name(&self) -> Option<GString>

Gets the icon name of self.

Returns

The icon name of self.

source

fn info(&self) -> Option<GString>

Gets extra information associated to the proposal. This information will be used to present the user with extra, detailed information about the selected proposal. The returned string must be freed with g_free().

Returns

a newly-allocated string containing extra information of self or None if no extra information is associated to self.

source

fn label(&self) -> Option<GString>

Gets the label of self. The label is shown in the list of proposals as plain text. If you need any markup (such as bold or italic text), you have to implement markup(). The returned string must be freed with g_free().

Returns

a new string containing the label of self.

source

fn markup(&self) -> Option<GString>

Gets the label of self with markup. The label is shown in the list of proposals and may contain markup. This will be used instead of label() if implemented. The returned string must be freed with g_free().

Returns

a new string containing the label of self with markup.

source

fn text(&self) -> Option<GString>

Gets the text of self. The text that is inserted into the text buffer when the proposal is activated by the default activation. You are free to implement a custom activation handler in the provider and not implement this function. For more information, see CompletionProviderExt::activate_proposal(). The returned string must be freed with g_free().

Returns

a new string containing the text of self.

source

fn hash(&self) -> u32

source

fn connect_changed<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Emitted when the proposal has changed. The completion popup will react to this by updating the shown information.

source

fn emit_changed(&self)

Object Safety§

This trait is not object safe.

Implementors§