Interface
IdeCompletionProvider
Prerequisite
In order to implement CompletionProvider, your type must inherit fromGObject
.
Instance methods
ide_completion_provider_display_proposal
Requests that the provider update row
with values from proposal
.
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.
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.
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.
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.
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.
since: 3.32
ide_completion_provider_populate_async
Asynchronously requests the provider populate the contents.
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
.
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 |
|
No description available. | |
load |
|
No description available. | |
get_icon |
|
No description available. | |
get_priority |
|
No description available. | |
get_title |
|
No description available. | |
populate_async |
|
No description available. | |
populate_finish |
|
No description available. | |
display_proposal |
|
No description available. | |
activate_proposal |
|
No description available. | |
refilter |
|
No description available. | |
is_trigger |
|
No description available. | |
key_activates |
|
No description available. | |
get_comment |
|
No description available. |
Virtual methods
Ide.CompletionProvider.display_proposal
Requests that the provider update row
with values from proposal
.
since: 3.32
Ide.CompletionProvider.get_comment
If the completion proposal has a comment, the provider should return a newly allocated string containing it.
since: 3.32
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.
since: 3.32
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.
since: 3.32
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.
since: 3.32
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.
since: 3.32
Ide.CompletionProvider.populate_async
Asynchronously requests the provider populate the contents.
since: 3.32
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
.
since: 3.32