SourceCompletionProposalT

The proposal interface represents a completion item in the completion window. It provides information on how to display the completion item and what action should be taken when the completion item is activated.

Members

Functions

addOnChanged
void addOnChanged(void delegate(SourceCompletionProposalIF) dlg, ConnectFlags connectFlags)

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

changed
void changed()

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

equal
int equal(SourceCompletionProposalIF other)

Get whether two proposal objects are the same. This is used to (together with gtk_source_completion_proposal_hash()) to match proposals in the completion model. By default, it uses direct equality (g_direct_equal()).

getIcon
Pixbuf getIcon()

Gets the icon of proposal.

getInfo
string getInfo()

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().

getLabel
string getLabel()

Gets the label of proposal. 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 gtk_source_completion_proposal_get_markup(). The returned string must be freed with g_free().

getMarkup
string getMarkup()

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

getSourceCompletionProposalTStruct
GtkSourceCompletionProposal* getSourceCompletionProposalTStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getText
string getText()

Gets the text of proposal. 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 gtk_source_completion_provider_activate_proposal(). The returned string must be freed with g_free().

hash
uint hash()

Get the hash value of proposal. This is used to (together with gtk_source_completion_proposal_equal()) to match proposals in the completion model. By default, it uses a direct hash (g_direct_hash()).

Properties

onChangedListeners
void delegate(SourceCompletionProposalIF)[] onChangedListeners [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

callBackChanged
void callBackChanged(GtkSourceCompletionProposal* proposalStruct, SourceCompletionProposalIF _sourceCompletionProposalIF)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_onChangedListeners
void delegate(SourceCompletionProposalIF)[] _onChangedListeners;
Undocumented in source.
connectedSignals
int[string] connectedSignals;
gtkSourceCompletionProposal
GtkSourceCompletionProposal* gtkSourceCompletionProposal;

the main Gtk struct

Meta