GtkSourceCompletionContext

GtkSourceCompletionContext

Functions

Properties

GtkSourceCompletionActivation activation Read / Write
GtkSourceCompletion * completion Read / Write / Construct Only
GtkTextIter * iter Read / Write

Signals

void cancelled Action

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkSourceCompletionContext

Includes

#include <gtksourceview/gtksourcecompletioncontext.h>

Description

Functions

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).

Parameters

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_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.

Parameters

context

A GtkSourceCompletionContext

 

iter

A GtkTextIter

 

gtk_source_completion_context_get_activation ()

GtkSourceCompletionActivation
gtk_source_completion_context_get_activation
                               (GtkSourceCompletionContext *context);

Get the context activation

Parameters

Returns

The context activation

Types and Values

enum GtkSourceCompletionActivation

Members

GTK_SOURCE_COMPLETION_ACTIVATION_NONE

none.

 

GTK_SOURCE_COMPLETION_ACTIVATION_INTERACTIVE

interactive activation

 

GTK_SOURCE_COMPLETION_ACTIVATION_USER_REQUESTED

user requested activation (e.g. through a keyboard accelerator from the view)

 

struct GtkSourceCompletionContext

struct GtkSourceCompletionContext;

Property Details

The “activation” property

  “activation”               GtkSourceCompletionActivation

The completion activation

Flags: Read / Write


The “completion” property

  “completion”               GtkSourceCompletion *

The GtkSourceCompletion associated with the context.

Flags: Read / Write / Construct Only


The “iter” property

  “iter”                     GtkTextIter *

The GtkTextIter at which the completion is invoked.

Flags: Read / Write

Signal Details

The “cancelled” signal

void
user_function (GtkSourceCompletionContext *arg0,
               gpointer                    user_data)

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.

Parameters

user_data

user data set when the signal handler was connected.

 

Flags: Action