Interface

GtkSource-5GtkSourceCompletionProviderInterface

Interface for implementing CompletionProvider. Contains only the virtual methods that need to be implemented.

interface Interface {
    vfunc_activate(
        context: GtkSource.CompletionContext,
        proposal: GtkSource.CompletionProposal,
    ): void;
    vfunc_display(
        context: GtkSource.CompletionContext,
        proposal: GtkSource.CompletionProposal,
        cell: GtkSource.CompletionCell,
    ): void;
    vfunc_get_priority(context: GtkSource.CompletionContext): number;
    vfunc_get_title(): string;
    vfunc_is_trigger(iter: Gtk.TextIter, ch: string): boolean;
    vfunc_key_activates(
        context: GtkSource.CompletionContext,
        proposal: GtkSource.CompletionProposal,
        keyval: number,
        state: Gdk.ModifierType,
    ): boolean;
    vfunc_list_alternates(
        context: GtkSource.CompletionContext,
        proposal: GtkSource.CompletionProposal,
    ): GtkSource.CompletionProposal[];
    vfunc_populate_async(
        context: GtkSource.CompletionContext,
        cancellable?: Gio.Cancellable,
        callback?: AsyncReadyCallback<GtkSource.CompletionProvider.Interface>,
    ): void;
    vfunc_populate_finish(result: Gio.AsyncResult): Gio.ListModel;
    vfunc_refilter(
        context: GtkSource.CompletionContext,
        model: Gio.ListModel,
    ): void;
}

Hierarchy (View Summary)

Index

Methods

  • Gets the title of the completion provider, if any.

    Currently, titles are not displayed in the completion results, but may be at some point in the future when non-null.

    Returns string

  • This function is used to determine if a character inserted into the text editor should cause a new completion request to be triggered.

    An example would be period '.' which might indicate that the user wants to complete method or field names of an object.

    This method will only trigger when text is inserted into the Gtk.TextBuffer while the completion list is visible and a proposal is selected. Incremental key-presses (like shift, control, or alt) are not triggerable.

    Parameters

    Returns boolean