Top | ![]() |
![]() |
![]() |
![]() |
gboolean | gtk_source_completion_add_provider () |
gboolean | gtk_source_completion_remove_provider () |
GList * | gtk_source_completion_get_providers () |
gboolean | gtk_source_completion_show () |
void | gtk_source_completion_hide () |
GtkSourceCompletionInfo * | gtk_source_completion_get_info_window () |
struct _GtkSourceView * | gtk_source_completion_get_view () |
GtkSourceCompletionContext * | gtk_source_completion_create_context () |
void | gtk_source_completion_move_window () |
void | gtk_source_completion_block_interactive () |
void | gtk_source_completion_unblock_interactive () |
guint | accelerators | Read / Write / Construct |
guint | auto-complete-delay | Read / Write / Construct |
guint | proposal-page-size | Read / Write / Construct |
guint | provider-page-size | Read / Write / Construct |
gboolean | remember-info-visibility | Read / Write / Construct |
gboolean | select-on-show | Read / Write / Construct |
gboolean | show-headers | Read / Write / Construct |
gboolean | show-icons | Read / Write / Construct |
GtkSourceView * | view | Read / Write / Construct Only |
void | activate-proposal | Action |
void | hide | Action |
void | move-cursor | Action |
void | move-page | Action |
void | populate-context | Action |
void | show | Action |
gboolean gtk_source_completion_add_provider (GtkSourceCompletion *completion
,GtkSourceCompletionProvider *provider
,GError **error
);
Add a new GtkSourceCompletionProvider to the completion object. This will
add a reference provider
, so make sure to unref your own copy when you
no longer need it.
gboolean gtk_source_completion_remove_provider (GtkSourceCompletion *completion
,GtkSourceCompletionProvider *provider
,GError **error
);
Remove provider
from the completion.
GList *
gtk_source_completion_get_providers (GtkSourceCompletion *completion
);
Get list of providers registered on completion
. The returned list is owned
by the completion and should not be freed.
gboolean gtk_source_completion_show (GtkSourceCompletion *completion
,GList *providers
,GtkSourceCompletionContext *context
);
Starts a new completion with the specified GtkSourceCompletionContext and a list of potential candidate providers for completion.
completion |
||
providers |
A list of GtkSourceCompletionProvider or |
|
context |
The GtkSourceCompletionContext with which to start the completion |
void
gtk_source_completion_hide (GtkSourceCompletion *completion
);
Hides the completion if it is active (visible).
GtkSourceCompletionInfo *
gtk_source_completion_get_info_window (GtkSourceCompletion *completion
);
The info widget is the window where the completion displays optional extra information of the proposal.
struct _GtkSourceView *
gtk_source_completion_get_view (GtkSourceCompletion *completion
);
The GtkSourceView associated with completion
.
GtkSourceCompletionContext * gtk_source_completion_create_context (GtkSourceCompletion *completion
,GtkTextIter *position
);
Create a new GtkSourceCompletionContext for completion
. The position at
which the completion using the new context will consider completion can
be provider by position
. If position
is NULL
, the current cursor
position will be used.
a new GtkSourceCompletionContext. The reference being returned is a 'floating' reference, so if you invoke gtk_source_completion_show with this context you don't need to unref it.
void gtk_source_completion_move_window (GtkSourceCompletion *completion
,GtkTextIter *iter
);
Move the completion window to a specific iter.
void
gtk_source_completion_block_interactive
(GtkSourceCompletion *completion
);
Block interactive completion. This can be used to disable interactive completion when inserting or deleting text from the buffer associated with the completion. Use gtk_source_completion_unblock_interactive to enable interactive completion again.
void
gtk_source_completion_unblock_interactive
(GtkSourceCompletion *completion
);
Unblock interactive completion. This can be used after using gtk_source_completion_block_interactive to enable interactive completion again.
“accelerators”
property “accelerators” guint
Number of accelerators to show for the first proposals.
Flags: Read / Write / Construct
Allowed values: <= 10
Default value: 5
“auto-complete-delay”
property “auto-complete-delay” guint
Determines the popup delay (in milliseconds) at which the completion will be shown for interactive completion.
Flags: Read / Write / Construct
Default value: 250
“proposal-page-size”
property “proposal-page-size” guint
The scroll page size of the proposals in the completion window.
Flags: Read / Write / Construct
Allowed values: >= 1
Default value: 5
“provider-page-size”
property “provider-page-size” guint
The scroll page size of the provider pages in the completion window.
Flags: Read / Write / Construct
Allowed values: >= 1
Default value: 5
“remember-info-visibility”
property “remember-info-visibility” gboolean
Determines whether the visibility of the info window should be saved when the completion is hidden, and restored when the completion is shown again.
Flags: Read / Write / Construct
Default value: FALSE
“select-on-show”
property “select-on-show” gboolean
Determines whether the first proposal should be selected when the completion is first shown.
Flags: Read / Write / Construct
Default value: TRUE
“show-headers”
property “show-headers” gboolean
Determines whether provider headers should be shown in the proposal list if there is more than one provider with proposals.
Flags: Read / Write / Construct
Default value: TRUE
“show-icons”
property “show-icons” gboolean
Determines whether provider and proposal icons should be shown in the completion popup.
Flags: Read / Write / Construct
Default value: TRUE
“view”
property“view” GtkSourceView *
The GtkSourceView bound to the completion object.
Flags: Read / Write / Construct Only
“activate-proposal”
signalvoid user_function (GtkSourceCompletion *completion, gpointer user_data)
The ::activate-proposal signal is a keybinding signal which gets emitted when the user initiates a proposal activation.
Applications should not connect to it, but may emit it with g_signal_emit_by_name if they need to control the proposal activation programmatically.
completion |
The GtkSourceCompletion who emits the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“hide”
signalvoid user_function (GtkSourceCompletion *completion, gpointer user_data)
Emitted when the completion window is hidden. The default handler will actually hide the window.
completion |
The GtkSourceCompletion who emits the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“move-cursor”
signalvoid user_function (GtkSourceCompletion *completion, GtkScrollStep step, gint num, gpointer user_data)
The ::move-cursor signal is a keybinding signal which gets emitted when the user initiates a cursor movement.
Applications should not connect to it, but may emit it with g_signal_emit_by_name if they need to control the cursor programmatically.
completion |
The GtkSourceCompletion who emits the signal |
|
step |
The GtkScrollStep by which to move the cursor |
|
num |
The amount of steps to move the cursor |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“move-page”
signalvoid user_function (GtkSourceCompletion *completion, GtkScrollStep step, gint num, gpointer user_data)
The ::move-page signal is a keybinding signal which gets emitted when the user initiates a page movement (i.e. switches between provider pages).
Applications should not connect to it, but may emit it with g_signal_emit_by_name if they need to control the page selection programmatically.
completion |
The GtkSourceCompletion who emits the signal |
|
step |
The GtkScrollStep by which to move the page |
|
num |
The amount of steps to move the page |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“populate-context”
signalvoid user_function (GtkSourceCompletion *completion, GtkSourceCompletionContext *context, gpointer user_data)
Emitted just before starting to populate the completion with providers. You can use this signal to add additional attributes in the context.
completion |
The GtkSourceCompletion who emits the signal |
|
context |
The GtkSourceCompletionContext for the current completion |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action
“show”
signalvoid user_function (GtkSourceCompletion *completion, gpointer user_data)
Emitted when the completion window is shown. The default handler will actually show the window.
completion |
The GtkSourceCompletion who emits the signal |
|
user_data |
user data set when the signal handler was connected. |
Flags: Action