GscCompletion

GscCompletion

Synopsis

#define             GSC_COMPLETION_ERROR
                    GscCompletionPrivate;
enum                GscCompletionError;
                    GscCompletion;
GscCompletion *     gsc_completion_get_from_view        (GtkTextView *view);
GQuark              gsc_completion_error_quark          (void);
GscCompletion *     gsc_completion_new                  (GtkTextView *source_view);
gboolean            gsc_completion_add_provider         (GscCompletion *completion,
                                                         GscProvider *provider,
                                                         GError **error);
gboolean            gsc_completion_remove_provider      (GscCompletion *completion,
                                                         GscProvider *provider,
                                                         GError **error);
GList *             gsc_completion_get_providers        (GscCompletion *completion,
                                                         const gchar *capabilities);
gboolean            gsc_completion_show                 (GscCompletion *completion,
                                                         GList *providers,
                                                         GtkTextIter *place);
void                gsc_completion_hide                 (GscCompletion *completion);
GscInfo *           gsc_completion_get_info_window      (GscCompletion *completion);
GtkTextView *       gsc_completion_get_view             (GscCompletion *completion);

Object Hierarchy

  GObject
   +----GscCompletion

Properties

  "auto-complete-delay"      guint                 : Read / Write / Construct
  "manage-completion-keys"   gboolean              : Read / Write / Construct
  "remember-info-visibility" gboolean              : Read / Write / Construct
  "select-on-show"           gboolean              : Read / Write / Construct
  "view"                     GtkTextView*          : Read / Write / Construct Only

Signals

  "hide"                                           : Run Last / Action
  "show"                                           : Run Last / Action

Description

Details

GSC_COMPLETION_ERROR

#define GSC_COMPLETION_ERROR			(gsc_completion_error_quark ())


GscCompletionPrivate

typedef struct _GscCompletionPrivate GscCompletionPrivate;


enum GscCompletionError

typedef enum
{
	GSC_COMPLETION_ERROR_ALREADY_BOUND = 0,
	GSC_COMPLETION_ERROR_NOT_BOUND,
} GscCompletionError;


GscCompletion

typedef struct _GscCompletion GscCompletion;


gsc_completion_get_from_view ()

GscCompletion *     gsc_completion_get_from_view        (GtkTextView *view);

view :

The GtkTextView associated with a GscCompletion

Returns :

The GscCompletion associated with a view or NULL.

gsc_completion_error_quark ()

GQuark              gsc_completion_error_quark          (void);

Returns :


gsc_completion_new ()

GscCompletion *     gsc_completion_new                  (GtkTextView *source_view);

Create a new GscCompletion associated with view.

source_view :

Returns :

The new Gsc.

gsc_completion_add_provider ()

gboolean            gsc_completion_add_provider         (GscCompletion *completion,
                                                         GscProvider *provider,
                                                         GError **error);

Add a new GscProvider to the completion object. This will add a reference provider, so make sure to unref your own copy when you no longer need it.

completion :

A Gsc

provider :

A GscProvider

error :

A GError

Returns :

TRUE if provider was successfully added, otherwise if error is provided, it will be set with the error and FALSE is returned.

gsc_completion_remove_provider ()

gboolean            gsc_completion_remove_provider      (GscCompletion *completion,
                                                         GscProvider *provider,
                                                         GError **error);

Remove provider from the completion.

completion :

A Gsc

provider :

A GscProvider

error :

A GError

Returns :

TRUE if provider was successfully removed, otherwise if error is provided, it will be set with the error and FALSE is returned.

gsc_completion_get_providers ()

GList *             gsc_completion_get_providers        (GscCompletion *completion,
                                                         const gchar *capabilities);

completion :

capabilities :

Returns :


gsc_completion_show ()

gboolean            gsc_completion_show                 (GscCompletion *completion,
                                                         GList *providers,
                                                         GtkTextIter *place);

Shows the show completion window. If place if NULL the popup window will be placed on the cursor position.

completion :

A Gsc

providers :

A list of GscProvider

place :

The place where you want to position the popup window, or NULL

Returns :

TRUE if it was possible to the show completion window.

gsc_completion_hide ()

void                gsc_completion_hide                 (GscCompletion *completion);

Hides the completion if it is active (visible).

completion :

A Gsc

gsc_completion_get_info_window ()

GscInfo *           gsc_completion_get_info_window      (GscCompletion *completion);

The info widget is the window where the completion displays optional extra information of the proposal.

completion :

A Gsc

Returns :

The GscInfo window.

gsc_completion_get_view ()

GtkTextView *       gsc_completion_get_view             (GscCompletion *completion);

The GtkTextView associated with completion.

completion :

A Gsc

Returns :

The GtkTextView associated with completion.

Property Details

The "auto-complete-delay" property

  "auto-complete-delay"      guint                 : Read / Write / Construct

Completion popup delay for interactive completion.

Default value: 250


The "manage-completion-keys" property

  "manage-completion-keys"   gboolean              : Read / Write / Construct

Manage keys to navigate proposal selection.

Default value: TRUE


The "remember-info-visibility" property

  "remember-info-visibility" gboolean              : Read / Write / Construct

Remember the last info window visibility state.

Default value: FALSE


The "select-on-show" property

  "select-on-show"           gboolean              : Read / Write / Construct

Select first proposal when completion is shown.

Default value: TRUE


The "view" property

  "view"                     GtkTextView*          : Read / Write / Construct Only

The GtkTextView bound to the completion.

Signal Details

The "hide" signal

void                user_function                      (GscCompletion *gsccompletion,
                                                        gpointer       user_data)          : Run Last / Action

gsccompletion :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "show" signal

void                user_function                      (GscCompletion *gsccompletion,
                                                        gpointer       user_data)          : Run Last / Action

gsccompletion :

the object which received the signal.

user_data :

user data set when the signal handler was connected.