gtksource.completion_provider
Module for [CompletionProvider] interface
Types 2
interfaceCompletionProvider
Completion provider interface.
You must implement this interface to provide proposals to class@Completion.
In most cases, implementations of this interface will want to use vfunc@CompletionProvider.populate_async to asynchronously populate the results to avoid blocking the main loop.
Methods
void activate(gtksource.completion_context.CompletionContext context, gtksource.completion_proposal.CompletionProposal proposal)This function requests proposal to be activated by the #GtkSourceCompletionProvider.void display(gtksource.completion_context.CompletionContext context, gtksource.completion_proposal.CompletionProposal proposal, gtksource.completion_cell.CompletionCell cell)This function requests that the #GtkSourceCompletionProvider prepares cell to display the contents of proposal.int getPriority(gtksource.completion_context.CompletionContext context)This function should return the priority of self in context.string getTitle()Gets the title of the completion provider, if any.bool isTrigger(gtk.text_iter.TextIter iter, dchar ch)This function is used to determine if a character inserted into the text editor should cause a new completion request to be triggered.bool keyActivates(gtksource.completion_context.CompletionContext context, gtksource.completion_proposal.CompletionProposal proposal, uint keyval, gdk.types.ModifierType state)This function is used to determine if a key typed by the user should activate proposal (resulting in committing the text to the editor).gtksource.completion_proposal.CompletionProposal[] listAlternates(gtksource.completion_context.CompletionContext context, gtksource.completion_proposal.CompletionProposal proposal)Providers should return a list of alternates to proposal or null if there are no alternates available.void populateAsync(gtksource.completion_context.CompletionContext context, gio.cancellable.Cancellable cancellable = null, gio.types.AsyncReadyCallback callback = null)Asynchronously requests that the provider populates the completion results for context.gio.list_model.ListModel populateFinish(gio.async_result.AsyncResult result)Completes an asynchronous operation to populate a completion provider.void refilter(gtksource.completion_context.CompletionContext context, gio.list_model.ListModel model)This function can be used to filter results previously provided to the `classCompletionContext` by the #GtkSourceCompletionProvider.interfaceCompletionProviderGidBuilderImpl(T)