### Interface

# Ide CompletionProvider

#### Description

    interface Ide.CompletionProvider : GObject.Object

No description available.

#### Prerequisite

In order to implement CompletionProvider, your type must inherit from `GObject`.

#### Implementations

- IdeLspCompletionProvider

#### Instance methods

###### ide_completion_provider_activate_poposal

No description available.

###### ide_completion_provider_display_proposal

Requests that the provider update `row` with values from `proposal`.

Available since: 3.32

###### ide_completion_provider_get_comment

If the completion proposal has a comment, the provider should return a newly allocated string containing it.

Available since: 3.32

###### ide_completion_provider_get_icon

Gets the `GIcon` to represent this provider. This may be used in UI to allow the user to filter the results to only those of this completion provider.

Available since: 3.32

###### ide_completion_provider_get_priority

Gets the priority for the completion provider.

Available since: 3.32

###### ide_completion_provider_get_title

Gets the title for the provider. This may be used in UI to give the user context about the type of results that are displayed.

Available since: 3.32

###### ide_completion_provider_is_trigger

Completion providers may want to trigger that the completion window is displayed upon insertion of a particular character. For example, a C indenter might want to trigger after -> or . is inserted.

Available since: 3.32

###### ide_completion_provider_key_activates

This function is called to ask the provider if the key-press event should force activation of the proposal. This is useful for languages where you might want to activate the completion from a language-specific character.

Available since: 3.32

###### ide_completion_provider_populate_async

Asynchronously requests the provider populate the contents.

Available since: 3.32

###### ide_completion_provider_populate_finish

No description available.

Available since: 3.32

###### ide_completion_provider_refilter

This requests that the completion provider refilter the results based on changes to the `IdeCompletionContext`, such as additional text typed by the user. If the provider can refine the results, then the provider should do so and return `TRUE`.

Available since: 3.32

#### Interface structure

    struct IdeCompletionProviderInterface {
      GTypeInterface parent;
      void (* load) (
        IdeCompletionProvider* self,
        IdeContext* context
      );
      GIcon* (* get_icon) (
        IdeCompletionProvider* self
      );
      gint (* get_priority) (
        IdeCompletionProvider* self,
        IdeCompletionContext* context
      );
      gchar* (* get_title) (
        IdeCompletionProvider* self
      );
      void (* populate_async) (
        IdeCompletionProvider* self,
        IdeCompletionContext* context,
        GCancellable* cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data
      );
      GListModel* (* populate_finish) (
        IdeCompletionProvider* self,
        GAsyncResult* result,
        GError** error
      );
      void (* display_proposal) (
        IdeCompletionProvider* self,
        IdeCompletionListBoxRow* row,
        IdeCompletionContext* context,
        const gchar* typed_text,
        IdeCompletionProposal* proposal
      );
      void (* activate_proposal) (
        IdeCompletionProvider* self,
        IdeCompletionContext* context,
        IdeCompletionProposal* proposal,
        const GdkEventKey* key
      );
      gboolean (* refilter) (
        IdeCompletionProvider* self,
        IdeCompletionContext* context,
        GListModel* proposals
      );
      gboolean (* is_trigger) (
        IdeCompletionProvider* self,
        const GtkTextIter* iter,
        gunichar ch
      );
      gboolean (* key_activates) (
        IdeCompletionProvider* self,
        IdeCompletionProposal* proposal,
        const GdkEventKey* key
      );
      gchar* (* get_comment) (
        IdeCompletionProvider* self,
        IdeCompletionProposal* proposal
      );

    }

###### Interface members

`parent` |
    GTypeInterface
| No description available.
`load` |
    void (* load) (
        IdeCompletionProvider* self,
        IdeContext* context
      )
| No description available.
`get_icon` |
    GIcon* (* get_icon) (
        IdeCompletionProvider* self
      )
| No description available.
`get_priority` |
    gint (* get_priority) (
        IdeCompletionProvider* self,
        IdeCompletionContext* context
      )
| No description available.
`get_title` |
    gchar* (* get_title) (
        IdeCompletionProvider* self
      )
| No description available.
`populate_async` |
    void (* populate_async) (
        IdeCompletionProvider* self,
        IdeCompletionContext* context,
        GCancellable* cancellable,
        GAsyncReadyCallback callback,
        gpointer user_data
      )
| No description available.
`populate_finish` |
    GListModel* (* populate_finish) (
        IdeCompletionProvider* self,
        GAsyncResult* result,
        GError** error
      )
| No description available.
`display_proposal` |
    void (* display_proposal) (
        IdeCompletionProvider* self,
        IdeCompletionListBoxRow* row,
        IdeCompletionContext* context,
        const gchar* typed_text,
        IdeCompletionProposal* proposal
      )
| No description available.
`activate_proposal` |
    void (* activate_proposal) (
        IdeCompletionProvider* self,
        IdeCompletionContext* context,
        IdeCompletionProposal* proposal,
        const GdkEventKey* key
      )
| No description available.
`refilter` |
    gboolean (* refilter) (
        IdeCompletionProvider* self,
        IdeCompletionContext* context,
        GListModel* proposals
      )
| No description available.
`is_trigger` |
    gboolean (* is_trigger) (
        IdeCompletionProvider* self,
        const GtkTextIter* iter,
        gunichar ch
      )
| No description available.
`key_activates` |
    gboolean (* key_activates) (
        IdeCompletionProvider* self,
        IdeCompletionProposal* proposal,
        const GdkEventKey* key
      )
| No description available.
`get_comment` |
    gchar* (* get_comment) (
        IdeCompletionProvider* self,
        IdeCompletionProposal* proposal
      )
| No description available.

#### Virtual methods

###### Ide.CompletionProvider.activate_proposal

No description available.

###### Ide.CompletionProvider.display_proposal

Requests that the provider update `row` with values from `proposal`.

###### Ide.CompletionProvider.get_comment

If the completion proposal has a comment, the provider should return a newly allocated string containing it.

###### Ide.CompletionProvider.get_icon

Gets the `GIcon` to represent this provider. This may be used in UI to allow the user to filter the results to only those of this completion provider.

###### Ide.CompletionProvider.get_priority

Gets the priority for the completion provider.

###### Ide.CompletionProvider.get_title

Gets the title for the provider. This may be used in UI to give the user context about the type of results that are displayed.

###### Ide.CompletionProvider.is_trigger

Completion providers may want to trigger that the completion window is displayed upon insertion of a particular character. For example, a C indenter might want to trigger after -> or . is inserted.

###### Ide.CompletionProvider.key_activates

This function is called to ask the provider if the key-press event should force activation of the proposal. This is useful for languages where you might want to activate the completion from a language-specific character.

###### Ide.CompletionProvider.load

No description available.

###### Ide.CompletionProvider.populate_async

Asynchronously requests the provider populate the contents.

###### Ide.CompletionProvider.populate_finish

No description available.

###### Ide.CompletionProvider.refilter

This requests that the completion provider refilter the results based on changes to the `IdeCompletionContext`, such as additional text typed by the user. If the provider can refine the results, then the provider should do so and return `TRUE`.