Class
GtkSourceCompletionContext
Description
final class GtkSource.CompletionContext : GObject.Object {
/* No available fields */
}
The context of a completion.
GtkSourceCompletionContext
contains information about an attept to display
completion proposals to the user based on typed text in the GtkSourceView
.
When typing, GtkSourceCompletion
may use registered
GtkSourceCompletionProvider
to determine if there may be results which
could be displayed. If so, a GtkSourceCompletionContext
is created with
information that is provided to the GtkSourceCompletionProvider
to populate
results which might be useful to the user.
GtkSourceCompletionProvider
are expected to provide GListModel
with
GtkSourceCompletionProposal
which may be joined together in a list of
results for the user. They are also responsible for how the contents are
displayed using GtkSourceCompletionCell
which allows for some level of customization.
Instance methods
gtk_source_completion_context_get_activation
Gets the mode for which the context was activated.
gtk_source_completion_context_get_bounds
Gets the bounds for the completion, which is the beginning of the current word (taking break characters into account) to the current insertion cursor.
gtk_source_completion_context_get_buffer
Gets the underlying buffer used by the context.
gtk_source_completion_context_get_busy
Gets the “busy” property. This is set to TRUE
while the completion
context is actively fetching proposals from registered
GtkSourceCompletionProvider
‘s.
gtk_source_completion_context_get_completion
Gets the GtkSourceCompletion
that created the context.
gtk_source_completion_context_get_empty
Checks if any proposals have been provided to the context.
gtk_source_completion_context_get_language
Gets the language of the underlying buffer, if any.
gtk_source_completion_context_get_view
Gets the text view for the context.
gtk_source_completion_context_get_word
Gets the word that is being completed up to the position of the insert mark.
gtk_source_completion_context_set_proposals_for_provider
This function allows providers to update their results for a context
outside of a call to gtk_source_completion_provider_populate_async()
.
Properties
GtkSource.CompletionContext:busy
The “busy” property is TRUE
while the completion context is
populating completion proposals.
GtkSource.CompletionContext:completion
The “completion” is the GtkSourceCompletion
that was used to create the context.
GtkSource.CompletionContext:empty
The “empty” property is TRUE
when there are no results.