GtkSource.Completion
Description: Reference for GtkSource.Completion

### Class

# GtkSourceCompletion

#### Description [src]

    final class GtkSource.Completion : GObject.Object
    {
      /* No available fields */
    }

Main Completion Object.

The completion system helps the user when they writes some text, such as words, command names, functions, and suchlike. Proposals can be shown, to complete the text the user is writing. Each proposal can contain an additional piece of information (for example documentation), that is displayed when the “Details” button is clicked.

Proposals are created via a `GtkSourceCompletionProvider`. There can be for example a provider to complete words (see `GtkSourceCompletionWords`), another provider for the completion of function names, etc. To add a provider, call `gtk_source_completion_add_provider()`.

The `GtkSourceCompletionProposal` interface represents a proposal.

If a proposal contains extra information (see `GTK_SOURCE_COMPLETION_COLUMN_DETAILS`), it will be displayed in a supplemental details window, which appears when the “Details” button is clicked.

Each `GtkSourceView` object is associated with a `GtkSourceCompletion` instance. This instance can be obtained with `gtk_source_view_get_completion()`. The `GtkSourceView` class contains also the `GtkSourceView::show-completion` signal.

A same `GtkSourceCompletionProvider` object can be used for several `GtkSourceCompletion`‘s.

#### Hierarchy

#### Ancestors

- GObject

#### Functions

###### gtk_source_completion_fuzzy_highlight

This will add `<b>` tags around matched characters in `haystack` based on `casefold_query`.

###### gtk_source_completion_fuzzy_match

This helper function can do a fuzzy match for you giving a haystack and casefolded needle.

#### Instance methods

###### gtk_source_completion_add_provider

Adds a `GtkSourceCompletionProvider` to the list of providers to be queried for completion results.

###### gtk_source_completion_block_interactive

No description available.

###### gtk_source_completion_get_buffer

Gets the connected `GtkSourceView`‘s `GtkSourceBuffer`.

###### gtk_source_completion_get_page_size

No description available.

###### gtk_source_completion_get_view

Gets the `GtkSourceView` that owns the `GtkSourceCompletion`.

###### gtk_source_completion_hide

Emits the “hide” signal.

###### gtk_source_completion_remove_provider

Removes a `GtkSourceCompletionProvider` previously added with `gtk_source_completion_add_provider()`.

###### gtk_source_completion_set_page_size

No description available.

###### gtk_source_completion_show

Emits the “show” signal.

###### gtk_source_completion_unblock_interactive

No description available.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### GtkSource.Completion:buffer

The `GtkTextBuffer` for the `GtkSourceCompletion:view`. This is a convenience property for providers.

###### GtkSource.Completion:page-size

The number of rows to display to the user before scrolling.

###### GtkSource.Completion:remember-info-visibility

Determines whether the visibility of the info window should be saved when the completion is hidden, and restored when the completion is shown again.

###### GtkSource.Completion:select-on-show

Determines whether the first proposal should be selected when the completion is first shown.

###### GtkSource.Completion:show-icons

The “show-icons” property denotes if icons should be displayed within the list of completions presented to the user.

###### GtkSource.Completion:view

The “view” property is the `GtkTextView` for which this `GtkSourceCompletion` is providing completion features.

#### Signals

###### GtkSource.Completion::hide

The “hide” signal is emitted when the completion window should be hidden.

###### GtkSource.Completion::provider-added

The “provided-added” signal is emitted when a new provider is added to the completion.

###### GtkSource.Completion::provider-removed

The “provided-removed” signal is emitted when a provider has been removed from the completion.

###### GtkSource.Completion::show

The “show” signal is emitted when the completion window should be shown.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct GtkSourceCompletionClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.