Top | ![]() |
![]() |
![]() |
![]() |
gchar *
gtk_source_completion_provider_get_name
(GtkSourceCompletionProvider *provider
);
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()
.
GdkPixbuf *
gtk_source_completion_provider_get_icon
(GtkSourceCompletionProvider *provider
);
Get the icon of the provider.
void gtk_source_completion_provider_populate (GtkSourceCompletionProvider *provider
,GtkSourceCompletionContext *context
);
Populate context
with proposals from provider
GtkSourceCompletionActivation
gtk_source_completion_provider_get_activation
(GtkSourceCompletionProvider *provider
);
Get with what kind of activation the provider should be activated.
gboolean gtk_source_completion_provider_match (GtkSourceCompletionProvider *provider
,GtkSourceCompletionContext *context
);
Get whether the provider match the context of completion detailed in
context
.
GtkWidget * gtk_source_completion_provider_get_info_widget (GtkSourceCompletionProvider *provider
,GtkSourceCompletionProposal *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 implemented, gtk_source_completion_provider_update_info MUST also be
implemented. If not implemented, the default
gtk_source_completion_proposal_get_info will be used to display extra
information about a GtkSourceCompletionProposal.
void gtk_source_completion_provider_update_info (GtkSourceCompletionProvider *provider
,GtkSourceCompletionProposal *proposal
,GtkSourceCompletionInfo *info
);
Update extra information shown in info
for proposal
. This should be
implemented if your provider sets a custom info widget for proposal
.
This function MUST be implemented when
gtk_source_completion_provider_get_info_widget is implemented.
gboolean gtk_source_completion_provider_get_start_iter (GtkSourceCompletionProvider *provider
,GtkSourceCompletionContext *context
,GtkSourceCompletionProposal *proposal
,GtkTextIter *iter
);
Get the GtkTextIter at which the completion for proposal
starts. When
implemented, the completion can use this information to position the
completion window accordingly when a proposal is selected in the completion
window.
gboolean gtk_source_completion_provider_activate_proposal (GtkSourceCompletionProvider *provider
,GtkSourceCompletionProposal *proposal
,GtkTextIter *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 label of proposal
.
gint
gtk_source_completion_provider_get_interactive_delay
(GtkSourceCompletionProvider *provider
);
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 “auto-complete-delay”.
gint
gtk_source_completion_provider_get_priority
(GtkSourceCompletionProvider *provider
);
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.