CompletionProvider
Object Hierarchy:
GtkSource.CompletionProvider
GtkSource.CompletionProvider
GtkSource.CompletionProvider
GLib.Object
GLib.Object
GLib.Object->GtkSource.CompletionProvider
Description:
[
CCode ( type_cname =
"GtkSourceCompletionProviderInterface" , type_id =
"gtk_source_completion_provider_get_type ()" ) ]
public interface CompletionProvider :
Object
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.
All known implementing classes:
Content:
Methods:
public abstract void activate (CompletionContext context, CompletionProposal proposal)
This function requests proposal to be activated by the
CompletionProvider .
public abstract void display (CompletionContext context, CompletionProposal proposal, CompletionCell cell)
This function requests that the CompletionProvider
prepares cell to display the contents of proposal.
public virtual int get_priority (CompletionContext context)
This function should return the priority of this
in context.
public virtual string ? get_title ()
Gets the title of the completion provider, if any.
public virtual bool is_trigger (TextIter iter, unichar ch)
This function is used to determine if a character inserted into the text
editor should cause a new completion request to be triggered.
public virtual bool key_activates (CompletionContext context, CompletionProposal proposal, uint keyval, 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).
public virtual GenericArray <CompletionProposal >? list_alternates (CompletionContext context, CompletionProposal proposal)
Providers should return a list of alternates to proposal or
null if there are no alternates available.
public abstract async ListModel populate_async (CompletionContext context, Cancellable ? cancellable) throws Error
Asynchronously requests that the provider populates the completion results
for context.
public abstract void refilter (CompletionContext context, ListModel model)
This function can be used to filter results previously provided to the [
class@CompletionContext] by the CompletionProvider .
Inherited Members:
All known members inherited from class GLib.Object