GtkSource.CompletionContext

g GObject.InitiallyUnowned GObject.InitiallyUnowned GtkSource.CompletionContext GtkSource.CompletionContext GObject.InitiallyUnowned->GtkSource.CompletionContext GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned

Subclasses:None

Methods

Inherited:GObject.Object (37)
Structs:GObject.ObjectClass (5)
  add_proposals (provider, proposals, finished)
  get_activation ()
  get_iter ()

Virtual Methods

Inherited:GObject.Object (7)
  do_cancelled ()

Properties

Name Type Flags Short Description
activation GtkSource.CompletionActivation r/w/c The type of activation
completion GtkSource.Completion r/w/co The completion object to which the context belongs
iter Gtk.TextIter r/w The Gtk.TextIter at which the completion was invoked

Signals

Inherited:GObject.Object (1)
Name Short Description
cancelled Emitted when the current population of proposals has been cancelled.

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent GObject.InitiallyUnowned r  

Class Details

class GtkSource.CompletionContext(**kwargs)
Bases:GObject.InitiallyUnowned
Abstract:No
Structure:GtkSource.CompletionContextClass
add_proposals(provider, proposals, finished)
Parameters:

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). Population occurs when the GtkSource.CompletionProvider.populate() function is called.

get_activation()
Returns:The context activation.
Return type:GtkSource.CompletionActivation

Get the context activation.

get_iter()
Returns:True if iter is correctly set, False otherwise.
iter:a Gtk.TextIter.
Return type:(bool, iter: Gtk.TextIter)

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

do_cancelled() virtual

Signal Details

GtkSource.CompletionContext.signals.cancelled(completion_context)
Signal Name:cancelled
Flags:RUN_LAST, ACTION
Parameters:completion_context (GtkSource.CompletionContext) – The object which received the signal

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.

Property Details

GtkSource.CompletionContext.props.activation
Name:activation
Type:GtkSource.CompletionActivation
Default Value:GtkSource.CompletionActivation.USER_REQUESTED
Flags:READABLE, WRITABLE, CONSTRUCT

The completion activation

GtkSource.CompletionContext.props.completion
Name:completion
Type:GtkSource.Completion
Default Value:None
Flags:READABLE, WRITABLE, CONSTRUCT_ONLY

The GtkSource.Completion associated with the context.

GtkSource.CompletionContext.props.iter
Name:iter
Type:Gtk.TextIter
Default Value:None
Flags:READABLE, WRITABLE

The Gtk.TextIter at which the completion is invoked.