SourceCompletionProviderT

You must implement this interface to provide proposals to GtkSourceCompletion

Members

Functions

getSourceCompletionProviderTStruct
GtkSourceCompletionProvider* getSourceCompletionProviderTStruct()

Get the main Gtk struct

gtkSourceCompletionProviderActivateProposal
int gtkSourceCompletionProviderActivateProposal(SourceCompletionProposalIF proposal, TextIter iter)

Activate proposal at iter. When this functions returns FALSE, the default activation of proposal will take place which replaces the word at iter with the text of proposal (see gtk_source_completion_proposal_get_text()). Here is how the default activation selects the boundaries of the word to replace. The end of the word is iter. For the start of the word, it depends on whether a start iter is defined for proposal (see gtk_source_completion_provider_get_start_iter()). If a start iter is defined, the start of the word is the start iter. Else, the word (as long as possible) will contain only alphanumerical and the "_" characters.

gtkSourceCompletionProviderGetActivation
GtkSourceCompletionActivation gtkSourceCompletionProviderGetActivation()

Get with what kind of activation the provider should be activated.

gtkSourceCompletionProviderGetIcon
Pixbuf gtkSourceCompletionProviderGetIcon()

Get the icon of the provider.

gtkSourceCompletionProviderGetInfoWidget
Widget gtkSourceCompletionProviderGetInfoWidget(SourceCompletionProposalIF proposal)

Get a customized info widget to show extra information of a proposal. This allows for customized widgets on a proposal basis, although in general providers will have the same custom widget for all their proposals and proposal can be ignored. The implementation of this function is optional. If this function is not implemented, the default widget is a GtkLabel. The return value of gtk_source_completion_proposal_get_info() is used as the content of the GtkLabel. Note If implemented, gtk_source_completion_provider_update_info() must also be implemented.

gtkSourceCompletionProviderGetInteractiveDelay
int gtkSourceCompletionProviderGetInteractiveDelay()

Get the delay in milliseconds before starting interactive completion for this provider. A value of -1 indicates to use the default value as set by the "auto-complete-delay" property.

gtkSourceCompletionProviderGetName
string gtkSourceCompletionProviderGetName()

Get the name of the provider. This should be a translatable name for display to the user. For example: _("Document word completion provider"). The returned string must be freed with g_free().

gtkSourceCompletionProviderGetPriority
int gtkSourceCompletionProviderGetPriority()

Get the provider priority. The priority determines the order in which proposals appear in the completion popup. Higher priorities are sorted before lower priorities. The default priority is 0.

gtkSourceCompletionProviderGetStartIter
int gtkSourceCompletionProviderGetStartIter(SourceCompletionContext context, SourceCompletionProposalIF proposal, TextIter iter)

Get the GtkTextIter at which the completion for proposal starts. When implemented, this information is used to position the completion window accordingly when a proposal is selected in the completion window. The proposal text inside the completion window is aligned on iter. If this function is not implemented, the word boundary is taken to position the completion window. See gtk_source_completion_provider_activate_proposal() for an explanation on the word boundaries. When the proposal is activated, the default handler uses iter as the start of the word to replace. See gtk_source_completion_provider_activate_proposal() for more information.

gtkSourceCompletionProviderMatch
int gtkSourceCompletionProviderMatch(SourceCompletionContext context)

Get whether the provider match the context of completion detailed in context.

gtkSourceCompletionProviderPopulate
void gtkSourceCompletionProviderPopulate(SourceCompletionContext context)

Populate context with proposals from provider added with the gtk_source_completion_context_add_proposals() function.

gtkSourceCompletionProviderUpdateInfo
void gtkSourceCompletionProviderUpdateInfo(SourceCompletionProposalIF proposal, SourceCompletionInfo info)

Update extra information shown in info for proposal. Note This function must be implemented when gtk_source_completion_provider_get_info_widget() is implemented.

Variables

gtkSourceCompletionProvider
GtkSourceCompletionProvider* gtkSourceCompletionProvider;

the main Gtk struct

Meta