![]() |
![]() |
![]() |
GtkSourceCompletion Reference Manual | ![]() |
---|---|---|---|---|
#define USER_REQUEST_TRIGGER_NAME GscManagerPrivate; GscManagerEventOptions; GscManager; GscManager* gsc_manager_get_from_view (GtkTextView *view); GscManager* gsc_manager_new (GtkTextView *view); GtkTextView* gsc_manager_get_view (GscManager *completion); gboolean gsc_manager_is_visible (GscManager *completion); gboolean gsc_manager_register_provider (GscManager *completion, GscProvider *provider, const gchar *trigger_name); gboolean gsc_manager_unregister_provider (GscManager *completion, GscProvider *provider, const gchar *trigger_name); GscProvider* gsc_manager_get_provider (GscManager *completion, const gchar *provider_name); void gsc_manager_register_trigger (GscManager *completion, GscTrigger *trigger); void gsc_manager_unregister_trigger (GscManager *completion, GscTrigger *trigger); GscTrigger* gsc_manager_get_trigger (GscManager *completion, const gchar *trigger_name); GscTrigger* gsc_manager_get_active_trigger (GscManager *completion); void gsc_manager_activate (GscManager *completion); void gsc_manager_deactivate (GscManager *completion); void gsc_manager_finish_completion (GscManager *completion); void gsc_manager_trigger_event (GscManager *completion, const gchar *trigger_name, gpointer event_data); void gsc_manager_trigger_event_with_opts (GscManager *completion, const gchar *trigger_name, GscManagerEventOptions *options, gpointer event_data); void gsc_manager_set_current_info (GscManager *self, gchar *info); void gsc_manager_update_event_options (GscManager *self, GscManagerEventOptions *options); void gsc_manager_get_current_event_options (GscManager *self, GscManagerEventOptions *options);
"info-keys" gchar* : Read / Write "next-page-keys" gchar* : Read / Write "previous-page-keys" gchar* : Read / Write
typedef struct { GscPopupPositionType position_type; GscPopupFilterType filter_type; const gchar* filter_text; gboolean autoselect; gboolean show_bottom_bar; } GscManagerEventOptions;
GscManager* gsc_manager_get_from_view (GtkTextView *view);
|
the GtkSourceView |
Returns : |
NULL if the GtkTextView haven't got an associated GscManager or the GscManager of this GtkTextView |
GscManager* gsc_manager_new (GtkTextView *view);
Creates a new GscManager asociated to a GtkSourceView
|
a GtkSourceView. |
Returns : |
value: A new GscManager |
GtkTextView* gsc_manager_get_view (GscManager *completion);
|
the GscManager |
Returns : |
The internal GtkTextView of this completion. |
gboolean gsc_manager_is_visible (GscManager *completion);
|
The GscManager |
Returns : |
TRUE if the completion popup is visible. |
gboolean gsc_manager_register_provider (GscManager *completion, GscProvider *provider, const gchar *trigger_name);
This function register the provider into the completion and reference it. When an event is raised, completion call to the provider to get the data. When the user select a proposal, it call the provider to tell it this action and the provider do that it want (normally inserts some text)
|
the GscManager |
|
The GscProvider. |
|
The trigger name what you want to register this provider |
Returns : |
TRUE if it was registered or FALSE if not (because it has been already registered, or the trigger don't exists) |
gboolean gsc_manager_unregister_provider (GscManager *completion, GscProvider *provider, const gchar *trigger_name);
This function unregister the provider.
|
the GscManager |
|
The GscProvider. |
|
The trigger name what you want to unregister this provider |
Returns : |
TRUE if it was unregistered or FALSE if not (because it doesn't exists, or the trigger don't exists) |
GscProvider* gsc_manager_get_provider (GscManager *completion, const gchar *provider_name);
|
The GscManager |
|
Provider's name that you are looking for. |
Returns : |
The provider if the completion has this provider registered or NULL if not. |
void gsc_manager_register_trigger (GscManager *completion, GscTrigger *trigger);
This function register a completion trigger. If the completion is actived then this method activate the trigger. This function reference the trigger object
|
The GscManager |
|
The trigger to register |
void gsc_manager_unregister_trigger (GscManager *completion, GscTrigger *trigger);
This function unregister a completion trigger. If the completion is actived then this method deactivate the trigger. This function reference the trigger object
|
The GscManager |
|
The trigger to unregister |
GscTrigger* gsc_manager_get_trigger (GscManager *completion, const gchar *trigger_name);
This function return the trigger with this name.
|
The GscManager |
|
The trigger name to get |
Returns : |
The trigger or NULL if not exists |
GscTrigger* gsc_manager_get_active_trigger (GscManager *completion);
This function return the active trigger. The active trigger is the last trigger raised if the completion is active. If the completion is not visible then there is no an active trigger.
|
The GscManager |
Returns : |
The trigger or NULL if completion is not active |
void gsc_manager_activate (GscManager *completion);
This function activate the completion mechanism. The completion connects all signals and activate all registered triggers.
|
The GscManager |
void gsc_manager_deactivate (GscManager *completion);
This function deactivate the completion mechanism. The completion disconnect all signals and deactivate all registered triggers.
|
The GscManager |
void gsc_manager_finish_completion (GscManager *completion);
This function finish the completion if it is active (visible).
|
The GscManager |
void gsc_manager_trigger_event (GscManager *completion, const gchar *trigger_name, gpointer event_data);
Calling this function, the completion call to all providers to get data and, if they return data, it shows the completion to the user.
|
the GscManager |
|
The event name to raise |
|
This object will be passed to the providers to give them some special information of the event |
void gsc_manager_trigger_event_with_opts (GscManager *completion, const gchar *trigger_name, GscManagerEventOptions *options, gpointer event_data);
Calling this function, the completion call to all providers to get data and, if they return data, it shows the completion to the user. Use this function if you want to show the popup with special parameters (position, filter, etc)
|
the GscManager |
|
The event name to raise |
|
Options to tell the completion how it must to work. |
|
This object will be passed to the providers to give them some special information of the event |
void gsc_manager_set_current_info (GscManager *self, gchar *info);
You can use this function when a GscProposal emit the display-info signal to set the current info.
|
The GscManager |
|
Info markup to be shown into for current proposal. |
void gsc_manager_update_event_options (GscManager *self, GscManagerEventOptions *options);
Sets the current event options
|
The GscManager |
|
Options struct where the option will be set. |
void gsc_manager_get_current_event_options (GscManager *self, GscManagerEventOptions *options);
|
|
|
"info-keys"
property"info-keys" gchar* : Read / Write
Keys to show/hide the info window
Default value: "<Control>i"
"next-page-keys"
property"next-page-keys" gchar* : Read / Write
Keys to show the next completion page
Default value: "Right"
"previous-page-keys"
property"previous-page-keys" gchar* : Read / Write
Keys to show the previous completion page
Default value: "Left"