GtkSourceCompletionContext

GtkSourceCompletionContext

Synopsis

#include <gtksourceview/gtksourcecompletioncontext.h>

                    GtkSourceCompletionContext;
void                gtk_source_completion_context_add_proposals
                                                        (GtkSourceCompletionContext *context,
                                                         struct _GtkSourceCompletionProvider *provider,
                                                         GList *proposals,
                                                         gboolean finished);
struct _GtkSourceView * gtk_source_completion_context_get_view
                                                        (GtkSourceCompletionContext *context);
void                gtk_source_completion_context_get_iter
                                                        (GtkSourceCompletionContext *context,
                                                         GtkTextIter *iter);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkSourceCompletionContext

Properties

  "activation"               GtkSourceCompletionActivation  : Read / Write
  "completion"               GtkSourceCompletion*  : Read / Write / Construct Only
  "iter"                     gpointer              : Read / Write
  "view"                     GtkSourceView*        : Read

Signals

  "cancelled"                                      : Run Last / Action

Description

Details

GtkSourceCompletionContext

typedef struct _GtkSourceCompletionContext GtkSourceCompletionContext;


gtk_source_completion_context_add_proposals ()

void                gtk_source_completion_context_add_proposals
                                                        (GtkSourceCompletionContext *context,
                                                         struct _GtkSourceCompletionProvider *provider,
                                                         GList *proposals,
                                                         gboolean finished);

Providers can use this function to add proposals to the completion. They can do so asynchronously by means of the finished argument. Providers must ensure that they always call this function with finished set to TRUE once each population (even if no proposals need to be added).

context :

A GtkSourceCompletionContext

provider :

A GtkSourceCompletionProvider

proposals :

The list of proposals to add

finished :

Whether the provider is finished adding proposals

gtk_source_completion_context_get_view ()

struct _GtkSourceView * gtk_source_completion_context_get_view
                                                        (GtkSourceCompletionContext *context);

Get the GtkSourceView to which the context applies

context :

A GtkSourceCompletionContext

Returns :

A GtkSourceView

gtk_source_completion_context_get_iter ()

void                gtk_source_completion_context_get_iter
                                                        (GtkSourceCompletionContext *context,
                                                         GtkTextIter *iter);

Get the iter at which the completion was invoked. Providers can use this to determine how and if to match proposals.

context :

A GtkSourceCompletionContext

iter :

A GtkTextIter

Property Details

The "activation" property

  "activation"               GtkSourceCompletionActivation  : Read / Write

The completion activation


The "completion" property

  "completion"               GtkSourceCompletion*  : Read / Write / Construct Only

The GtkSourceCompletion associated with the context.


The "iter" property

  "iter"                     gpointer              : Read / Write

The GtkTextIter at which the completion is invoked.


The "view" property

  "view"                     GtkSourceView*        : Read

The GtkSourceView associated with the context.

Signal Details

The "cancelled" signal

void                user_function                      (GtkSourceCompletionContext *arg0,
                                                        gpointer                    user_data)      : Run Last / Action

Emitted when the current population of proposals has been cancelled. Providers adding proposals asynchronously should connect to this signal to know when to cancel running proposal queries.

user_data :

user data set when the signal handler was connected.